diff -Nru screen-4.0.3/.gitignore screen-4.1.0~20120320gitdb59704/.gitignore --- screen-4.0.3/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/.gitignore 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,21 @@ +*.o +.*.swp +\#*\# +*~ +Makefile +autom4te.cache +cscope.out +TAGS +tags +comm.h +config.h +config.h.in +config.log +config.status +configure +kmapdef.c +osdef.h +term.h +screen +stamp-h.in +tty.c diff -Nru screen-4.0.3/.iscreenrc screen-4.1.0~20120320gitdb59704/.iscreenrc --- screen-4.0.3/.iscreenrc 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/.iscreenrc 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,169 @@ +# +# A sample .screenrc which I use for everyday work. +# +# some of the commands commented out here, have been moved to +# /local/etc/screenrc +# +# we want no password, right? +#password # This will ask us for a password. +password none # Same as not even mentioning it. +#password 12Bz/9hNlPLZk # "1234" +#password YahtrWblnJw # ypmatch jnweiger passwd. Well, ... :-) + +scrollback 200 # we have a 200 lines history buffer +markkeys "@=\177:@=^C" # our mad facit-twist terminal buffer overflow... +markkeys "h=^B:l=^F:\$=^E" # some missing emacs style bindings in copymode + +echo -n "booting screen" + +# let it flash, not horn! +#vbell on # "vbell" don't work any longer, sorry. +#vbell_msg " Wuff, Wuff!! " # this is the default message +#bell "Bimmmel No. %" # sounds the bell and shows a message + +# we want to login all windows we create. +#login on # "login", "nologin" don't work any longer, sorry 2. + +echo -n "." +# we have no termcap entry for screen on the target machine? Well then +# we tell a lie. +term screen # would be the obvious default here. +#term vt100 # screen will understand vt100 for 99%. + +# we want to survive hangups +# note that the default setting is off now! +autodetach on + +# when we open a window, where shall its CWD be? +chdir # without argument it's my $HOME + +echo -n "." +# I hate nonexisting status lines! Force screen to believe me. +#hardstatus off + +# now some Terminal setup: +# Printing in the leftmost column is not save. We express that fact as :LP@: +# +# Emacs tends to smear it's highlighted status bar across the screen, producing +# ugly areas of bright background, if termcap is'nt perfectly sober. +# Give a little :ms@: in the termcap, this may help. +# +# And who invented the initialisation for facit terminals? We tell him that +# we non't like smooth scroll, by specifying :ti=\E[?l:. +# \E[?3l 80 Zeichen +# \E[?3h 132 Zeichen +# LP Last column Printable +# \E[A cursor up +# \E[B cursor down +# \E[?4h smooth scroll +# \E[?4l jump scroll +# \E[%dL insert %d lines +# \E[K clear to end of line +# cs \E[%i%d;%dr for twist and xterm +# ms@ Move in Standout mode is NOT save. +# WS our private variable, it declares that the terminal can +# be resized by an escape-sequence +# The termcap statement takes 2 or three parameters. First parameter lists +# which TERMCAPs are affected by this statement. Second we specify changes +# in screen's view of that terminals. Third we may specify some capabilities +# that user-programs want to see in the $TERMCAP environment variable or in +# screen's termcap entry. +termcap vt* cl=\E[H\E[J\E[?1h:vi=\E[?35h:ve=\E[35l:ti=\E[?4l[vt100] +termcap facit ti=\E[?4l[facit] +termcap xterm* is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l:Z0=\E[?3h:Z1=\E[?3l + +echo -n "." +# "\E(B", "\E(0", "\E(1", "\E(2", ... to switch between charsets. +# screen internally emulates G1: "\E)..", G2: "\E*..", G3: "\E+.." +# you can switch between them, with: +# +# code | switch to +# ------+------ +# ^O | G0 +# ^N | G1 +# \En | G2 +# \Eo | G3 +#termcap facit|vt100|xterm* G0 + +# how do we resize windows? under sunview, this is standard, but xterm +# needs to be a specially hacked xterm, to make this work. +termcap xterm* WS=\E[8;%d;%dt + +# ICL 6402 testing: +termcap icl* G0:S0=\E$[start]:E0=\E%[end]:C0=j9kx5 GS=\E(0^O:GE=\E(B^O:G1=k:G2=l:G3=m:G4=j:GV=x:GH=q:GR=u:GL=t:GU=w:GD=v:GC=n + +# Flowcontrol produces trouble. ^S und ^Q will never reach screen, as our +# terminals catch them locally. Who can explain that to me?: +#flow on|off|auto [interrupt] + +# Long Lines get wrapped around (the back of your terminal). This is the +# default for vt100. But now programs make different asumptions about your +# terminal. You may find two linefeeds where you'd expect one, or you may +# be confronted with a truncated line. Currently there is no fix, but pressing +# C-A r and doing a redraw. +#wrap on + +# the autoaka allows you to see the currently executing shell command in the +# window name field. To use that, your shell prompt must contain ^[k^[\ or +# you will see the string "(init)" as a name. +# in my .cshrc I may use this for a wonderfull tcsh-prompt: +# set prompt="%{^[k^[\\%}%h %c2(%m)%# " +# +# defining a shellaka that contains a pipe-symbol (|) activites the +# autoaka feature. To the left of that | you specify a constant part of +# your prompt as a trigger, to the right you may place a default string +# as in +shellaka '> |tc' +# but beware! specifying a window name with the -t option has priority over +# the autoaka mechanism. Although specifying -t "> |foo" will work. +# shellaka tc + +# ... now a little bit of key bindings +# In case we don't have write permission for /etc/utmp (no s-bit) +# we create even local windows via rlogin. -> Et voila: a utmp-slot +# utmp-slots are strongly recomended to keep sccs and talk happy. +# (thus we have ^A# or. ^Ac for windowcreation with or without utmp-slot.) +# but if we run suid-root, we produce all the rlogins with -ln, +# as nobody shall refer to these pty's. +bind '!' screen -ln -k faui41 rlogin faui41 +bind '@' screen -ln -k vme2 rlogin faui4_vme2 +#bind '#' screen -k faui43 +bind '#' screen -ln -k faui43 rlogin faui43 +bind '$' screen -ln -k faui44 rlogin faui44 +bind '%' screen -ln -k faui45 rlogin faui45 +bind '\^' screen -ln -k sup1 rlogin fausup1 +bind '&' screen -ln -k sup2 rlogin fausup2 +bind '*' screen -ln -k faui48 rlogin faui48 +bind '(' screen -ln -k faui09 rlogin faui09 +bind ')' screen -ln -k faui10 rlogin faui10 +bind 'J' screen -ln -k 4j rlogin faui4j +bind 'P' screen -ln -k 4p rlogin faui4p +bind '^C' screen -ln -k 45c rlogin faui45c +bind '^D' screen -ln -k 45d rlogin faui45d +bind '^E' screen -ln -k 45e rlogin faui45e +bind '^I' screen -ln -k 45i rlogin faui45i + +# these two are logIn and logOut. As a toggle is too stupid. +#bind 'I' set login on +#bind 'O' set login off +bind 'L' + +# What happens, when you 'think emacs' and want to erase a whole +# line? You type ^A^K right? Under screen it should be ^Aa^K. But... +# killing the window would be a real punishment for a little mistyping. +bind k #wow! I even amange to type ^Ak by accident. +#bind ^k +#bind K kill + +echo -n "." +#screen 1:faui43 # My good old : syntax +#screen -k faui43 # The way Wayne Davison thinks about it. +#screen -ln -k faui43 # this one not logged in. +#screen -ln 2:faui09 rlogin faui09 -l jnweiger + +# Finally another bonus feature for people using strange terminal settings like +# different baud rate, etc. The next user will get standard settings +# as ^[c is a reset sequence. +#pow_detach_msg "" # is the default +pow_detach_msg "c" +echo "done." diff -Nru screen-4.0.3/COPYING screen-4.1.0~20120320gitdb59704/COPYING --- screen-4.0.3/COPYING 2001-04-28 13:26:42.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/COPYING 2011-10-04 22:32:21.000000000 +0000 @@ -1,285 +1,626 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -287,15 +628,15 @@ To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) - This program is free software; you can redistribute it and/or modify + 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 + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -303,37 +644,31 @@ 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. + You should have received a copy of the GNU General Public License + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -Nru screen-4.0.3/ChangeLog screen-4.1.0~20120320gitdb59704/ChangeLog --- screen-4.0.3/ChangeLog 2001-04-28 13:26:42.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/ChangeLog 2012-03-20 21:11:49.000000000 +0000 @@ -1,3 +1,126 @@ +Version 4.1.0 (??/??/20??): + New Commands: + * 'unbindall' to unbind all commands + * 'up', 'down', 'left', 'right' sub-commands for 'focus' + * 'rendition' to specify rendition to use in caption/hardstatus for + window-names that have bell/monitor/silence/so turned on. + * 'layout', with the following sub-commands + - 'title' + - 'number' + - 'autosave' ('autosave on' or 'autosave off') + - 'new' + - 'save' ('save ') + - 'select' + - 'next' + - 'prev' + - 'attach' + - 'show' + - 'remove' + - 'dump' + * 'group' for moving window(s) into a group. + * 'defmousetrack' and 'mousetrack', to turn on/off mouse-tracking for + displays. It's turned off by default. With mouse-tracking turned on, it's + possible to switch to a region ('focus') using mouse clicks. It's also + possible to select a text region in copy-mode using a mouse click to place + a mark and the scroll wheel to scroll through the buffer. Additional + features might be to allow clicking on window-titles in the caption to + switch to that window. + * All commands prefixed '@' are treated as 'quiet', i.e. '@'-prefixed commands + do not trigger any display messages. + + Changed Commands: + * '-v' parameter to 'split' command for vertical splits. + * 'sorendition' deprecated in favour of 'rendition so'. + * 'digraph' can take a second parameter to specify custom digraphs. For + example, + 'digraph >= ≥' or 'digraph >= U+2265' + Using '0' as the second parameter will remove the digraph. + * 'stuff' will prompt for input if there's nothing to stuff. + * The argument to ":number" can be prefixed with '+' or '-' to use it as a + relative argument. + * '-g' parameter to 'windowlist' to show nested list of windows. + * '//group' parameter to 'screen' to create a grouped window. + * 'blankerprg' shows the currently set command on no argument. + * 'maxwin' can now be used to increase the number of maximum windows. + + .screenrc: + * $PID expands to the PID of the screen session. + * $PWD expands to the current working directory of the session. + * $STY expands to the session name. + * Tilde-expansion in pathnames (e.g. for the 'source' command) + * C-style escapes can be used (e.g. "\n" to get a newline with 'stuff') + * '%p' in caption/hardstatus string expands to the PID of the backend, and + '%+p' expands to the PID of the frontend (display). + * '%S' in caption/hardstatus string expands to the session name. + * '%P' in the caption string evaluates to true if the region is in copy mode. + * '%E' in the caption string evaluates to true if the escape character has + currently been pressed. + + Window List: + * Nested views when there are window groups (with 'windowlist -g'). + * Press 'm' to toggle the most-recent view. + * Press 'g' to toggle nestedness. + * Press 'a' to view all windows in the list. + * Press '/' to search in the list. + * Press ',' and '.' to re-order windows in the list. + * Press 'K' to kill a window (requires confirmation). + + Display List: + * Press 'd' to detach a display, 'D' to power-detach. + + Others: + * Start using 'ChangeLog' for logging changes again. + * Terminfo update for 256-color support. + * Multiple input history (partially from Romain Francoise). + * vi-like fFtT;, searching in copy mode. + * In copy mode, search in reverse direction when 'N' is pressed. + * Tab-completion for command input. + * Some more readline-like bindings in input mode (e.g. ^W, ^D, ^P, ^N etc.) + * Fix displaying unicode characters in the caption/hardstatus on UTF8 locale. + * A revamped displays list (for 'displays' command) + * Increased default maximum number of windows from 40 to 100. + * Increased number color/attribute changes in caption/hardstatus string from 16 to 256. + * Some commands can be remotely queried using the -Q command-line flag. + + In-Progress: + * Scripting support (thanks to Google Summer of Code 2009 project by Rui Guo) + + Developers: + * Juergen Weigert + * Michael Schroeder + * Micah Cowan + * Sadrul Habib Chowdhury + + Contributors: + * Clavelito + * Dick + * Gabriel + * Benjamin Andresen + * Takeshi Banse + * Maarten Billemont + * Curtis Brown + * Cyril Brulebois + * Trent W Buck + * Stephane Chazelas + * Kees Cook + * Thomas Dickey + * Christian Ebert + * Geraint Edwards + * Romain Francoise + * Alexander Gattin + * Emanuele Giaquinta + * Yi-Hsuan Hsin + * Kipling Inscore + * Chris Jones + * Max Kalashnikov + * Steve Kemp + * Ryan Niebur + * Jan Christoph Nordholz + * William Pursell + * Michael Scherer + * Enrico Scholz + * Peter Teichman + 30.10.94 This is a quick overview of screen's life story. But it is not up diff -Nru screen-4.0.3/HACKING screen-4.1.0~20120320gitdb59704/HACKING --- screen-4.0.3/HACKING 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/HACKING 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,39 @@ +WIP notes on hacking the Screen source. + +* Screen commands are handled by the DoAction function in process.c. + The local variable nr is set to an integer value representing the + command to be evaluated; for every command `foo', there is an + integer value RC_FOO for use as nr's value to represent it. Find + the matching case label to follow procesing of the command. + + The RC_FOO values are defined in comm.h, which is automatically + generated by comm.sh, based on the names of the commands + themselves (found in comm.c). + +* The current display is held in the global variable "display". + Variable names like D_foo are shorthands for display->d_foo (where d_foo + is a member of "struct display"). + +* Names like D_IS, D_TI, D_SG usually refer to the values of various + termcap features of the current display. These are found in term.h, + which is automatically generated from term.c by term.sh. + +* The main input-reading function for handling user input from a display, + is disp_readev_fn in display.c. This also handles automatic transformation + of mouse-tracking codes from display coordinates to screen-window + coordinates, and decodes characters from the display's encoding, passing + it on to the foreground input processor. + + Input is passed through ProcessInput in process.c to handle + keybindings (specified by bindkey and such), and then processed by + layer-specific input-processing functions, which you'll find in + instances of struct LayFuncs. For instance, keystrokes are processed + by: + + normal windows: WinPrGocess + window in copy-mode: MarkProcess + window list: WListProcess + command input line: InpProcess + +* Handling string escapes (in hardstatus and the like), such as %w or + %{= bw}, is done in screen.c, MakeWinMsgEv(). diff -Nru screen-4.0.3/INSTALL screen-4.1.0~20120320gitdb59704/INSTALL --- screen-4.0.3/INSTALL 2003-07-24 09:38:06.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/INSTALL 2011-10-04 22:32:21.000000000 +0000 @@ -13,6 +13,9 @@ prep.ai.mit.edu:pub/gnu/standards.*, especially the `Makefile Conventions', `Configuration', and `User Interfaces' sections. +0.) autogen.sh +-------------- +First, run ./autogen.sh. This will create configure file that you can use. 1.) configure & config.status ----------------------------- @@ -44,7 +47,7 @@ The creation of term.h, comm.h, tty.c or osdef.h may fail on some machines for some odd reason. (E.g. the sed under SCO-unix is known to be case-insensitive and breaks term.h.) If so, please mail a short description -of the problem to screen@uni-erlangen.de and use the files ending in .dist +of the problem to screen-devel@gnu.org and use the files ending in .dist as a replacement (or in case of osdef.h retry with an empty file). You can then try 'make install' (if you dare). diff -Nru screen-4.0.3/Makefile screen-4.1.0~20120320gitdb59704/Makefile --- screen-4.0.3/Makefile 2006-10-23 13:06:32.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -install all Makefiles and config: - rm -f config.cache - sh ./configure diff -Nru screen-4.0.3/Makefile.in screen-4.1.0~20120320gitdb59704/Makefile.in --- screen-4.0.3/Makefile.in 2006-10-23 13:06:32.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/Makefile.in 2011-10-04 22:32:21.000000000 +0000 @@ -13,6 +13,8 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ # don't forget to change mandir and infodir in doc/Makefile. bindir = $(exec_prefix)/bin @@ -20,12 +22,19 @@ VERSION = @VERSION@ SCREEN = screen-$(VERSION) -ETCSCREENRC = `sed < config.h -n -e '/define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'` -SCREENENCODINGS = `sed < config.h -n -e '/define SCREENENCODINGS/s/^.*"\([^"]*\)"/\1/p'` +GIT_REV = "`git describe --always 2>/dev/null`" +DEFS = @DEFS@ -DGIT_REV=\"$(GIT_REV)\" + +ETCSCREENRC = @ETCSCREENRC@ +ifeq (${ETCSCREENRC}, ) +ETCSCREENRC=$(prefix)/etc/screenrc +endif +SCREENENCODINGS = $(datadir)/screen/utf8encodings CC = @CC@ CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ +CPPFLAGS = @CPPFLAGS@ -DETCSCREENRC='"$(ETCSCREENRC)"' \ + -DSCREENENCODINGS='"$(SCREENENCODINGS)"' LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @@ -55,12 +64,14 @@ search.c tty.c term.c window.c utmp.c loadav.c putenv.c help.c \ termcap.c input.c attacher.c pty.c process.c display.c comm.c \ kmapdef.c acls.c braille.c braille_tsi.c logfile.c layer.c \ - sched.c teln.c nethack.c encoding.c + sched.c teln.c nethack.c encoding.c canvas.c layout.c viewport.c \ + list_display.c list_generic.c list_window.c OFILES= screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \ search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \ termcap.o input.o attacher.o pty.o process.o display.o comm.o \ kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o \ - sched.o teln.o nethack.o encoding.o + list_generic.o list_display.o list_window.o \ + sched.o teln.o nethack.o encoding.o canvas.o layout.o viewport.o all: screen @@ -68,7 +79,8 @@ $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) .c.o: - $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $< + $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \ + $(OPTIONS) $(CFLAGS) $< install_bin: .version screen -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ @@ -78,7 +90,7 @@ # This doesn't work if $(bindir)/screen is a symlink -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi rm -f $(DESTDIR)$(bindir)/screen - (cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen) + (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) ############################################################################### @@ -165,7 +177,7 @@ tags TAGS: $(CFILES) -ctags *.sh $(CFILES) *.h - -ctags -e *.sh $(CFILES) *.h + -etags *.sh $(CFILES) *.h dist: .version $(SCREEN).tar.gz @@ -266,66 +278,79 @@ ############################################################################### ### Dependencies: -screen.o: screen.c config.h screen.h os.h osdef.h ansi.h acls.h \ +screen.o: layout.h viewport.h canvas.h screen.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h braille.h \ patchlevel.h logfile.h extern.h -ansi.o: ansi.c config.h screen.h os.h osdef.h ansi.h acls.h \ +ansi.o: layout.h viewport.h canvas.h ansi.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h braille.h extern.h \ logfile.h -fileio.o: fileio.c config.h screen.h os.h osdef.h ansi.h acls.h \ +fileio.o: layout.h viewport.h canvas.h fileio.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -mark.o: mark.c config.h screen.h os.h osdef.h ansi.h acls.h \ +mark.o: layout.h viewport.h canvas.h mark.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h mark.h extern.h -misc.o: misc.c config.h screen.h os.h osdef.h ansi.h acls.h \ +misc.o: layout.h viewport.h canvas.h misc.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -resize.o: resize.c config.h screen.h os.h osdef.h ansi.h acls.h \ +resize.o: layout.h viewport.h canvas.h resize.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -socket.o: socket.c config.h screen.h os.h osdef.h ansi.h acls.h \ +socket.o: layout.h viewport.h canvas.h socket.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -search.o: search.c config.h screen.h os.h osdef.h ansi.h acls.h \ +search.o: layout.h viewport.h canvas.h search.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h mark.h extern.h -tty.o: tty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ +tty.o: layout.h viewport.h canvas.h tty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ layer.h term.h image.h display.h window.h extern.h -term.o: term.c term.h -window.o: window.c config.h screen.h os.h osdef.h ansi.h acls.h \ +term.o: layout.h viewport.h canvas.h term.c term.h +window.o: layout.h viewport.h canvas.h window.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h logfile.h -utmp.o: utmp.c config.h screen.h os.h osdef.h ansi.h acls.h \ - comm.h layer.h term.h image.h display.h window.h extern.h -loadav.o: loadav.c config.h screen.h os.h osdef.h ansi.h acls.h \ +utmp.o: layout.h viewport.h canvas.h utmp.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -putenv.o: putenv.c config.h -help.o: help.c config.h screen.h os.h osdef.h ansi.h acls.h \ +loadav.o: layout.h viewport.h canvas.h loadav.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -termcap.o: termcap.c config.h screen.h os.h osdef.h ansi.h acls.h \ +putenv.o: layout.h viewport.h canvas.h putenv.c config.h +help.o: layout.h viewport.h canvas.h help.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h list_generic.h +termcap.o: layout.h viewport.h canvas.h termcap.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -input.o: input.c config.h screen.h os.h osdef.h ansi.h acls.h \ +input.o: layout.h viewport.h canvas.h input.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -attacher.o: attacher.c config.h screen.h os.h osdef.h ansi.h \ +attacher.o: layout.h viewport.h canvas.h attacher.c config.h screen.h os.h osdef.h ansi.h \ acls.h comm.h layer.h term.h image.h display.h window.h extern.h -pty.o: pty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ +pty.o: layout.h viewport.h canvas.h pty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ layer.h term.h image.h display.h window.h extern.h -process.o: process.c config.h screen.h os.h osdef.h ansi.h acls.h \ +process.o: layout.h viewport.h canvas.h process.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h logfile.h -display.o: display.c config.h screen.h os.h osdef.h ansi.h acls.h \ +display.o: layout.h viewport.h canvas.h display.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h braille.h -comm.o: comm.c config.h acls.h comm.h -kmapdef.o: kmapdef.c config.h -acls.o: acls.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ +canvas.o: layout.h viewport.h canvas.h canvas.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h \ + braille.h +comm.o: layout.h viewport.h canvas.h comm.c config.h acls.h comm.h +kmapdef.o: layout.h viewport.h canvas.h kmapdef.c config.h +acls.o: layout.h viewport.h canvas.h acls.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \ layer.h term.h image.h display.h window.h extern.h -braille.o: braille.c config.h screen.h os.h osdef.h ansi.h acls.h \ +braille.o: layout.h viewport.h canvas.h braille.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h braille.h -braille_tsi.o: braille_tsi.c config.h screen.h os.h osdef.h ansi.h \ +braille_tsi.o: layout.h viewport.h canvas.h braille_tsi.c config.h screen.h os.h osdef.h ansi.h \ acls.h comm.h layer.h term.h image.h display.h window.h extern.h \ braille.h -logfile.o: logfile.c config.h screen.h os.h osdef.h ansi.h acls.h \ +logfile.o: layout.h viewport.h canvas.h logfile.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h logfile.h -layer.o: layer.c config.h screen.h os.h osdef.h ansi.h acls.h \ +layer.o: layout.h viewport.h canvas.h layer.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -sched.o: sched.c config.h screen.h os.h osdef.h ansi.h acls.h \ +sched.o: layout.h viewport.h canvas.h sched.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h logfile.h -teln.o: teln.c config.h screen.h os.h osdef.h ansi.h acls.h \ +teln.o: layout.h viewport.h canvas.h teln.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -nethack.o: nethack.c config.h screen.h os.h osdef.h ansi.h acls.h \ +nethack.o: layout.h viewport.h canvas.h nethack.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h -encoding.o: encoding.c config.h screen.h os.h osdef.h ansi.h acls.h \ +encoding.o: layout.h viewport.h canvas.h encoding.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h +layout.o: layout.h viewport.h canvas.h layout.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h \ + braille.h +viewport.o: layout.h viewport.h canvas.h viewport.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h \ + braille.h +list_generic.o: list_generic.h list_generic.c layer.h +list_display.o: list_generic.h list_display.c layer.h +list_window.o: list_generic.h list_window.c window.h layer.h + diff -Nru screen-4.0.3/NEWS screen-4.1.0~20120320gitdb59704/NEWS --- screen-4.0.3/NEWS 2003-07-21 18:04:05.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/NEWS 2011-10-04 22:32:21.000000000 +0000 @@ -1,4 +1,18 @@ ------------------------------ + What's new in screen-4.0.3 ? + ------------------------------ + +* zombie command has new option 'onerror' + +* buffer overflow in resize.c fixed + +* minor docu update + +* more robust startup + +* use setresuid; SendAttachMsg() for fd-passing added; DoCSI enhanced. + + ------------------------------ What's new in screen-4.0.0 ? ------------------------------ diff -Nru screen-4.0.3/NEWS.3.5 screen-4.1.0~20120320gitdb59704/NEWS.3.5 --- screen-4.0.3/NEWS.3.5 2001-04-28 13:26:42.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/NEWS.3.5 2011-10-04 22:32:21.000000000 +0000 @@ -77,7 +77,7 @@ document. * Screen can now be started detached (screen -d -m -S sockname). - This is usefull if you want to start screen in your /etc/rc file + This is useful if you want to start screen in your /etc/rc file (e.g. as a console multiplexer) * Console grabbing added ('console on' command). diff -Nru screen-4.0.3/acconfig.h screen-4.1.0~20120320gitdb59704/acconfig.h --- screen-4.0.3/acconfig.h 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/acconfig.h 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,584 @@ +/* Copyright (c) 1993-2000 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Copyright (c) 1987 Oliver Laumann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + **************************************************************** + * $Id$ GNU + */ + + + + + +/********************************************************************** + * + * User Configuration Section + */ + +/* + * Maximum of simultaneously allowed windows per screen session. + */ +#ifndef MAXWIN +# define MAXWIN 100 +#endif + +/* + * Define SOCKDIR to be the directory to contain the named sockets + * screen creates. This should be in a common subdirectory, such as + * /usr/local or /tmp. It makes things a little more secure if you + * choose a directory which is not writable by everyone or where the + * "sticky" bit is on, but this isn't required. + * If SOCKDIR is not defined screen will put the named sockets in + * the user's home directory. Notice that this can cause you problems + * if some user's HOME directories are AFS- or NFS-mounted. Especially + * AFS is unlikely to support named sockets. + * + * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison). + */ +#undef SOCKDIR + +/* + * Define this if the SOCKDIR is not shared between hosts. + */ +#define SOCKDIR_IS_LOCAL_TO_HOST + +/* + * Screen can look for the environment variable $SYSSCREENRC and -if it + * exists- load the file specified in that variable as global screenrc. + * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1). + * Otherwise ETCSCREENRC is always loaded. + */ +#define ALLOW_SYSSCREENRC 1 + +/* + * Define CHECKLOGIN to force Screen users to enter their Unix password + * in addition to the screen password. + * + * Define NOSYSLOG if yo do not have logging facilities. Currently + * syslog() will be used to trace ``su'' commands only. + */ +#define CHECKLOGIN 1 +#undef NOSYSLOG + + +/* + * define PTYMODE if you do not like the default of 0622, which allows + * public write to your pty. + * define PTYGROUP to some numerical group-id if you do not want the + * tty to be in "your" group. + * Note, screen is unable to change mode or group of the pty if it + * is not installed with sufficient privilege. (e.g. set-uid-root) + * define PTYROFS if the /dev/pty devices are mounted on a read-only + * filesystem so screen should not even attempt to set mode or group + * even if running as root (e.g. on TiVo). + */ +#undef PTYMODE +#undef PTYGROUP +#undef PTYROFS + +/* + * If screen is NOT installed set-uid root, screen can provide tty + * security by exclusively locking the ptys. While this keeps other + * users from opening your ptys, it also keeps your own subprocesses + * from being able to open /dev/tty. Define LOCKPTY to add this + * exclusive locking. + */ +#undef LOCKPTY + +/* + * If you'd rather see the status line on the first line of your + * terminal rather than the last, define TOPSTAT. + */ +#undef TOPSTAT + +/* + * define DETACH can detach a session. An absolute 'must'. + */ +#define DETACH + +/* + * here come the erlangen extensions to screen: + * define LOCK if you want to use a lock program for a screenlock. + * define PASSWORD for secure reattach of your screen. + * define COPY_PASTE to use the famous hacker's treasure zoo. + * define POW_DETACH to have a detach_and_logout key (requires DETACH). + * define REMOTE_DETACH (-d option) to move screen between terminals. + * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking + * define PSEUDOS to allow window input/output filtering + * define MULTI to allow multiple attaches. + * define MULTIUSER to allow other users attach to your session + * (if they are in the acl, of course) + * define MAPKEYS to include input keyboard translation. + * define FONT to support ISO2022/alternet charset support + * define COLOR to include ansi color support. This may expose + * a bug in x11r6-color-xterm. + * define DW_CHARS to include support for double-width character + * sets. + * define ENCODINGS to include support for encodings like euc or big5. + * Needs FONT to work. + * define UTF8 if you want support for UTF-8 encoding. + * Needs FONT and ENCODINGS to work. + * define COLORS16 if you want 16 colors. + * Needs COLOR to work. + * define BUILTIN_TELNET to add telnet support to screen. + * Syntax: screen //telnet host [port] + * define RXVT_OSC if you want support for rxvts special + * change fgcolor/bgcolor/bgpicture sequences + */ +#undef SIMPLESCREEN +#ifndef SIMPLESCREEN +# define LOCK +# define PASSWORD +# define COPY_PASTE +# define REMOTE_DETACH +# define POW_DETACH +# define AUTO_NUKE +# define PSEUDOS +# define MULTI +# define MULTIUSER +# define MAPKEYS +# define COLOR +# define FONT +# define DW_CHARS +# define ENCODINGS +# define UTF8 +# define COLORS16 +# define ZMODEM +# define BLANKER_PRG +#endif /* SIMPLESCREEN */ + +#undef BUILTIN_TELNET +#undef RXVT_OSC +#undef COLORS256 + + +/* + * If you have a braille display you should define HAVE_BRAILLE. + * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi + * Rangin (bargi@dots.physics.orst.edu). + * WARNING: this is more or less unsupported code, it may be full of + * bugs leading to security holes, enable at your own risk! + */ +#undef HAVE_BRAILLE + + +/* + * As error messages are mostly meaningless to the user, we + * try to throw out phrases that are somewhat more familiar + * to ...well, at least familiar to us NetHack players. + */ +#ifndef NONETHACK +# define NETHACK +#endif /* NONETHACK */ + +/* + * If screen is installed with permissions to update /etc/utmp (such + * as if it is installed set-uid root), define UTMPOK. + */ +#define UTMPOK + +/* Set LOGINDEFAULT to one (1) + * if you want entries added to /etc/utmp by default, else set it to + * zero (0). + * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined! + */ +#define LOGINDEFAULT 1 + +/* Set LOGOUTOK to one (1) + * if you want the user to be able to log her/his windows out. + * (Meaning: They are there, but not visible in /etc/utmp). + * Disabling this feature only makes sense if you have a secure /etc/utmp + * database. + * Negative examples: suns usually have a world writable utmp file, + * xterm will run perfectly without s-bit. + * + * If LOGOUTOK is undefined and UTMPOK is defined, all windows are + * initially and permanently logged in. + * + * Set CAREFULUTMP to one (1) if you want that users have at least one + * window per screen session logged in. + */ +#define LOGOUTOK 1 +#undef CAREFULUTMP + + +/* + * If UTMPOK is defined and your system (incorrectly) counts logins by + * counting non-null entries in /etc/utmp (instead of counting non-null + * entries with no hostname that are not on a pseudo tty), define USRLIMIT + * to have screen put an upper-limit on the number of entries to write + * into /etc/utmp. This helps to keep you from exceeding a limited-user + * license. + */ +#undef USRLIMIT + +/* + * both must be defined if you want to favor tcsendbreak over + * other calls to generate a break condition on serial lines. + * (Do not bother, if you are not using plain tty windows.) + */ +#define POSIX_HAS_A_GOOD_TCSENDBREAK +#define SUNOS4_AND_WE_TRUST_TCSENDBREAK + +/* + * to lower the interrupt load on the host machine, you may want to + * adjust the VMIN and VTIME settings used for plain tty windows. + * See the termio(4) manual page (Non-Canonical Mode Input Processing) + * for details. + * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you + * best user responsiveness, but highest interrupt frequency. + * (Do not bother, if you are not using plain tty windows.) + */ +#define TTYVMIN 100 +#define TTYVTIME 2 + +/* + * looks like the above values are ignored by setting FNDELAY. + * This is default for all pty/ttys, you may disable it for + * ttys here. After playing with it for a while, one may find out + * that this feature may cause screen to lock up. + */ +#ifdef bsdi +# define TTY_DISABLE_FNBLOCK /* select barfs without it ... */ +#endif + + +/* + * Some terminals, e.g. Wyse 120, use a bitfield to select attributes. + * This doesn't work with the standard so/ul/m? terminal entries, + * because they will cancel each other out. + * On TERMINFO machines, "sa" (sgr) may work. If you want screen + * to switch attributes only with sgr, define USE_SGR. + * This is *not* recomended, do this only if you must. + */ +#undef USE_SGR + + +/* + * Define USE_LOCALE if you want screen to use the locale names + * for the name of the month and day of the week. + */ +#define USE_LOCALE + +/* + * Define USE_PAM if your system supports PAM (Pluggable Authentication + * Modules) and you want screen to use it instead of calling crypt(). + * (You may also need to add -lpam to LIBS in the Makefile.) + */ +#undef USE_PAM + +/* + * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w + * if the terminal width is greater than 131 columns. No longer needed + * on modern systems which use $COLUMNS or the tty settings instead. + */ +#undef CHECK_SCREEN_W + +/********************************************************************** + * + * End of User Configuration Section + * + * Rest of this file is modified by 'configure' + * Change at your own risk! + * + */ + +/* + * Some defines to identify special unix variants + */ +#ifndef SVR4 +#undef SVR4 +#endif + +/* #ifndef __osf__ */ +#ifndef MIPS +#undef MIPS +#endif +/* #endif */ + +#ifndef OSX +#undef OSX +#endif + +#ifndef ISC +#undef ISC +#endif + +#ifndef sysV68 +#undef sysV68 +#endif + +#ifndef _POSIX_SOURCE +#undef _POSIX_SOURCE +#endif + +/* + * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX). + */ +#undef POSIX + +/* + * Define BSDJOBS if you have BSD-style job control (both process + * groups and a tty that deals correctly with them). + */ +#undef BSDJOBS + +/* + * Define TERMIO if you have struct termio instead of struct sgttyb. + * This is usually the case for SVID systems, where BSD uses sgttyb. + * POSIX systems should define this anyway, even though they use + * struct termios. + */ +#undef TERMIO + +/* + * Define CYTERMIO if you have cyrillic termio modes. + */ +#undef CYTERMIO + +/* + * Define TERMINFO if your machine emulates the termcap routines + * with the terminfo database. + * Thus the .screenrc file is parsed for + * the command 'terminfo' and not 'termcap'. + */ +#undef TERMINFO + +/* + * If your library does not define ospeed, define this. + */ +#undef NEED_OSPEED + +/* + * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX) + */ +#ifndef SYSV +#undef SYSV +#endif + +/* + * Define SIGVOID if your signal handlers return void. On older + * systems, signal returns int, but on newer ones, it returns void. + */ +#undef SIGVOID + +/* + * Define USESIGSET if you have sigset for BSD 4.1 reliable signals. + */ +#undef USESIGSET + +/* + * Define SYSVSIGS if signal handlers must be reinstalled after + * they have been called. + */ +#undef SYSVSIGS + +/* + * Define BSDWAIT if your system defines a 'union wait' in + * + * Only allow BSDWAIT i.e. wait3 on nonposix systems, since + * posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl + * + */ +#ifndef POSIX +#undef BSDWAIT +#endif + +/* + * On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com + */ +#ifdef BSDWAIT +#undef USE_WAIT2 +#endif + +/* + * If your system has getutent(), pututline(), etc. to write to the + * utmp file, define GETUTENT. + */ +#undef GETUTENT + +/* + * Define UTHOST if the utmp file has a host field. + */ +#undef UTHOST + +/* + * Define if you have the utempter utmp helper program + */ +#undef HAVE_UTEMPTER + +/* + * If ttyslot() breaks getlogin() by returning indexes to utmp entries + * of type DEAD_PROCESS, then our getlogin() replacement should be + * selected by defining BUGGYGETLOGIN. + */ +#undef BUGGYGETLOGIN + +/* + * If your system has the calls setreuid() and setregid(), + * define HAVE_SETREUID. Otherwise screen will use a forked process to + * safely create output files without retaining any special privileges. + */ +#undef HAVE_SETRESUID +#undef HAVE_SETREUID + +/* + * If your system supports BSD4.4's seteuid() and setegid(), define + * HAVE_SETEUID. + */ +#undef HAVE_SETEUID + +/* + * execvpe is now defined in some systems. + */ +#undef HAVE_EXECVPE + +/* + * If you want the "time" command to display the current load average + * define LOADAV. Maybe you must install screen with the needed + * privileges to read /dev/kmem. + * Note that NLIST_ stuff is only checked, when getloadavg() is not available. + */ +#undef LOADAV + +#undef LOADAV_NUM +#undef LOADAV_TYPE +#undef LOADAV_SCALE +#undef LOADAV_GETLOADAVG +#undef LOADAV_UNIX +#undef LOADAV_AVENRUN +#undef LOADAV_USE_NLIST64 + +#undef NLIST_DECLARED +#undef NLIST_STRUCT +#undef NLIST_NAME_UNION + +/* + * If your system has the new format /etc/ttys (like 4.3 BSD) and the + * getttyent(3) library functions, define GETTTYENT. + */ +#undef GETTTYENT + +/* + * Define USEBCOPY if the bcopy/memcpy from your system's C library + * supports the overlapping of source and destination blocks. When + * undefined, screen uses its own (probably slower) version of bcopy(). + * + * SYSV machines may have a working memcpy() -- Oh, this is + * quite unlikely. Tell me if you see one. + * "But then, memmove() should work, if at all available" he thought... + * Boing, never say "works everywhere" unless you checked SCO UNIX. + * Their memove fails the test in the configure script. Sigh. (Juergen) + */ +#undef USEBCOPY +#undef USEMEMCPY +#undef USEMEMMOVE + +/* + * If your system has vsprintf() and requires the use of the macros in + * "varargs.h" to use functions with variable arguments, + * define USEVARARGS. + */ +#undef USEVARARGS + +/* + * If the select return value doesn't treat a descriptor that is + * usable for reading and writing as two hits, define SELECT_BROKEN. + */ +#undef SELECT_BROKEN + +/* + * Define this if your system supports named pipes. + */ +#undef NAMEDPIPE + +/* + * Define this if your system exits select() immediatly if a pipe is + * opened read-only and no writer has opened it. + */ +#undef BROKEN_PIPE + +/* + * Define this if the unix-domain socket implementation doesn't + * create a socket in the filesystem. + */ +#undef SOCK_NOT_IN_FS + +/* + * If your system has setenv() and unsetenv() define USESETENV + */ +#undef USESETENV + +/* + * If setenv() takes 3 arguments define HAVE_SETENV_3 + */ +#undef HAVE_SETENV_3 + +/* + * If setenv() takes 2 arguments define HAVE_SETENV_2 + */ +#undef HAVE_SETENV_2 + +/* + * If your system does not come with a setenv()/putenv()/getenv() + * functions, you may bring in our own code by defining NEEDPUTENV. + */ +#undef NEEDPUTENV + +/* + * If the passwords are stored in a shadow file and you want the + * builtin lock to work properly, define SHADOWPW. + */ +#undef SHADOWPW + +/* + * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call + * and defines CODESET. + */ +#undef HAVE_NL_LANGINFO + +/* + * Newer versions of Solaris include fdwalk, which can greatly improve + * the startup time of screen; otherwise screen spends a lot of time + * closing file descriptors. + */ +#undef HAVE_FDWALK + +/* + * define HAVE_DEV_PTC if you have a /dev/ptc character special + * device. + */ +#undef HAVE_DEV_PTC + +/* + * define HAVE_SVR4_PTYS if you have a /dev/ptmx character special + * device and support the ptsname(), grantpt(), unlockpt() functions. + */ +#undef HAVE_SVR4_PTYS + +/* + * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen + * to unusual environments. E.g. For SunOs the defaults are "qpr" and + * "0123456789abcdef". For SunOs 4.1.2 + * #define PTYRANGE0 "pqrstuvwxyzPQRST" + * is recommended by Dan Jacobson. + */ +#undef PTYRANGE0 +#undef PTYRANGE1 + diff -Nru screen-4.0.3/acls.c screen-4.1.0~20120320gitdb59704/acls.c --- screen-4.0.3/acls.c 2003-09-08 14:24:40.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/acls.c 2011-10-04 22:32:21.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,17 +19,16 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ -#include - #include "config.h" +#include /* XXX: WHY IS THIS HERE?? :XXX */ @@ -51,7 +55,7 @@ ************************************************************************/ extern struct comm comms[]; -extern struct win *windows, *wtab[]; +extern struct win *windows, **wtab; extern char NullStr[]; extern char SockPath[]; extern struct display *display, *displays; diff -Nru screen-4.0.3/acls.h screen-4.1.0~20120320gitdb59704/acls.h --- screen-4.0.3/acls.h 2003-09-08 14:23:38.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/acls.h 2011-10-04 22:32:21.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,9 +19,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ diff -Nru screen-4.0.3/ansi.c screen-4.1.0~20120320gitdb59704/ansi.c --- screen-4.0.3/ansi.c 2003-12-05 13:57:05.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/ansi.c 2012-02-20 01:01:57.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,9 +19,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ @@ -73,8 +78,10 @@ struct mchar mchar_blank = {' ' /* , 0, 0, ... */}; struct mchar mchar_so = {' ', A_SO /* , 0, 0, ... */}; +int renditions[NUM_RENDS] = {65529 /* =ub */, 65531 /* =b */, 65533 /* =u */ }; + /* keep string_t and string_t_string in sync! */ -static char *string_t_string[] = +static char *string_t_string[] = { "NONE", "DCS", /* Device control string */ @@ -115,8 +122,8 @@ static void MapCharset __P((int)); static void MapCharsetR __P((int)); #endif -static void SaveCursor __P((void)); -static void RestoreCursor __P((void)); +static void SaveCursor __P((struct cursor *)); +static void RestoreCursor __P((struct cursor *)); static void BackSpace __P((void)); static void Return __P((void)); static void LineFeed __P((int)); @@ -193,7 +200,7 @@ p->w_cursorkeys = 0; p->w_top = 0; p->w_bot = p->w_height - 1; - p->w_saved = 0; + p->w_saved.on = 0; p->w_x = p->w_y = 0; p->w_state = LIT; p->w_StringType = NONE; @@ -315,578 +322,581 @@ curr->w_monitor = MON_FOUND; } - do + if (cols > 0 && rows > 0) { - c = (unsigned char)*buf++; + do + { + c = (unsigned char)*buf++; #ifdef FONT # ifdef DW_CHARS - if (!curr->w_mbcs) + if (!curr->w_mbcs) # endif - curr->w_rend.font = curr->w_FontL; /* Default: GL */ + curr->w_rend.font = curr->w_FontL; /* Default: GL */ #endif - /* The next part is only for speedup */ - if (curr->w_state == LIT && + /* The next part is only for speedup */ + if (curr->w_state == LIT && #ifdef UTF8 - curr->w_encoding != UTF8 && + curr->w_encoding != UTF8 && #endif #ifdef DW_CHARS - !is_dw_font(curr->w_rend.font) && + !is_dw_font(curr->w_rend.font) && # ifdef ENCODINGS - curr->w_rend.font != KANA && !curr->w_mbcs && + curr->w_rend.font != KANA && !curr->w_mbcs && # endif #endif #ifdef FONT - curr->w_rend.font != '<' && + curr->w_rend.font != '<' && #endif - c >= ' ' && c != 0x7f && - ((c & 0x80) == 0 || ((c >= 0xa0 || !curr->w_c1) && !curr->w_gr)) && !curr->w_ss && - !curr->w_insert && curr->w_x < cols - 1) - { - register int currx = curr->w_x; - char *imp = buf - 1; - - while (currx < cols - 1) + c >= ' ' && c != 0x7f && + ((c & 0x80) == 0 || ((c >= 0xa0 || !curr->w_c1) && !curr->w_gr)) && !curr->w_ss && + !curr->w_insert && curr->w_x < cols - 1) { - currx++; - if (--len == 0) - break; - c = (unsigned char)*buf++; - if (c < ' ' || c == 0x7f || ((c & 0x80) && ((c < 0xa0 && curr->w_c1) || curr->w_gr))) + register int currx = curr->w_x; + char *imp = buf - 1; + + while (currx < cols - 1) + { + currx++; + if (--len == 0) + break; + c = (unsigned char)*buf++; + if (c < ' ' || c == 0x7f || ((c & 0x80) && ((c < 0xa0 && curr->w_c1) || curr->w_gr))) + break; + } + currx -= curr->w_x; + if (currx > 0) + { + MPutStr(curr, imp, currx, &curr->w_rend, curr->w_x, curr->w_y); + LPutStr(&curr->w_layer, imp, currx, &curr->w_rend, curr->w_x, curr->w_y); + curr->w_x += currx; + } + if (len == 0) break; } - currx -= curr->w_x; - if (currx > 0) - { - MPutStr(curr, imp, currx, &curr->w_rend, curr->w_x, curr->w_y); - LPutStr(&curr->w_layer, imp, currx, &curr->w_rend, curr->w_x, curr->w_y); - curr->w_x += currx; - } - if (len == 0) - break; - } - /* end of speedup code */ + /* end of speedup code */ #ifdef UTF8 - if (curr->w_encoding == UTF8) - { - c = FromUtf8(c, &curr->w_decodestate); - if (c == -1) - continue; - if (c == -2) + if (curr->w_encoding == UTF8) { - c = UCS_REPL; - /* try char again */ - buf--; - len++; + c = FromUtf8(c, &curr->w_decodestate); + if (c == -1) + continue; + if (c == -2) + { + c = UCS_REPL; + /* try char again */ + buf--; + len++; + } + if (c > 0xff) + debug1("read UNICODE %04x\n", c); } - if (c > 0xff) - debug1("read UNICODE %04x\n", c); - } #endif - tryagain: - switch (curr->w_state) - { - case PRIN: - switch (c) + tryagain: + switch (curr->w_state) { - case '\033': - curr->w_state = PRINESC; - break; - default: - PrintChar(c); - } - break; - case PRINESC: - switch (c) - { - case '[': - curr->w_state = PRINCSI; + case PRIN: + switch (c) + { + case '\033': + curr->w_state = PRINESC; + break; + default: + PrintChar(c); + } break; - default: - PrintChar('\033'); - PrintChar(c); - curr->w_state = PRIN; - } - break; - case PRINCSI: - switch (c) - { - case '4': - curr->w_state = PRIN4; + case PRINESC: + switch (c) + { + case '[': + curr->w_state = PRINCSI; + break; + default: + PrintChar('\033'); + PrintChar(c); + curr->w_state = PRIN; + } break; - default: - PrintChar('\033'); - PrintChar('['); - PrintChar(c); - curr->w_state = PRIN; - } - break; - case PRIN4: - switch (c) - { - case 'i': - curr->w_state = LIT; - PrintFlush(); - if (curr->w_pdisplay && curr->w_pdisplay->d_printfd >= 0) + case PRINCSI: + switch (c) { - close(curr->w_pdisplay->d_printfd); - curr->w_pdisplay->d_printfd = -1; + case '4': + curr->w_state = PRIN4; + break; + default: + PrintChar('\033'); + PrintChar('['); + PrintChar(c); + curr->w_state = PRIN; } - curr->w_pdisplay = 0; break; - default: - PrintChar('\033'); - PrintChar('['); - PrintChar('4'); - PrintChar(c); - curr->w_state = PRIN; - } - break; - case ASTR: - if (c == 0) - break; - if (c == '\033') - { - curr->w_state = STRESC; + case PRIN4: + switch (c) + { + case 'i': + curr->w_state = LIT; + PrintFlush(); + if (curr->w_pdisplay && curr->w_pdisplay->d_printfd >= 0) + { + close(curr->w_pdisplay->d_printfd); + curr->w_pdisplay->d_printfd = -1; + } + curr->w_pdisplay = 0; + break; + default: + PrintChar('\033'); + PrintChar('['); + PrintChar('4'); + PrintChar(c); + curr->w_state = PRIN; + } break; - } - /* special xterm hack: accept SetStatus sequence. Yucc! */ - /* allow ^E for title escapes */ - if (!(curr->w_StringType == OSC && c < ' ' && c != '\005')) - if (!curr->w_c1 || c != ('\\' ^ 0xc0)) - { - StringChar(c); + case ASTR: + if (c == 0) break; - } - c = '\\'; - /* FALLTHROUGH */ - case STRESC: - switch (c) - { - case '\\': - if (StringEnd() == 0 || len <= 1) - break; - /* check if somewhere a status is displayed */ - for (cv = curr->w_layer.l_cvlist; cv; cv = cv->c_lnext) + if (c == '\033') { - display = cv->c_display; - if (D_status == STATUS_ON_WIN) - break; + curr->w_state = STRESC; + break; } - if (cv) + /* special xterm hack: accept SetStatus sequence. Yucc! */ + /* allow ^E for title escapes */ + if (!(curr->w_StringType == OSC && c < ' ' && c != '\005')) + if (!curr->w_c1 || c != ('\\' ^ 0xc0)) + { + StringChar(c); + break; + } + c = '\\'; + /* FALLTHROUGH */ + case STRESC: + switch (c) { - if (len > IOSIZE + 1) - len = IOSIZE + 1; - curr->w_outlen = len - 1; - bcopy(buf, curr->w_outbuf, len - 1); - return; /* wait till status is gone */ - } - break; - case '\033': - StringChar('\033'); - break; - default: - curr->w_state = ASTR; - StringChar('\033'); - StringChar(c); - break; - } - break; - case ESC: - switch (c) - { - case '[': - curr->w_NumArgs = 0; - curr->w_intermediate = 0; - bzero((char *) curr->w_args, MAXARGS * sizeof(int)); - curr->w_state = CSI; - break; - case ']': - StringStart(OSC); - break; - case '_': - StringStart(APC); - break; - case 'P': - StringStart(DCS); - break; - case '^': - StringStart(PM); - break; - case '!': - StringStart(GM); - break; - case '"': - case 'k': - StringStart(AKA); - break; - default: - if (Special(c)) - { - curr->w_state = LIT; + case '\\': + if (StringEnd() == 0 || len <= 1) + break; + /* check if somewhere a status is displayed */ + for (cv = curr->w_layer.l_cvlist; cv; cv = cv->c_lnext) + { + display = cv->c_display; + if (D_status == STATUS_ON_WIN) + break; + } + if (cv) + { + if (len > IOSIZE + 1) + len = IOSIZE + 1; + curr->w_outlen = len - 1; + bcopy(buf, curr->w_outbuf, len - 1); + return; /* wait till status is gone */ + } + break; + case '\033': + StringChar('\033'); + break; + default: + curr->w_state = ASTR; + StringChar('\033'); + StringChar(c); break; } - debug1("not special. c = %x\n", c); - if (c >= ' ' && c <= '/') + break; + case ESC: + switch (c) { - if (curr->w_intermediate) + case '[': + curr->w_NumArgs = 0; + curr->w_intermediate = 0; + bzero((char *) curr->w_args, MAXARGS * sizeof(int)); + curr->w_state = CSI; + break; + case ']': + StringStart(OSC); + break; + case '_': + StringStart(APC); + break; + case 'P': + StringStart(DCS); + break; + case '^': + StringStart(PM); + break; + case '!': + StringStart(GM); + break; + case '"': + case 'k': + StringStart(AKA); + break; + default: + if (Special(c)) + { + curr->w_state = LIT; + break; + } + debug1("not special. c = %x\n", c); + if (c >= ' ' && c <= '/') { + if (curr->w_intermediate) + { #ifdef DW_CHARS - if (curr->w_intermediate == '$') - c |= '$' << 8; - else + if (curr->w_intermediate == '$') + c |= '$' << 8; + else #endif - c = -1; + c = -1; + } + curr->w_intermediate = c; + } + else if (c >= '0' && c <= '~') + { + DoESC(c, curr->w_intermediate); + curr->w_state = LIT; + } + else + { + curr->w_state = LIT; + goto tryagain; } - curr->w_intermediate = c; - } - else if (c >= '0' && c <= '~') - { - DoESC(c, curr->w_intermediate); - curr->w_state = LIT; - } - else - { - curr->w_state = LIT; - goto tryagain; - } - } - break; - case CSI: - switch (c) - { - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - if (curr->w_NumArgs < MAXARGS) - { - if (curr->w_args[curr->w_NumArgs] < 100000000) - curr->w_args[curr->w_NumArgs] = - 10 * curr->w_args[curr->w_NumArgs] + (c - '0'); } break; - case ';': - case ':': - if (curr->w_NumArgs < MAXARGS) - curr->w_NumArgs++; - break; - default: - if (Special(c)) - break; - if (c >= '@' && c <= '~') + case CSI: + switch (c) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (curr->w_NumArgs < MAXARGS) + { + if (curr->w_args[curr->w_NumArgs] < 100000000) + curr->w_args[curr->w_NumArgs] = + 10 * curr->w_args[curr->w_NumArgs] + (c - '0'); + } + break; + case ';': + case ':': if (curr->w_NumArgs < MAXARGS) curr->w_NumArgs++; - DoCSI(c, curr->w_intermediate); - if (curr->w_state != PRIN) - curr->w_state = LIT; - } - else if ((c >= ' ' && c <= '/') || (c >= '<' && c <= '?')) - curr->w_intermediate = curr->w_intermediate ? -1 : c; - else - { - curr->w_state = LIT; - goto tryagain; + break; + default: + if (Special(c)) + break; + if (c >= '@' && c <= '~') + { + if (curr->w_NumArgs < MAXARGS) + curr->w_NumArgs++; + DoCSI(c, curr->w_intermediate); + if (curr->w_state != PRIN) + curr->w_state = LIT; + } + else if ((c >= ' ' && c <= '/') || (c >= '<' && c <= '?')) + curr->w_intermediate = curr->w_intermediate ? -1 : c; + else + { + curr->w_state = LIT; + goto tryagain; + } } - } - break; - case LIT: - default: + break; + case LIT: + default: #ifdef DW_CHARS - if (curr->w_mbcs) - if (c <= ' ' || c == 0x7f || (c >= 0x80 && c < 0xa0 && curr->w_c1)) - curr->w_mbcs = 0; + if (curr->w_mbcs) + if (c <= ' ' || c == 0x7f || (c >= 0x80 && c < 0xa0 && curr->w_c1)) + curr->w_mbcs = 0; #endif - if (c < ' ') - { - if (c == '\033') + if (c < ' ') { - curr->w_intermediate = 0; - curr->w_state = ESC; - if (curr->w_autoaka < 0) - curr->w_autoaka = 0; + if (c == '\033') + { + curr->w_intermediate = 0; + curr->w_state = ESC; + if (curr->w_autoaka < 0) + curr->w_autoaka = 0; + } + else + Special(c); + break; } - else - Special(c); - break; - } - if (c >= 0x80 && c < 0xa0 && curr->w_c1) + if (c >= 0x80 && c < 0xa0 && curr->w_c1) #ifdef FONT - if ((curr->w_FontR & 0xf0) != 0x20 + if ((curr->w_FontR & 0xf0) != 0x20 # ifdef UTF8 - || curr->w_encoding == UTF8 + || curr->w_encoding == UTF8 # endif - ) + ) #endif - { - switch (c) { - case 0xc0 ^ 'D': - case 0xc0 ^ 'E': - case 0xc0 ^ 'H': - case 0xc0 ^ 'M': - case 0xc0 ^ 'N': /* SS2 */ - case 0xc0 ^ 'O': /* SS3 */ - DoESC(c ^ 0xc0, 0); - break; - case 0xc0 ^ '[': - if (curr->w_autoaka < 0) - curr->w_autoaka = 0; - curr->w_NumArgs = 0; - curr->w_intermediate = 0; - bzero((char *) curr->w_args, MAXARGS * sizeof(int)); - curr->w_state = CSI; - break; - case 0xc0 ^ 'P': - StringStart(DCS); - break; - default: + switch (c) + { + case 0xc0 ^ 'D': + case 0xc0 ^ 'E': + case 0xc0 ^ 'H': + case 0xc0 ^ 'M': + case 0xc0 ^ 'N': /* SS2 */ + case 0xc0 ^ 'O': /* SS3 */ + DoESC(c ^ 0xc0, 0); + break; + case 0xc0 ^ '[': + if (curr->w_autoaka < 0) + curr->w_autoaka = 0; + curr->w_NumArgs = 0; + curr->w_intermediate = 0; + bzero((char *) curr->w_args, MAXARGS * sizeof(int)); + curr->w_state = CSI; + break; + case 0xc0 ^ 'P': + StringStart(DCS); + break; + default: + break; + } break; } - break; - } #ifdef FONT # ifdef DW_CHARS - if (!curr->w_mbcs) - { + if (!curr->w_mbcs) + { # endif - if (c < 0x80 || curr->w_gr == 0) - curr->w_rend.font = curr->w_FontL; + if (c < 0x80 || curr->w_gr == 0) + curr->w_rend.font = curr->w_FontL; # ifdef ENCODINGS - else if (curr->w_gr == 2 && !curr->w_ss) - curr->w_rend.font = curr->w_FontE; + else if (curr->w_gr == 2 && !curr->w_ss) + curr->w_rend.font = curr->w_FontE; # endif - else - curr->w_rend.font = curr->w_FontR; + else + curr->w_rend.font = curr->w_FontR; # ifdef DW_CHARS - } + } # endif # ifdef UTF8 - if (curr->w_encoding == UTF8) - { - if (curr->w_rend.font == '0') + if (curr->w_encoding == UTF8) { - struct mchar mc, *mcp; + if (curr->w_rend.font == '0') + { + struct mchar mc, *mcp; - debug1("SPECIAL %x\n", c); - mc.image = c; - mc.mbcs = 0; - mc.font = '0'; - mcp = recode_mchar(&mc, 0, UTF8); - debug2("%02x %02x\n", mcp->image, mcp->font); - c = mcp->image | mcp->font << 8; + debug1("SPECIAL %x\n", c); + mc.image = c; + mc.mbcs = 0; + mc.font = '0'; + mcp = recode_mchar(&mc, 0, UTF8); + debug2("%02x %02x\n", mcp->image, mcp->font); + c = mcp->image | mcp->font << 8; + } + curr->w_rend.font = 0; } - curr->w_rend.font = 0; - } # ifdef DW_CHARS - if (curr->w_encoding == UTF8 && c >= 0x1100 && utf8_isdouble(c)) - curr->w_mbcs = 0xff; + if (curr->w_encoding == UTF8 && utf8_isdouble(c)) + curr->w_mbcs = 0xff; # endif - if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) - { - int ox, oy; - struct mchar omc; - - ox = curr->w_x - 1; - oy = curr->w_y; - if (ox < 0) - { - ox = curr->w_width - 1; - oy--; - } - if (oy < 0) - oy = 0; - copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); - if (omc.image == 0xff && omc.font == 0xff) + if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) { - ox--; + int ox, oy; + struct mchar omc; + + ox = curr->w_x - 1; + oy = curr->w_y; + if (ox < 0) + { + ox = curr->w_width - 1; + oy--; + } + if (oy < 0) + oy = 0; + copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); + if (omc.image == 0xff && omc.font == 0xff) + { + ox--; + if (ox >= 0) + { + copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); + omc.mbcs = 0xff; + } + } if (ox >= 0) { - copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); - omc.mbcs = 0xff; + utf8_handle_comb(c, &omc); + MFixLine(curr, oy, &omc); + copy_mchar2mline(&omc, &curr->w_mlines[oy], ox); + LPutChar(&curr->w_layer, &omc, ox, oy); + LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); } + break; } - if (ox >= 0) - { - utf8_handle_comb(c, &omc); - MFixLine(curr, oy, &omc); - copy_mchar2mline(&omc, &curr->w_mlines[oy], ox); - LPutChar(&curr->w_layer, &omc, ox, oy); - LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); - } - break; - } - font = curr->w_rend.font; + font = curr->w_rend.font; # endif # ifdef DW_CHARS # ifdef ENCODINGS - if (font == KANA && curr->w_encoding == SJIS && curr->w_mbcs == 0) - { - /* Lets see if it is the first byte of a kanji */ - debug1("%x may be first of SJIS\n", c); - if ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)) + if (font == KANA && curr->w_encoding == SJIS && curr->w_mbcs == 0) { - debug("YES!\n"); - curr->w_mbcs = c; - break; + /* Lets see if it is the first byte of a kanji */ + debug1("%x may be first of SJIS\n", c); + if ((0x81 <= c && c <= 0x9f) || (0xe0 <= c && c <= 0xef)) + { + debug("YES!\n"); + curr->w_mbcs = c; + break; + } } - } # endif - if (font == 031 && c == 0x80 && !curr->w_mbcs) - font = curr->w_rend.font = 0; - if (is_dw_font(font) && c == ' ') - font = curr->w_rend.font = 0; - if (is_dw_font(font) || curr->w_mbcs) - { - int t = c; - if (curr->w_mbcs == 0) - { - curr->w_mbcs = c; - break; - } - if (curr->w_x == cols - 1) + if (font == 031 && c == 0x80 && !curr->w_mbcs) + font = curr->w_rend.font = 0; + if (is_dw_font(font) && c == ' ') + font = curr->w_rend.font = 0; + if (is_dw_font(font) || curr->w_mbcs) { - curr->w_x += curr->w_wrap ? 1 : -1; - debug1("Patched w_x to %d\n", curr->w_x); - } + int t = c; + if (curr->w_mbcs == 0) + { + curr->w_mbcs = c; + break; + } + if (curr->w_x == cols - 1) + { + curr->w_x += curr->w_wrap ? 1 : -1; + debug1("Patched w_x to %d\n", curr->w_x); + } # ifdef UTF8 - if (curr->w_encoding != UTF8) + if (curr->w_encoding != UTF8) # endif - { - c = curr->w_mbcs; -# ifdef ENCODINGS - if (font == KANA && curr->w_encoding == SJIS) { - debug2("SJIS !! %x %x\n", c, t); - /* - * SJIS -> EUC mapping: - * First byte: - * 81,82...9f -> 21,23...5d - * e0,e1...ef -> 5f,61...7d - * Second byte: - * 40-7e -> 21-5f - * 80-9e -> 60-7e - * 9f-fc -> 21-7e (increment first byte!) - */ - if (0x40 <= t && t <= 0xfc && t != 0x7f) + c = curr->w_mbcs; +# ifdef ENCODINGS + if (font == KANA && curr->w_encoding == SJIS) { - if (c <= 0x9f) c = (c - 0x81) * 2 + 0x21; - else c = (c - 0xc1) * 2 + 0x21; - if (t <= 0x7e) t -= 0x1f; - else if (t <= 0x9e) t -= 0x20; - else t -= 0x7e, c++; - curr->w_rend.font = KANJI; + debug2("SJIS !! %x %x\n", c, t); + /* + * SJIS -> EUC mapping: + * First byte: + * 81,82...9f -> 21,23...5d + * e0,e1...ef -> 5f,61...7d + * Second byte: + * 40-7e -> 21-5f + * 80-9e -> 60-7e + * 9f-fc -> 21-7e (increment first byte!) + */ + if (0x40 <= t && t <= 0xfc && t != 0x7f) + { + if (c <= 0x9f) c = (c - 0x81) * 2 + 0x21; + else c = (c - 0xc1) * 2 + 0x21; + if (t <= 0x7e) t -= 0x1f; + else if (t <= 0x9e) t -= 0x20; + else t -= 0x7e, c++; + curr->w_rend.font = KANJI; + } + else + { + /* Incomplete shift-jis - skip first byte */ + c = t; + t = 0; + } + debug2("SJIS after %x %x\n", c, t); } - else +# endif + if (t && curr->w_gr && font != 030 && font != 031) { - /* Incomplete shift-jis - skip first byte */ - c = t; - t = 0; + t &= 0x7f; + if (t < ' ') + goto tryagain; } - debug2("SJIS after %x %x\n", c, t); + if (t == '\177') + break; + curr->w_mbcs = t; } -# endif - if (t && curr->w_gr && font != 030 && font != 031) - { - t &= 0x7f; - if (t < ' ') - goto tryagain; - } - if (t == '\177') - break; - curr->w_mbcs = t; } - } # endif /* DW_CHARS */ - if (font == '<' && c >= ' ') - { - font = curr->w_rend.font = 0; - c |= 0x80; - } + if (font == '<' && c >= ' ') + { + font = curr->w_rend.font = 0; + c |= 0x80; + } # ifdef UTF8 - else if (curr->w_gr && curr->w_encoding != UTF8) + else if (curr->w_gr && curr->w_encoding != UTF8) # else - else if (curr->w_gr) + else if (curr->w_gr) # endif - { + { #ifdef ENCODINGS - if (c == 0x80 && font == 0 && curr->w_encoding == GBK) - c = 0xa4; - else - c &= 0x7f; - if (c < ' ' && font != 031) - goto tryagain; + if (c == 0x80 && font == 0 && curr->w_encoding == GBK) + c = 0xa4; + else + c &= 0x7f; + if (c < ' ' && font != 031) + goto tryagain; #else - c &= 0x7f; - if (c < ' ') /* this is ugly but kanji support */ - goto tryagain; /* prevents nicer programming */ + c &= 0x7f; + if (c < ' ') /* this is ugly but kanji support */ + goto tryagain; /* prevents nicer programming */ #endif - } + } #endif /* FONT */ - if (c == '\177') - break; - curr->w_rend.image = c; + if (c == '\177') + break; + curr->w_rend.image = c; #ifdef UTF8 - if (curr->w_encoding == UTF8) - curr->w_rend.font = c >> 8; + if (curr->w_encoding == UTF8) + curr->w_rend.font = c >> 8; #endif #ifdef DW_CHARS - curr->w_rend.mbcs = curr->w_mbcs; + curr->w_rend.mbcs = curr->w_mbcs; #endif - if (curr->w_x < cols - 1) - { - if (curr->w_insert) + if (curr->w_x < cols - 1) { - save_mline(&curr->w_mlines[curr->w_y], cols); - MInsChar(curr, &curr->w_rend, curr->w_x, curr->w_y); - LInsChar(&curr->w_layer, &curr->w_rend, curr->w_x, curr->w_y, &mline_old); - curr->w_x++; + if (curr->w_insert) + { + save_mline(&curr->w_mlines[curr->w_y], cols); + MInsChar(curr, &curr->w_rend, curr->w_x, curr->w_y); + LInsChar(&curr->w_layer, &curr->w_rend, curr->w_x, curr->w_y, &mline_old); + curr->w_x++; + } + else + { + MPutChar(curr, &curr->w_rend, curr->w_x, curr->w_y); + LPutChar(&curr->w_layer, &curr->w_rend, curr->w_x, curr->w_y); + curr->w_x++; + } } - else + else if (curr->w_x == cols - 1) { MPutChar(curr, &curr->w_rend, curr->w_x, curr->w_y); LPutChar(&curr->w_layer, &curr->w_rend, curr->w_x, curr->w_y); - curr->w_x++; + if (curr->w_wrap) + curr->w_x++; + } + else + { + MWrapChar(curr, &curr->w_rend, curr->w_y, curr->w_top, curr->w_bot, curr->w_insert); + LWrapChar(&curr->w_layer, &curr->w_rend, curr->w_y, curr->w_top, curr->w_bot, curr->w_insert); + if (curr->w_y != curr->w_bot && curr->w_y != curr->w_height - 1) + curr->w_y++; + curr->w_x = 1; } - } - else if (curr->w_x == cols - 1) - { - MPutChar(curr, &curr->w_rend, curr->w_x, curr->w_y); - LPutChar(&curr->w_layer, &curr->w_rend, curr->w_x, curr->w_y); - if (curr->w_wrap) - curr->w_x++; - } - else - { - MWrapChar(curr, &curr->w_rend, curr->w_y, curr->w_top, curr->w_bot, curr->w_insert); - LWrapChar(&curr->w_layer, &curr->w_rend, curr->w_y, curr->w_top, curr->w_bot, curr->w_insert); - if (curr->w_y != curr->w_bot && curr->w_y != curr->w_height - 1) - curr->w_y++; - curr->w_x = 1; - } #ifdef FONT # ifdef DW_CHARS - if (curr->w_mbcs) - { - curr->w_rend.mbcs = curr->w_mbcs = 0; - curr->w_x++; - } + if (curr->w_mbcs) + { + curr->w_rend.mbcs = curr->w_mbcs = 0; + curr->w_x++; + } # endif - if (curr->w_ss) - { - curr->w_FontL = curr->w_charsets[curr->w_Charset]; - curr->w_FontR = curr->w_charsets[curr->w_CharsetR]; - curr->w_rend.font = curr->w_FontL; - LSetRendition(&curr->w_layer, &curr->w_rend); - curr->w_ss = 0; - } + if (curr->w_ss) + { + curr->w_FontL = curr->w_charsets[curr->w_Charset]; + curr->w_FontR = curr->w_charsets[curr->w_CharsetR]; + curr->w_rend.font = curr->w_FontL; + LSetRendition(&curr->w_layer, &curr->w_rend); + curr->w_ss = 0; + } #endif /* FONT */ - break; + break; + } } + while (--len); } - while (--len); if (!printcmd && curr->w_state == PRIN) PrintFlush(); } @@ -930,6 +940,7 @@ case '\n': if (curr->w_autoaka) FindAKA(); + case '\013': /* Vertical tab is the same as Line Feed */ LineFeed(0); return 1; case '\007': @@ -976,10 +987,10 @@ Report("\033[?%d;%dc", 1, 2); break; case '7': - SaveCursor(); + SaveCursor(&curr->w_saved); break; case '8': - RestoreCursor(); + RestoreCursor(&curr->w_saved); break; case 'c': ClearScreen(); @@ -1222,24 +1233,48 @@ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); break; case 's': - SaveCursor(); + SaveCursor(&curr->w_saved); break; case 't': - if (a1 != 8) - break; - a1 = curr->w_args[2]; - if (a1 < 1) - a1 = curr->w_width; - if (a2 < 1) - a2 = curr->w_height; - if (a1 > 10000 || a2 > 10000) - break; - WChangeSize(curr, a1, a2); - cols = curr->w_width; - rows = curr->w_height; + switch(a1) + { + case 11: + if (curr->w_layer.l_cvlist) + Report("\033[1t", 0, 0); + else + Report("\033[2t", 0, 0); + break; + case 7: + LRefreshAll(&curr->w_layer, 0); + break; + case 21: + a1 = strlen(curr->w_title); + if ((unsigned)(curr->w_inlen + 5 + a1) <= sizeof(curr->w_inbuf)) + { + bcopy("\033]l", curr->w_inbuf + curr->w_inlen, 3); + bcopy(curr->w_title, curr->w_inbuf + curr->w_inlen + 3, a1); + bcopy("\033\\", curr->w_inbuf + curr->w_inlen + 3 + a1, 2); + curr->w_inlen += 5 + a1; + } + break; + case 8: + a1 = curr->w_args[2]; + if (a1 < 1) + a1 = curr->w_width; + if (a2 < 1) + a2 = curr->w_height; + if (a1 > 10000 || a2 > 10000) + break; + WChangeSize(curr, a1, a2); + cols = curr->w_width; + rows = curr->w_height; + break; + default: + break; + } break; case 'u': - RestoreCursor(); + RestoreCursor(&curr->w_saved); break; case 'I': if (!a1) @@ -1330,7 +1365,7 @@ break; # endif curr->w_charsets[0] = curr->w_charsets[1] = - curr->w_charsets[2] = curr->w_charsets[2] = + curr->w_charsets[2] = curr->w_charsets[3] = curr->w_FontL = curr->w_FontR = ASCII; curr->w_Charset = 0; curr->w_CharsetR = 2; @@ -1340,6 +1375,9 @@ break; case 3: /* COLM: column mode */ i = (i ? Z0width : Z1width); + ClearScreen(); + curr->w_x = 0; + curr->w_y = 0; WChangeSize(curr, i, curr->w_height); cols = curr->w_width; rows = curr->w_height; @@ -1393,15 +1431,28 @@ if (use_altscreen) { if (i) - EnterAltScreen(curr); + { + if (!curr->w_alt.on) + SaveCursor(&curr->w_alt.cursor); + EnterAltScreen(curr); + } else - LeaveAltScreen(curr); + { + LeaveAltScreen(curr); + RestoreCursor(&curr->w_alt.cursor); + } if (a1 == 47 && !i) - curr->w_saved = 0; + curr->w_saved.on = 0; LRefreshAll(&curr->w_layer, 0); LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); } break; + case 1048: + if (i) + SaveCursor(&curr->w_saved); + else + RestoreCursor(&curr->w_saved); + break; /* case 66: NKM: Numeric keypad appl mode */ /* case 68: KBUM: Keyboard usage mode (data process) */ case 1000: /* VT200 mouse tracking */ @@ -1496,7 +1547,7 @@ } #endif #ifdef RXVT_OSC - if (typ == 0 || typ == 1 || typ == 20 || typ == 39 || typ == 49) + if (typ == 0 || typ == 1 || typ == 2 || typ == 20 || typ == 39 || typ == 49) { int typ2; typ2 = typ / 10; @@ -1506,7 +1557,7 @@ { strncpy(curr->w_xtermosc[typ2], p, sizeof(curr->w_xtermosc[typ2]) - 1); curr->w_xtermosc[typ2][sizeof(curr->w_xtermosc[typ2]) - 1] = 0; - + for (display = displays; display; display = display->d_next) { if (!D_CXT) @@ -1640,7 +1691,7 @@ AddCStr(D_PO); AddStrn(curr->w_string, curr->w_stringp - curr->w_string); AddCStr(D_PF); - Flush(); + Flush(3); } curr->w_stringp = curr->w_string; } @@ -1717,34 +1768,36 @@ #endif /* FONT */ static void -SaveCursor() +SaveCursor(cursor) +struct cursor *cursor; { - curr->w_saved = 1; - curr->w_Saved_x = curr->w_x; - curr->w_Saved_y = curr->w_y; - curr->w_SavedRend = curr->w_rend; -#ifdef FONT - curr->w_SavedCharset = curr->w_Charset; - curr->w_SavedCharsetR = curr->w_CharsetR; - bcopy((char *) curr->w_charsets, (char *) curr->w_SavedCharsets, + cursor->on = 1; + cursor->x = curr->w_x; + cursor->y = curr->w_y; + cursor->Rend = curr->w_rend; +#ifdef FONT + cursor->Charset = curr->w_Charset; + cursor->CharsetR = curr->w_CharsetR; + bcopy((char *) curr->w_charsets, (char *) cursor->Charsets, 4 * sizeof(int)); #endif } static void -RestoreCursor() +RestoreCursor(cursor) +struct cursor *cursor; { - if (!curr->w_saved) + if (!cursor->on) return; - LGotoPos(&curr->w_layer, curr->w_Saved_x, curr->w_Saved_y); - curr->w_x = curr->w_Saved_x; - curr->w_y = curr->w_Saved_y; - curr->w_rend = curr->w_SavedRend; + LGotoPos(&curr->w_layer, cursor->x, cursor->y); + curr->w_x = cursor->x; + curr->w_y = cursor->y; + curr->w_rend = cursor->Rend; #ifdef FONT - bcopy((char *) curr->w_SavedCharsets, (char *) curr->w_charsets, + bcopy((char *) cursor->Charsets, (char *) curr->w_charsets, 4 * sizeof(int)); - curr->w_Charset = curr->w_SavedCharset; - curr->w_CharsetR = curr->w_SavedCharsetR; + curr->w_Charset = cursor->Charset; + curr->w_CharsetR = cursor->CharsetR; curr->w_ss = 0; curr->w_FontL = curr->w_charsets[curr->w_Charset]; curr->w_FontR = curr->w_charsets[curr->w_CharsetR]; @@ -2268,10 +2321,23 @@ sprintf(rbuf, fmt, n1, n2); len = strlen(rbuf); - if ((unsigned)(curr->w_inlen + len) <= sizeof(curr->w_inbuf)) +#ifdef PSEUDOS + if (W_UWP(curr)) { - bcopy(rbuf, curr->w_inbuf + curr->w_inlen, len); - curr->w_inlen += len; + if ((unsigned)(curr->w_pwin->p_inlen + len) <= sizeof(curr->w_pwin->p_inbuf)) + { + bcopy(rbuf, curr->w_pwin->p_inbuf + curr->w_pwin->p_inlen, len); + curr->w_pwin->p_inlen += len; + } + } + else +#endif + { + if ((unsigned)(curr->w_inlen + len) <= sizeof(curr->w_inbuf)) + { + bcopy(rbuf, curr->w_inbuf + curr->w_inlen, len); + curr->w_inlen += len; + } } } @@ -2297,18 +2363,17 @@ struct mline *ml = &p->w_mlines[y]; if (mc->attr && ml->attr == null) { - if ((ml->attr = (unsigned char *)malloc(p->w_width + 1)) == 0) + if ((ml->attr = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) { ml->attr = null; mc->attr = p->w_rend.attr = 0; WMsg(p, 0, "Warning: no space for attr - turned off"); } - bzero((char *)ml->attr, p->w_width + 1); } #ifdef FONT if (mc->font && ml->font == null) { - if ((ml->font = (unsigned char *)malloc(p->w_width + 1)) == 0) + if ((ml->font = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) { ml->font = null; p->w_FontL = p->w_charsets[p->w_ss ? p->w_ss : p->w_Charset] = 0; @@ -2316,30 +2381,27 @@ mc->font = p->w_rend.font = 0; WMsg(p, 0, "Warning: no space for font - turned off"); } - bzero((char *)ml->font, p->w_width + 1); } #endif #ifdef COLOR if (mc->color && ml->color == null) { - if ((ml->color = (unsigned char *)malloc(p->w_width + 1)) == 0) + if ((ml->color = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) { ml->color = null; mc->color = p->w_rend.color = 0; WMsg(p, 0, "Warning: no space for color - turned off"); } - bzero((char *)ml->color, p->w_width + 1); } # ifdef COLORS256 if (mc->colorx && ml->colorx == null) { - if ((ml->colorx = (unsigned char *)malloc(p->w_width + 1)) == 0) + if ((ml->colorx = (unsigned char *)calloc(p->w_width + 1, 1)) == 0) { ml->colorx = null; mc->colorx = p->w_rend.colorx = 0; WMsg(p, 0, "Warning: no space for extended colors - turned off"); } - bzero((char *)ml->colorx, p->w_width + 1); } # endif #endif @@ -2556,6 +2618,10 @@ int xxe; struct mline *ml; + /* Check for zero-height window */ + if (ys < 0 || ye < ys) + return; + /* check for magic margin condition */ if (xs >= p->w_width) xs = p->w_width - 1; @@ -2836,6 +2902,8 @@ int visual; { struct canvas *cv; + if (displays == NULL) + p->w_bell = BELL_DONE; for (display = displays; display; display = display->d_next) { for (cv = D_cvlist; cv; cv = cv->c_next) @@ -2888,7 +2956,7 @@ extern struct layer *flayer; struct layer *oldflayer = flayer; flayer = &p->w_layer; - LMsg(err, str); + LMsg(err, "%s", str); flayer = oldflayer; } @@ -2953,6 +3021,8 @@ if (*s++ != (hp ? '%' : '\005')) continue; l = 0; + s += (*s == '+'); + s += (*s == '-'); while (*s >= '0' && *s <= '9') s++; if (*s == 'L') @@ -3021,7 +3091,7 @@ p = D_fore; if (inhstr || (inhstrh && p && p->w_hstatus && *p->w_hstatus && WindowChangedCheck(p->w_hstatus, what, (int *)0))) RefreshHStatus(); - if (ox != -1 && ox != -1) + if (ox != -1 && oy != -1) GotoPos(ox, oy); } display = olddisplay; @@ -3053,7 +3123,7 @@ } if (got && inhstr && p == D_fore) RefreshHStatus(); - if (ox != -1 && ox != -1) + if (ox != -1 && oy != -1) GotoPos(ox, oy); } display = olddisplay; diff -Nru screen-4.0.3/ansi.h screen-4.1.0~20120320gitdb59704/ansi.h --- screen-4.0.3/ansi.h 2003-02-24 16:55:08.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/ansi.h 2011-10-04 22:32:21.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,12 +19,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** - * $Id: ansi.h,v 1.6 1994/05/31 12:31:28 mlschroe Exp $ FAU + * $Id$ GNU */ #define NATTR 6 diff -Nru screen-4.0.3/attacher.c screen-4.1.0~20120320gitdb59704/attacher.c --- screen-4.0.3/attacher.c 2003-09-08 14:24:48.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/attacher.c 2011-12-02 21:28:54.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,19 +19,19 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ +#include "config.h" #include #include #include #include #include -#include "config.h" #include "screen.h" #include "extern.h" @@ -46,18 +51,17 @@ #ifdef DEBUG static sigret_t AttacherChld __P(SIGPROTOARG); #endif -#ifdef MULTIUSER static sigret_t AttachSigCont __P(SIGPROTOARG); -#endif extern int real_uid, real_gid, eff_uid, eff_gid; extern char *SockName, *SockMatch, SockPath[]; +extern char HostName[]; extern struct passwd *ppp; extern char *attach_tty, *attach_term, *LoginName, *preselect; extern int xflag, dflag, rflag, quietflag, adaptflag; extern struct mode attach_Mode; extern struct NewWindow nwin_options; -extern int MasterPid; +extern int MasterPid, attach_fd; #ifdef MULTIUSER extern char *multi; @@ -69,7 +73,6 @@ #endif -#ifdef MULTIUSER static int ContinuePlease; static sigret_t @@ -79,14 +82,31 @@ ContinuePlease = 1; SIGRETURN; } -#endif +static int QueryResult; + +static sigret_t +QueryResultSuccess SIGDEFARG +{ + QueryResult = 1; + SIGRETURN; +} + +static sigret_t +QueryResultFail SIGDEFARG +{ + QueryResult = 2; + SIGRETURN; +} /* * Send message to a screen backend. * returns 1 if we could attach one, or 0 if none. * Understands MSG_ATTACH, MSG_DETACH, MSG_POW_DETACH * MSG_CONT, MSG_WINCH and nothing else! + * + * if type == MSG_ATTACH and sockets are used, attaches + * tty filedescriptor. */ static int @@ -96,6 +116,11 @@ { int r, l = sizeof(*m); +#ifndef NAMEDPIPE + if (m->type == MSG_ATTACH) + return SendAttachMsg(s, m, attach_fd); +#endif + while(l > 0) { r = write(s, (char *)m + (sizeof(*m) - l), l); @@ -184,8 +209,13 @@ { real_uid = multi_uid; eff_uid = own_uid; +#ifdef HAVE_SETRESUID + if (setresuid(multi_uid, own_uid, multi_uid)) + Panic(errno, "setresuid"); +#else xseteuid(multi_uid); xseteuid(own_uid); +#endif if (chmod(attach_tty, 0666)) Panic(errno, "chmod %s", attach_tty); tty_oldmode = tty_mode; @@ -293,7 +323,7 @@ Panic(0, "That screen is %sdetached.", dflag ? "already " : "not "); #ifdef REMOTE_DETACH if (dflag && - (how == MSG_ATTACH || how == MSG_DETACH || how == MSG_POW_DETACH)) + (how == MSG_DETACH || how == MSG_POW_DETACH)) { m.m.detach.dpid = getpid(); strncpy(m.m.detach.duser, LoginName, sizeof(m.m.detach.duser) - 1); @@ -304,9 +334,16 @@ else # endif m.type = MSG_DETACH; + /* If there is no password for the session, or the user enters the correct + * password, then we get a SIGCONT. Otherwise we get a SIG_BYE */ + signal(SIGCONT, AttachSigCont); if (WriteMessage(lasts, &m)) Panic(errno, "WriteMessage"); close(lasts); + while (!ContinuePlease) + pause(); /* wait for SIGCONT */ + signal(SIGCONT, SIG_DFL); + ContinuePlease = 0; if (how != MSG_ATTACH) return 0; /* we detached it. jw. */ sleep(1); /* we dont want to overrun our poor backend. jw. */ @@ -335,6 +372,18 @@ m.m.attach.columns = atoi(s); m.m.attach.encoding = nwin_options.encoding > 0 ? nwin_options.encoding + 1 : 0; +#ifdef REMOTE_DETACH +#ifdef POW_DETACH + if (dflag == 2) + m.m.attach.detachfirst = MSG_POW_DETACH; + else +#endif + if (dflag) + m.m.attach.detachfirst = MSG_DETACH; + else +#endif + m.m.attach.detachfirst = MSG_ATTACH; + #ifdef MULTIUSER /* setup CONT signal handler to repair the terminal mode */ if (multi && (how == MSG_ATTACH || how == MSG_CONT)) @@ -369,9 +418,7 @@ } -#if defined(DEBUG) || !defined(DO_NOT_POLL_MASTER) static int AttacherPanic = 0; -#endif #ifdef DEBUG static sigret_t @@ -406,7 +453,7 @@ } /* - * Unfortunatelly this is also the SIGHUP handler, so we have to + * Unfortunately this is also the SIGHUP handler, so we have to * check if the backend is already detached. */ @@ -561,7 +608,6 @@ #endif for (;;) { -#ifndef DO_NOT_POLL_MASTER signal(SIGALRM, AttacherSigAlarm); alarm(15); pause(); @@ -571,10 +617,6 @@ debug1("attacher: Panic! MasterPid %d does not exist.\n", MasterPid); AttacherPanic++; } -#else - pause(); -#endif -#if defined(DEBUG) || !defined(DO_NOT_POLL_MASTER) if (AttacherPanic) { fcntl(0, F_SETFL, 0); @@ -582,7 +624,6 @@ printf("\nSuddenly the Dungeon collapses!! - You die...\n"); eexit(1); } -#endif #ifdef BSDJOBS if (SuspendPlease) { @@ -715,7 +756,7 @@ debug2("Lock: %s: return code %d\n", prg, WEXITSTATUS(wstat)); } else - printf(LockEnd); + printf("%s", LockEnd); } } else @@ -859,8 +900,8 @@ *cp1 -= 'a' - 'A'; } - sprintf(message, "Screen used by %s <%s>.\nPassword:\007", - fullname, ppp->pw_name); + sprintf(message, "Screen used by %s%s<%s> on %s.\nPassword:\007", + fullname, fullname[0] ? " " : "", ppp->pw_name, HostName); /* loop here to wait for correct password */ for (;;) @@ -897,10 +938,11 @@ void -SendCmdMessage(sty, match, av) +SendCmdMessage(sty, match, av, query) char *sty; char *match; char **av; +int query; { int i, s; struct msg m; @@ -928,7 +970,7 @@ exit(1); } bzero((char *)&m, sizeof(m)); - m.type = MSG_COMMAND; + m.type = query ? MSG_QUERY : MSG_COMMAND; if (attach_tty) { strncpy(m.m_tty, attach_tty, sizeof(m.m_tty) - 1); @@ -953,7 +995,59 @@ m.m.command.preselect[sizeof(m.m.command.preselect) - 1] = 0; m.m.command.apid = getpid(); debug1("SendCommandMsg writing '%s'\n", m.m.command.cmd); - if (WriteMessage(s, &m)) - Msg(errno, "write"); - close(s); + if (query) + { + /* Create a server socket so we can get back the result */ + char *sp = SockPath + strlen(SockPath); + char query[] = "-queryX"; + char c; + int r = -1; + for (c = 'A'; c <= 'Z'; c++) + { + query[6] = c; + strcpy(sp, query); /* XXX: strncpy? */ + if ((r = MakeServerSocket()) >= 0) + break; + } + if (r < 0) + { + for (c = '0'; c <= '9'; c++) + { + query[6] = c; + strcpy(sp, query); + if ((r = MakeServerSocket()) >= 0) + break; + } + } + + if (r < 0) + Panic(0, "Could not create a listening socket to read the results."); + + strncpy(m.m.command.writeback, SockPath, sizeof(m.m.command.writeback) - 1); + m.m.command.writeback[sizeof(m.m.command.writeback) - 1] = '\0'; + + /* Send the message, then wait for a response */ + signal(SIGCONT, QueryResultSuccess); + signal(SIG_BYE, QueryResultFail); + if (WriteMessage(s, &m)) + Msg(errno, "write"); + close(s); + while (!QueryResult) + pause(); + signal(SIGCONT, SIG_DFL); + signal(SIG_BYE, SIG_DFL); + + /* Read the result and spit it out to stdout */ + ReceiveRaw(r); + unlink(SockPath); + if (QueryResult == 2) /* An error happened */ + exit(1); + } + else + { + if (WriteMessage(s, &m)) + Msg(errno, "write"); + close(s); + } } + diff -Nru screen-4.0.3/autogen.sh screen-4.1.0~20120320gitdb59704/autogen.sh --- screen-4.0.3/autogen.sh 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/autogen.sh 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +exec autoreconf diff -Nru screen-4.0.3/braille.c screen-4.1.0~20120320gitdb59704/braille.c --- screen-4.0.3/braille.c 2003-09-08 14:24:53.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/braille.c 2011-10-04 22:32:21.000000000 +0000 @@ -9,7 +9,7 @@ * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -18,9 +18,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ @@ -388,7 +388,7 @@ else { AddCStr(D_BL); - Flush(); + Flush(0); } } diff -Nru screen-4.0.3/braille.h screen-4.1.0~20120320gitdb59704/braille.h --- screen-4.0.3/braille.h 2001-04-28 13:26:42.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/braille.h 2011-10-04 22:32:21.000000000 +0000 @@ -8,7 +8,7 @@ * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -17,12 +17,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** - * $Id: braille.h,v 1.1 1995/09/06 15:51:18 jnweiger Exp jnweiger $ FAU + * $Id$ GNU */ #ifdef HAVE_BRAILLE diff -Nru screen-4.0.3/braille_tsi.c screen-4.1.0~20120320gitdb59704/braille_tsi.c --- screen-4.0.3/braille_tsi.c 2003-09-08 14:25:03.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/braille_tsi.c 2011-10-04 22:32:21.000000000 +0000 @@ -10,7 +10,7 @@ * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -19,9 +19,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ diff -Nru screen-4.0.3/canvas.c screen-4.1.0~20120320gitdb59704/canvas.c --- screen-4.0.3/canvas.c 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/canvas.c 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,916 @@ +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Copyright (c) 1987 Oliver Laumann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + **************************************************************** + */ + +#include "config.h" +#include "screen.h" +#include "extern.h" +#include "canvas.h" +#include "list_generic.h" + +extern struct display *display; +extern struct win *fore, *windows; +extern struct layer *flayer; +extern int captionalways; +extern struct LayFuncs BlankLf; +extern int focusminwidth, focusminheight; + +static void +CanvasInitBlank(cv) +struct canvas *cv; +{ + cv->c_blank.l_cvlist = cv; + cv->c_blank.l_width = cv->c_xe - cv->c_xs + 1; + cv->c_blank.l_height = cv->c_ye - cv->c_ys + 1; + cv->c_blank.l_x = cv->c_blank.l_y = 0; + cv->c_blank.l_layfn = &BlankLf; + cv->c_blank.l_data = 0; + cv->c_blank.l_next = 0; + cv->c_blank.l_bottom = &cv->c_blank; + cv->c_blank.l_blocking = 0; + cv->c_layer = &cv->c_blank; +} + +static void +FreePerp(pcv) +struct canvas *pcv; +{ + struct canvas *cv; + + if (!pcv->c_slperp) + return; + cv = pcv->c_slperp; + cv->c_slprev = pcv->c_slprev; + if (cv->c_slprev) + cv->c_slprev->c_slnext = cv; + cv->c_slback = pcv->c_slback; + if (cv->c_slback && cv->c_slback->c_slperp == pcv) + cv->c_slback->c_slperp = cv; + cv->c_slorient = pcv->c_slorient; + cv->c_slweight = pcv->c_slweight; + while (cv->c_slnext) + { + cv = cv->c_slnext; + cv->c_slorient = pcv->c_slorient; + cv->c_slback = pcv->c_slback; + cv->c_slweight = pcv->c_slweight; + } + cv->c_slnext = pcv->c_slnext; + if (cv->c_slnext) + cv->c_slnext->c_slprev = cv; + LayerCleanupMemory(&pcv->c_blank); + free(pcv); +} + +void +FreeCanvas(cv) +struct canvas *cv; +{ + struct viewport *vp, *nvp; + struct canvas **cvp; + struct win *p; + + if (cv->c_slprev) + cv->c_slprev->c_slnext = cv->c_slnext; + if (cv->c_slnext) + cv->c_slnext->c_slprev = cv->c_slprev; + if (cv->c_slback && cv->c_slback->c_slperp == cv) + cv->c_slback->c_slperp = cv->c_slnext ? cv->c_slnext : cv->c_slprev; + if (cv->c_slperp) + { + while (cv->c_slperp) + FreeCanvas(cv->c_slperp); + LayerCleanupMemory(&cv->c_blank); + free(cv); + return; + } + + if (display) + { + if (D_forecv == cv) + D_forecv = 0; + /* remove from canvas chain as SetCanvasWindow might call + * some layer function */ + for (cvp = &D_cvlist; *cvp ; cvp = &(*cvp)->c_next) + if (*cvp == cv) + { + *cvp = cv->c_next; + break; + } + } + p = cv->c_layer ? Layer2Window(cv->c_layer) : 0; + SetCanvasWindow(cv, 0); + if (p) + WindowChanged(p, 'u'); + if (flayer == cv->c_layer) + flayer = 0; + for (vp = cv->c_vplist; vp; vp = nvp) + { + vp->v_canvas = 0; + nvp = vp->v_next; + vp->v_next = 0; + free(vp); + } + evdeq(&cv->c_captev); + LayerCleanupMemory(&cv->c_blank); + free(cv); +} + +int +CountCanvas(cv) +struct canvas *cv; +{ + int num = 0; + for (; cv; cv = cv->c_slnext) + { + if (cv->c_slperp) + { + struct canvas *cvp; + int nump = 1, n; + for (cvp = cv->c_slperp; cvp; cvp = cvp->c_slnext) + if (cvp->c_slperp) + { + n = CountCanvas(cvp->c_slperp); + if (n > nump) + nump = n; + } + num += nump; + } + else + num++; + } + return num; +} + +int +CountCanvasPerp(cv) +struct canvas *cv; +{ + struct canvas *cvp; + int num = 1, n; + for (cvp = cv->c_slperp; cvp; cvp = cvp->c_slnext) + if (cvp->c_slperp) + { + n = CountCanvas(cvp->c_slperp); + if (n > num) + num = n; + } + return num; +} + +struct canvas * +FindCanvas(x, y) +int x, y; +{ + struct canvas *cv, *mcv = 0; + int m, mm = 0; + + for (cv = D_cvlist; cv; cv = cv->c_next) + { + /* ye + 1 because of caption line */ + if (x >= cv->c_xs && x <= cv->c_xe && y >= cv->c_ys && y <= cv->c_ye + 1) + return cv; + if (cv == D_forecv) + continue; + m = 0; + if (x >= D_forecv->c_xs && x <= D_forecv->c_xe) + { + if (x < cv->c_xs || x > cv->c_xe) + continue; + if (y < D_forecv->c_ys && y < cv->c_ys) + continue; + if (y > D_forecv->c_ye + 1 && y > cv->c_ye + 1) + continue; + if (y < cv->c_ys) + m = cv->c_ys - y; + if (y > cv->c_ye + 1) + m = y - (cv->c_ye + 1); + } + if (y >= D_forecv->c_ys && y <= D_forecv->c_ye + 1) + { + if (y < cv->c_ys || y > cv->c_ye + 1) + continue; + if (x < D_forecv->c_xs && x < cv->c_xs) + continue; + if (x > D_forecv->c_xe && x > cv->c_xe) + continue; + if (x < cv->c_xs) + m = cv->c_xs - x; + if (x > cv->c_xe) + m = x - cv->c_xe; + } + if (m && (!mm || m < mm)) + { + mcv = cv; + mm = m; + } + } + return mcv ? mcv : D_forecv; +} + +void +SetCanvasWindow(cv, wi) +struct canvas *cv; +struct win *wi; +{ + struct win *p = 0, **pp; + struct layer *l; + struct canvas *cvp, **cvpp; + + l = cv->c_layer; + display = cv->c_display; + + if (l) + { + /* remove old layer */ + for (cvpp = &l->l_cvlist; (cvp = *cvpp); cvpp = &cvp->c_lnext) + if (cvp == cv) + break; + ASSERT(cvp); + *cvpp = cvp->c_lnext; + + p = Layer2Window(l); + l = cv->c_layer; + cv->c_layer = 0; + + if (p && cv == D_forecv) + { +#ifdef MULTIUSER + ReleaseAutoWritelock(display, p); +#endif + if (p->w_silence) + { + SetTimeout(&p->w_silenceev, p->w_silencewait * 1000); + evenq(&p->w_silenceev); + } + D_other = fore; + D_fore = 0; + } + if (l->l_cvlist == 0 && (p == 0 || l != p->w_savelayer)) + KillLayerChain(l); + } + + /* find right layer to display on canvas */ + if (wi && wi->w_type != W_TYPE_GROUP) + { + l = &wi->w_layer; + if (wi->w_savelayer && (wi->w_blocked || wi->w_savelayer->l_cvlist == 0)) + l = wi->w_savelayer; + } + else + { + l = &cv->c_blank; + if (wi) + l->l_data = (char *)wi; + else + l->l_data = 0; + } + + /* add our canvas to the layer's canvaslist */ + ASSERT(l->l_cvlist != cv); + cv->c_lnext = l->l_cvlist; + l->l_cvlist = cv; + cv->c_layer = l; + cv->c_xoff = cv->c_xs; + cv->c_yoff = cv->c_ys; + RethinkViewportOffsets(cv); + + if (flayer == 0) + flayer = l; + + if (wi && wi->w_type == W_TYPE_GROUP) + { + /* auto-start windowlist on groups */ + struct display *d = display; + struct layer *oldflayer = flayer; + flayer = l; + display_windows(0, 0, wi); + flayer = oldflayer; + display = d; + } + + if (wi && D_other == wi) + D_other = wi->w_next; /* Might be 0, but that's OK. */ + if (cv == D_forecv) + { + D_fore = wi; + fore = D_fore; /* XXX ? */ + if (wi) + { +#ifdef MULTIUSER + ObtainAutoWritelock(display, wi); +#endif + /* + * Place the window at the head of the most-recently-used list + */ + if (windows != wi) + { + for (pp = &windows; (p = *pp); pp = &p->w_next) + if (p == wi) + break; + ASSERT(p); + *pp = p->w_next; + p->w_next = windows; + windows = p; + WListLinkChanged(); + } + } + } +} + +static void +cv_winid_fn(ev, data) +struct event *ev; +char *data; +{ + int ox, oy; + struct canvas *cv = (struct canvas *)data; + + display = cv->c_display; + if (D_status == STATUS_ON_WIN) + { + SetTimeout(ev, 1); + evenq(ev); + return; + } + ox = D_x; + oy = D_y; + if (cv->c_ye + 1 < D_height) + RefreshLine(cv->c_ye + 1, 0, D_width - 1, 0); + if (ox != -1 && oy != -1) + GotoPos(ox, oy); +} + +int +MakeDefaultCanvas() +{ + struct canvas *cv; + + ASSERT(display); + if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + return -1; + cv->c_xs = 0; + cv->c_xe = D_width - 1; + cv->c_ys = 0; + cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; + debug2("MakeDefaultCanvas 0,0 %d,%d\n", cv->c_xe, cv->c_ye); + cv->c_xoff = 0; + cv->c_yoff = 0; + cv->c_next = 0; + cv->c_display = display; + cv->c_vplist = 0; + cv->c_slnext = 0; + cv->c_slprev = 0; + cv->c_slperp = 0; + cv->c_slweight = 1; + cv->c_slback = &D_canvas; + D_canvas.c_slperp = cv; + D_canvas.c_xs = cv->c_xs; + D_canvas.c_xe = cv->c_xe; + D_canvas.c_ys = cv->c_ys; + D_canvas.c_ye = cv->c_ye; + cv->c_slorient = SLICE_UNKN; + cv->c_captev.type = EV_TIMEOUT; + cv->c_captev.data = (char *)cv; + cv->c_captev.handler = cv_winid_fn; + + CanvasInitBlank(cv); + cv->c_lnext = 0; + + D_cvlist = cv; + RethinkDisplayViewports(); + D_forecv = cv; /* default input focus */ + return 0; +} + +static struct canvas ** +CreateCanvasChainRec(cv, cvp) +struct canvas *cv; +struct canvas **cvp; +{ + for (; cv; cv = cv->c_slnext) + { + if (cv->c_slperp) + cvp = CreateCanvasChainRec(cv->c_slperp, cvp); + else + { + *cvp = cv; + cvp = &cv->c_next; + } + } + return cvp; +} + +void +RecreateCanvasChain() +{ + struct canvas **cvp; + cvp = CreateCanvasChainRec(D_canvas.c_slperp, &D_cvlist); + *cvp = 0; +} + +void +EqualizeCanvas(cv, gflag) +struct canvas *cv; +int gflag; +{ + struct canvas *cv2; + for (; cv; cv = cv->c_slnext) + { + if (cv->c_slperp && gflag) + { + cv->c_slweight = CountCanvasPerp(cv); + for (cv2 = cv->c_slperp; cv2; cv2 = cv2->c_slnext) + if (cv2->c_slperp) + EqualizeCanvas(cv2->c_slperp, gflag); + } + else + cv->c_slweight = 1; + } +} + +void +ResizeCanvas(cv) +struct canvas *cv; +{ + struct canvas *cv2, *cvn, *fcv; + int nh, i, maxi, hh, m, w, wsum; + int need, got; + int xs, ys, xe, ye; + int focusmin = 0; + + xs = cv->c_xs; + ys = cv->c_ys; + xe = cv->c_xe; + ye = cv->c_ye; + cv = cv->c_slperp; + debug2("ResizeCanvas: %d,%d", xs, ys); + debug2(" %d,%d\n", xe, ye); + if (cv == 0) + return; + if (cv->c_slorient == SLICE_UNKN) + { + ASSERT(!cv->c_slnext && !cv->c_slperp); + cv->c_xs = xs; + cv->c_xe = xe; + cv->c_ys = ys; + cv->c_ye = ye; + cv->c_xoff = cv->c_xs; + cv->c_yoff = cv->c_ys; + cv->c_blank.l_width = cv->c_xe - cv->c_xs + 1; + cv->c_blank.l_height = cv->c_ye - cv->c_ys + 1; + return; + } + + fcv = 0; + if (focusminwidth || focusminheight) + { + debug("searching for focus canvas\n"); + cv2 = D_forecv; + while (cv2->c_slback) + { + if (cv2->c_slback == cv->c_slback) + { + fcv = cv2; + focusmin = cv->c_slorient == SLICE_VERT ? focusminheight : focusminwidth; + if (focusmin > 0) + focusmin--; + else if (focusmin < 0) + focusmin = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; + debug1("found, focusmin=%d\n", focusmin); + } + cv2 = cv2->c_slback; + } + } + if (focusmin) + { + m = CountCanvas(cv) * 2; + nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; + nh -= m; + if (nh < 0) + nh = 0; + if (focusmin > nh) + focusmin = nh; + debug1("corrected to %d\n", focusmin); + } + + /* pass 1: calculate weight sum */ + for (cv2 = cv, wsum = 0; cv2; cv2 = cv2->c_slnext) + { + debug1(" weight %d\n", cv2->c_slweight); + wsum += cv2->c_slweight; + } + debug1("wsum = %d\n", wsum); + if (wsum == 0) + wsum = 1; + w = wsum; + + /* pass 2: calculate need/excess space */ + nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; + for (cv2 = cv, need = got = 0; cv2; cv2 = cv2->c_slnext) + { + m = cv2->c_slperp ? CountCanvasPerp(cv2) * 2 - 1 : 1; + if (cv2 == fcv) + m += focusmin; + hh = cv2->c_slweight ? nh * cv2->c_slweight / w : 0; + w -= cv2->c_slweight; + nh -= hh; + debug2(" should %d min %d\n", hh, m); + if (hh <= m + 1) + need += m + 1 - hh; + else + got += hh - m - 1; + } + debug2("need: %d, got %d\n", need, got); + if (need > got) + need = got; + + /* pass 3: distribute space */ + nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; + i = cv->c_slorient == SLICE_VERT ? ys : xs; + maxi = cv->c_slorient == SLICE_VERT ? ye : xe; + w = wsum; + for (; cv; cv = cvn) + { + cvn = cv->c_slnext; + if (i > maxi) + { + if (cv->c_slprev && !cv->c_slback->c_slback && !cv->c_slprev->c_slperp && !cv->c_slprev->c_slprev) + { + cv->c_slprev->c_slorient = SLICE_UNKN; + if (!captionalways) + { + cv->c_slback->c_ye++; + cv->c_slprev->c_ye++; + } + } + SetCanvasWindow(cv, 0); + FreeCanvas(cv); + continue; + } + m = cv->c_slperp ? CountCanvasPerp(cv) * 2 - 1 : 1; + if (cv == fcv) + m += focusmin; + hh = cv->c_slweight ? nh * cv->c_slweight / w : 0; + w -= cv->c_slweight; + nh -= hh; + debug2(" should %d min %d\n", hh, m); + if (hh <= m + 1) + { + hh = m + 1; + debug1(" -> %d\n", hh); + } + else + { + int hx = need * (hh - m - 1) / got; + debug3(" -> %d - %d = %d\n", hh, hx, hh - hx); + got -= (hh - m - 1); + hh -= hx; + need -= hx; + debug2(" now need=%d got=%d\n", need, got); + } + ASSERT(hh >= m + 1); + /* hh is window size plus pation line */ + if (i + hh > maxi + 2) + { + hh = maxi + 2 - i; + debug1(" not enough space, reducing to %d\n", hh); + } + if (i + hh == maxi + 1) + { + hh++; + debug(" incrementing as no other canvas will fit\n"); + } + if (cv->c_slorient == SLICE_VERT) + { + cv->c_xs = xs; + cv->c_xe = xe; + cv->c_ys = i; + cv->c_ye = i + hh - 2; + cv->c_xoff = xs; + cv->c_yoff = i; + } + else + { + cv->c_xs = i; + cv->c_xe = i + hh - 2; + cv->c_ys = ys; + cv->c_ye = ye; + cv->c_xoff = i; + cv->c_yoff = ys; + } + cv->c_xoff = cv->c_xs; + cv->c_yoff = cv->c_ys; + cv->c_blank.l_width = cv->c_xe - cv->c_xs + 1; + cv->c_blank.l_height = cv->c_ye - cv->c_ys + 1; + if (cv->c_slperp) + { + ResizeCanvas(cv); + if (!cv->c_slperp->c_slnext) + { + debug("deleting perp node\n"); + FreePerp(cv->c_slperp); + FreePerp(cv); + } + } + i += hh; + } +} + +static struct canvas * +AddPerp(cv) +struct canvas *cv; +{ + struct canvas *pcv; + debug("Creating new perp node\n"); + + if ((pcv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + return 0; + pcv->c_next = 0; + pcv->c_display = cv->c_display; + pcv->c_slnext = cv->c_slnext; + pcv->c_slprev = cv->c_slprev; + pcv->c_slperp = cv; + pcv->c_slback = cv->c_slback; + if (cv->c_slback && cv->c_slback->c_slperp == cv) + cv->c_slback->c_slperp = pcv; + pcv->c_slorient = cv->c_slorient; + pcv->c_xoff = 0; + pcv->c_yoff = 0; + pcv->c_xs = cv->c_xs; + pcv->c_xe = cv->c_xe; + pcv->c_ys = cv->c_ys; + pcv->c_ye = cv->c_ye; + if (pcv->c_slnext) + pcv->c_slnext->c_slprev = pcv; + if (pcv->c_slprev) + pcv->c_slprev->c_slnext = pcv; + pcv->c_slweight = cv->c_slweight; + CanvasInitBlank(pcv); + cv->c_slweight = 1; + cv->c_slnext = 0; + cv->c_slprev = 0; + cv->c_slperp = 0; + cv->c_slback = pcv; + cv->c_slorient = SLICE_UNKN; + return pcv; +} + +int +AddCanvas(orient) +int orient; +{ + struct canvas *cv; + int xs, xe, ys, ye; + int h, num; + + cv = D_forecv; + debug2("AddCanvas orient %d, forecv is %d\n", orient, cv->c_slorient); + + if (cv->c_slorient != SLICE_UNKN && cv->c_slorient != orient) + if (!AddPerp(cv)) + return -1; + + cv = D_forecv; + xs = cv->c_slback->c_xs; + xe = cv->c_slback->c_xe; + ys = cv->c_slback->c_ys; + ye = cv->c_slback->c_ye; + if (!captionalways && cv == D_canvas.c_slperp && !cv->c_slnext) + ye--; /* need space for caption */ + debug2("Adding Canvas to slice %d,%d ", xs, ys); + debug2("%d,%d\n", xe, ye); + + num = CountCanvas(cv->c_slback->c_slperp) + 1; + debug1("Num = %d\n", num); + if (orient == SLICE_VERT) + h = ye - ys + 1; + else + h = xe - xs + 1; + + h -= 2 * num - 1; + if (h < 0) + return -1; /* can't fit in */ + + if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + return -1; + + D_forecv->c_slback->c_ye = ye; /* in case we modified it above */ + D_forecv->c_slorient = orient; /* in case it was UNKN */ + cv->c_slnext = D_forecv->c_slnext; + cv->c_slprev = D_forecv; + D_forecv->c_slnext = cv; + if (cv->c_slnext) + cv->c_slnext->c_slprev = cv; + cv->c_slorient = orient; + cv->c_slback = D_forecv->c_slback; + + cv->c_xs = xs; + cv->c_xe = xe; + cv->c_ys = ys; + cv->c_ye = ye; + cv->c_xoff = 0; + cv->c_yoff = 0; + cv->c_display = display; + cv->c_vplist = 0; + cv->c_captev.type = EV_TIMEOUT; + cv->c_captev.data = (char *)cv; + cv->c_captev.handler = cv_winid_fn; + + CanvasInitBlank(cv); + cv->c_lnext = 0; + + cv->c_next = 0; + + cv = cv->c_slback; + EqualizeCanvas(cv->c_slperp, 0); + ResizeCanvas(cv); + RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); + return 0; +} + +void +RemCanvas() +{ + int xs, xe, ys, ye; + struct canvas *cv; + + debug("RemCanvas\n"); + cv = D_forecv; + if (cv->c_slorient == SLICE_UNKN) + return; + while (cv->c_slprev) + cv = cv->c_slprev; + if (!cv->c_slnext) + return; + if (!cv->c_slnext->c_slnext && cv->c_slback->c_slback) + { + /* two canvases in slice, kill perp node */ + cv = D_forecv; + debug("deleting perp node\n"); + FreePerp(cv->c_slprev ? cv->c_slprev : cv->c_slnext); + FreePerp(cv->c_slback); + } + xs = cv->c_slback->c_xs; + xe = cv->c_slback->c_xe; + ys = cv->c_slback->c_ys; + ye = cv->c_slback->c_ye; + /* free canvas */ + cv = D_forecv; + D_forecv = cv->c_slprev; + if (!D_forecv) + D_forecv = cv->c_slnext; + FreeCanvas(cv); + + cv = D_forecv; + while (D_forecv->c_slperp) + D_forecv = D_forecv->c_slperp; + + /* if only one canvas left, set orient back to unknown */ + if (!cv->c_slnext && !cv->c_slprev && !cv->c_slback->c_slback && !cv->c_slperp) + { + cv->c_slorient = SLICE_UNKN; + if (!captionalways) + cv->c_slback->c_ye = ++ye; /* caption line no longer needed */ + } + cv = cv->c_slback; + EqualizeCanvas(cv->c_slperp, 0); + ResizeCanvas(cv); + + D_fore = Layer2Window(D_forecv->c_layer); + flayer = D_forecv->c_layer; + + RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); +} + +void +OneCanvas() +{ + struct canvas *cv = D_forecv, *ocv = 0; + + if (cv->c_slprev) + { + ocv = cv->c_slprev; + cv->c_slprev->c_slnext = cv->c_slnext; + } + if (cv->c_slnext) + { + ocv = cv->c_slnext; + cv->c_slnext->c_slprev = cv->c_slprev; + } + if (!ocv) + return; + if (cv->c_slback && cv->c_slback->c_slperp == cv) + cv->c_slback->c_slperp = ocv; + cv->c_slorient = SLICE_UNKN; + while (D_canvas.c_slperp) + FreeCanvas(D_canvas.c_slperp); + cv = D_forecv; + D_canvas.c_slperp = cv; + cv->c_slback = &D_canvas; + cv->c_slnext = 0; + cv->c_slprev = 0; + ASSERT(!cv->c_slperp); + if (!captionalways) + D_canvas.c_ye++; /* caption line no longer needed */ + ResizeCanvas(&D_canvas); + RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); +} + +void +DupLayoutCv(cvf, cvt, save) +struct canvas *cvf, *cvt; +int save; +{ + while(cvf) + { + cvt->c_slorient = cvf->c_slorient; + cvt->c_slweight = cvf->c_slweight; + if (cvf == D_forecv) + D_forecv = cvt; + if (!save) + { + cvt->c_display = display; + if (!cvf->c_slperp) + { + cvt->c_captev.type = EV_TIMEOUT; + cvt->c_captev.data = (char *)cvt; + cvt->c_captev.handler = cv_winid_fn; + cvt->c_blank.l_cvlist = 0; + cvt->c_blank.l_layfn = &BlankLf; + cvt->c_blank.l_bottom = &cvt->c_blank; + } + cvt->c_layer = cvf->c_layer; + } + else + { + struct win *p = cvf->c_layer ? Layer2Window(cvf->c_layer) : 0; + cvt->c_layer = p ? &p->w_layer : 0; + } + if (cvf->c_slperp) + { + cvt->c_slperp = (struct canvas *)calloc(1, sizeof(struct canvas)); + cvt->c_slperp->c_slback = cvt; + CanvasInitBlank(cvt->c_slperp); + DupLayoutCv(cvf->c_slperp, cvt->c_slperp, save); + } + if (cvf->c_slnext) + { + cvt->c_slnext = (struct canvas *)calloc(1, sizeof(struct canvas)); + cvt->c_slnext->c_slprev = cvt; + cvt->c_slnext->c_slback = cvt->c_slback; + CanvasInitBlank(cvt->c_slnext); + } + cvf = cvf->c_slnext; + cvt = cvt->c_slnext; + } +} + +void +PutWindowCv(cv) +struct canvas *cv; +{ + struct win *p; + for (; cv; cv = cv->c_slnext) + { + if (cv->c_slperp) + { + PutWindowCv(cv->c_slperp); + continue; + } + p = cv->c_layer ? (struct win *)cv->c_layer->l_data : 0; + cv->c_layer = 0; + SetCanvasWindow(cv, p); + } +} + diff -Nru screen-4.0.3/canvas.h screen-4.1.0~20120320gitdb59704/canvas.h --- screen-4.0.3/canvas.h 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/canvas.h 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,101 @@ +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Copyright (c) 1987 Oliver Laumann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + * + **************************************************************** + * $Id$ GNU + */ + +#ifndef SCREEN_CANVAS_H +#define SCREEN_CANVAS_H + +#define SLICE_UNKN 0 +#define SLICE_VERT (1 << 0) +#define SLICE_HORI (1 << 1) + +#define SLICE_THIS (1 << 2) /* used in equal test */ +#define SLICE_GLOBAL (1 << 3) + +struct canvas +{ + struct canvas *c_next; /* next canvas on display */ + struct display *c_display; /* back pointer to display */ + + struct canvas *c_slnext; /* next canvas in display slice */ + struct canvas *c_slprev; /* prev canvas in display slice */ + struct canvas *c_slperp; /* perpendicular slice */ + struct canvas *c_slback; /* perpendicular slice back pointer */ + int c_slorient; /* our slice orientation */ + int c_slweight; /* size ratio */ + + struct viewport *c_vplist; + struct layer *c_layer; /* layer on this canvas */ + struct canvas *c_lnext; /* next canvas that displays layer */ + struct layer c_blank; /* bottom layer, always blank */ + int c_xoff; /* canvas x offset on display */ + int c_yoff; /* canvas y offset on display */ + int c_xs; + int c_xe; + int c_ys; + int c_ye; + struct event c_captev; /* caption changed event */ +}; + +struct win; /* forward declaration */ + +extern void SetCanvasWindow __P((struct canvas *, struct win *)); +extern void SetForeCanvas __P((struct display *, struct canvas *)); +extern struct canvas *FindCanvas __P((int, int)); +extern int MakeDefaultCanvas __P((void)); +extern int AddCanvas __P((int)); +extern void RemCanvas __P((void)); +extern void OneCanvas __P((void)); +extern void FreeCanvas __P((struct canvas *)); +extern void ResizeCanvas __P((struct canvas *)); +extern void RecreateCanvasChain __P((void)); +extern void RethinkViewportOffsets __P((struct canvas *)); +extern int CountCanvasPerp __P((struct canvas *)); +extern void EqualizeCanvas __P((struct canvas *, int)); +extern void DupLayoutCv __P((struct canvas *, struct canvas *, int)); +extern void PutWindowCv __P((struct canvas *)); + +#define CV_CALL(cv, cmd) \ +{ \ + struct display *olddisplay = display; \ + struct layer *oldflayer = flayer; \ + struct layer *l = cv->c_layer; \ + struct canvas *cvlist = l->l_cvlist; \ + struct canvas *cvlnext = cv->c_lnext; \ + flayer = l; \ + l->l_cvlist = cv; \ + cv->c_lnext = 0; \ + cmd; \ + flayer = oldflayer; \ + l->l_cvlist = cvlist; \ + cv->c_lnext = cvlnext; \ + display = olddisplay; \ +} + +#endif /* SCREEN_CANVAS_H */ + diff -Nru screen-4.0.3/comm.c screen-4.1.0~20120320gitdb59704/comm.c --- screen-4.0.3/comm.c 2003-09-08 14:25:08.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/comm.c 2011-10-04 22:32:21.000000000 +0000 @@ -1,4 +1,9 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann @@ -14,7 +19,7 @@ * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -23,9 +28,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ @@ -53,7 +58,7 @@ #endif { "allpartial", NEED_DISPLAY|ARGS_1 }, { "altscreen", ARGS_01 }, - { "at", NEED_DISPLAY|ARGS_2|ARGS_ORMORE }, + { "at", ARGS_2|ARGS_ORMORE }, #ifdef COLOR { "attrcolor", ARGS_12 }, #endif @@ -98,7 +103,7 @@ #endif { "blanker", NEED_DISPLAY|ARGS_0}, #ifdef BLANKER_PRG - { "blankerprg", ARGS_1|ARGS_ORMORE }, + { "blankerprg", ARGS_0|ARGS_ORMORE }, #endif { "break", NEED_FORE|ARGS_01 }, { "breaktype", NEED_FORE|ARGS_01 }, @@ -112,6 +117,9 @@ #endif { "charset", NEED_FORE|ARGS_1 }, { "chdir", ARGS_01 }, +#ifdef DW_CHARS + { "cjkwidth", ARGS_01 }, +#endif { "clear", NEED_FORE|ARGS_0 }, { "colon", NEED_LAYER|ARGS_01 }, { "command", NEED_DISPLAY|ARGS_02 }, @@ -120,7 +128,7 @@ #endif { "console", NEED_FORE|ARGS_01 }, #ifdef COPY_PASTE - { "copy", NEED_FORE|ARGS_0 }, + { "copy", NEED_FORE|NEED_DISPLAY|ARGS_0 }, { "crlf", ARGS_01 }, #endif { "debug", ARGS_01 }, @@ -149,6 +157,7 @@ #endif { "defmode", ARGS_1 }, { "defmonitor", ARGS_1 }, + { "defmousetrack", ARGS_1 }, #ifdef MULTI { "defnonblock", ARGS_1 }, #endif @@ -167,24 +176,26 @@ #ifdef DETACH { "detach", NEED_DISPLAY|ARGS_01 }, #endif - { "digraph", NEED_LAYER|ARGS_01 }, + { "digraph", NEED_LAYER|ARGS_012 }, { "dinfo", NEED_DISPLAY|ARGS_0 }, { "displays", NEED_LAYER|ARGS_0 }, { "dumptermcap", NEED_FORE|ARGS_0 }, - { "echo", ARGS_12 }, + { "echo", CAN_QUERY|ARGS_12 }, #ifdef ENCODINGS { "encoding", ARGS_12 }, #endif { "escape", ARGS_1 }, { "eval", ARGS_1|ARGS_ORMORE }, #ifdef PSEUDOS - { "exec", NEED_FORE|ARGS_0|ARGS_ORMORE }, + { "exec", ARGS_0|ARGS_ORMORE }, #endif { "fit", NEED_DISPLAY|ARGS_0 }, { "flow", NEED_FORE|ARGS_01 }, { "focus", NEED_DISPLAY|ARGS_01 }, + { "focusminsize", ARGS_02 }, { "gr", NEED_FORE|ARGS_01 }, - { "hardcopy", ARGS_012 }, + { "group", NEED_FORE|ARGS_01 }, + { "hardcopy", NEED_FORE|ARGS_012 }, { "hardcopy_append", ARGS_1 }, { "hardcopydir", ARGS_01 }, { "hardstatus", ARGS_012 }, @@ -196,12 +207,13 @@ { "hstatus", NEED_FORE|ARGS_1 }, { "idle", ARGS_0|ARGS_ORMORE }, { "ignorecase", ARGS_01 }, - { "info", NEED_LAYER|ARGS_0 }, + { "info", CAN_QUERY|NEED_LAYER|ARGS_0 }, #ifdef ENCODINGS { "kanji", NEED_FORE|ARGS_12 }, #endif { "kill", NEED_FORE|ARGS_0 }, - { "lastmsg", NEED_DISPLAY|ARGS_0 }, + { "lastmsg", CAN_QUERY|NEED_DISPLAY|ARGS_0 }, + { "layout", ARGS_1|ARGS_ORMORE}, { "license", NEED_LAYER|ARGS_0 }, #ifdef LOCK { "lockscreen", NEED_DISPLAY|ARGS_0 }, @@ -220,9 +232,10 @@ #ifdef COPY_PASTE { "markkeys", ARGS_1 }, #endif - { "maxwin", ARGS_1 }, + { "maxwin", ARGS_01 }, { "meta", NEED_LAYER|ARGS_0 }, { "monitor", NEED_FORE|ARGS_01 }, + { "mousetrack", NEED_DISPLAY | ARGS_01 }, { "msgminwait", ARGS_1 }, { "msgwait", ARGS_1 }, #ifdef MULTIUSER @@ -235,7 +248,7 @@ #ifdef MULTI { "nonblock", NEED_DISPLAY|ARGS_01 }, #endif - { "number", NEED_FORE|ARGS_01 }, + { "number", CAN_QUERY|NEED_FORE|ARGS_01 }, { "obuflimit", NEED_DISPLAY|ARGS_01 }, { "only", NEED_DISPLAY|ARGS_0 }, { "other", ARGS_0 }, @@ -266,13 +279,14 @@ #ifdef COPY_PASTE { "removebuf", ARGS_0 }, #endif + { "rendition", ARGS_23 }, { "reset", NEED_FORE|ARGS_0 }, - { "resize", NEED_DISPLAY|ARGS_01 }, + { "resize", NEED_DISPLAY|ARGS_0|ARGS_ORMORE }, { "screen", ARGS_0|ARGS_ORMORE }, #ifdef COPY_PASTE { "scrollback", NEED_FORE|ARGS_1 }, #endif - { "select", ARGS_01 }, + { "select", CAN_QUERY|ARGS_01 }, { "sessionname", ARGS_01 }, { "setenv", ARGS_012 }, { "setsid", ARGS_1 }, @@ -284,9 +298,9 @@ { "slowpaste", NEED_FORE|ARGS_01 }, { "sorendition", ARGS_012 }, { "source", ARGS_1 }, - { "split", NEED_DISPLAY|ARGS_0 }, + { "split", NEED_DISPLAY|ARGS_01 }, { "startup_message", ARGS_1 }, - { "stuff", NEED_LAYER|ARGS_12 }, + { "stuff", NEED_LAYER|ARGS_012 }, #ifdef MULTIUSER { "su", NEED_DISPLAY|ARGS_012 }, #endif @@ -297,9 +311,10 @@ { "termcap", ARGS_23 }, { "termcapinfo", ARGS_23 }, { "terminfo", ARGS_23 }, - { "time", ARGS_01 }, - { "title", NEED_FORE|ARGS_01 }, + { "time", CAN_QUERY|ARGS_01 }, + { "title", CAN_QUERY|NEED_FORE|ARGS_01 }, { "umask", ARGS_1|ARGS_ORMORE }, + { "unbindall", ARGS_0 }, { "unsetenv", ARGS_1 }, #ifdef UTF8 { "utf8", NEED_FORE|ARGS_012 }, @@ -311,8 +326,8 @@ { "version", ARGS_0 }, { "wall", NEED_DISPLAY|ARGS_1}, { "width", ARGS_0123 }, - { "windowlist", NEED_DISPLAY|ARGS_012 }, - { "windows", NEED_DISPLAY|ARGS_0 }, + { "windowlist", ARGS_012 }, + { "windows", CAN_QUERY|ARGS_0 }, { "wrap", NEED_FORE|ARGS_01 }, #ifdef COPY_PASTE { "writebuf", ARGS_0123 }, @@ -323,5 +338,5 @@ #ifdef ZMODEM { "zmodem", ARGS_012 }, #endif - { "zombie", ARGS_01 } + { "zombie", ARGS_012 } }; diff -Nru screen-4.0.3/comm.h.dist screen-4.1.0~20120320gitdb59704/comm.h.dist --- screen-4.0.3/comm.h.dist 2006-10-23 13:04:42.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/comm.h.dist 1970-01-01 00:00:00.000000000 +0000 @@ -1,227 +0,0 @@ -/* - * This file is automagically created from comm.c -- DO NOT EDIT - */ - -struct comm -{ - char *name; - int flags; -#ifdef MULTIUSER - AclBits userbits[ACL_BITS_PER_CMD]; -#endif -}; - -#define ARGS_MASK (3) - -#define ARGS_0 (0) -#define ARGS_1 (1) -#define ARGS_2 (2) -#define ARGS_3 (3) - -#define ARGS_PLUS1 (1<<2) -#define ARGS_PLUS2 (1<<3) -#define ARGS_PLUS3 (1<<4) -#define ARGS_ORMORE (1<<5) - -#define NEED_FORE (1<<6) /* this command needs a fore window */ -#define NEED_DISPLAY (1<<7) /* this command needs a display */ -#define NEED_LAYER (1<<8) /* this command needs a layer */ - -#define ARGS_01 (ARGS_0 | ARGS_PLUS1) -#define ARGS_02 (ARGS_0 | ARGS_PLUS2) -#define ARGS_12 (ARGS_1 | ARGS_PLUS1) -#define ARGS_23 (ARGS_2 | ARGS_PLUS1) -#define ARGS_24 (ARGS_2 | ARGS_PLUS2) -#define ARGS_34 (ARGS_3 | ARGS_PLUS1) -#define ARGS_012 (ARGS_0 | ARGS_PLUS1 | ARGS_PLUS2) -#define ARGS_0123 (ARGS_0 | ARGS_PLUS1 | ARGS_PLUS2 | ARGS_PLUS3) -#define ARGS_123 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS2) -#define ARGS_124 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS3) -#define ARGS_1234 (ARGS_1 | ARGS_PLUS1 | ARGS_PLUS2 | ARGS_PLUS3) - -struct action -{ - int nr; - char **args; - int *argl; -}; - -#define RC_ILLEGAL -1 - -#define RC_ACLADD 0 -#define RC_ACLCHG 1 -#define RC_ACLDEL 2 -#define RC_ACLGRP 3 -#define RC_ACLUMASK 4 -#define RC_ACTIVITY 5 -#define RC_ADDACL 6 -#define RC_ALLPARTIAL 7 -#define RC_ALTSCREEN 8 -#define RC_AT 9 -#define RC_ATTRCOLOR 10 -#define RC_AUTODETACH 11 -#define RC_AUTONUKE 12 -#define RC_BACKTICK 13 -#define RC_BCE 14 -#define RC_BELL 15 -#define RC_BELL_MSG 16 -#define RC_BIND 17 -#define RC_BINDKEY 18 -#define RC_BLANKER 19 -#define RC_BLANKERPRG 20 -#define RC_BREAK 21 -#define RC_BREAKTYPE 22 -#define RC_BUFFERFILE 23 -#define RC_C1 24 -#define RC_CAPTION 25 -#define RC_CHACL 26 -#define RC_CHARSET 27 -#define RC_CHDIR 28 -#define RC_CLEAR 29 -#define RC_COLON 30 -#define RC_COMMAND 31 -#define RC_COMPACTHIST 32 -#define RC_CONSOLE 33 -#define RC_COPY 34 -#define RC_CRLF 35 -#define RC_DEBUG 36 -#define RC_DEFAUTONUKE 37 -#define RC_DEFBCE 38 -#define RC_DEFBREAKTYPE 39 -#define RC_DEFC1 40 -#define RC_DEFCHARSET 41 -#define RC_DEFENCODING 42 -#define RC_DEFESCAPE 43 -#define RC_DEFFLOW 44 -#define RC_DEFGR 45 -#define RC_DEFHSTATUS 46 -#define RC_DEFKANJI 47 -#define RC_DEFLOG 48 -#define RC_DEFLOGIN 49 -#define RC_DEFMODE 50 -#define RC_DEFMONITOR 51 -#define RC_DEFNONBLOCK 52 -#define RC_DEFOBUFLIMIT 53 -#define RC_DEFSCROLLBACK 54 -#define RC_DEFSHELL 55 -#define RC_DEFSILENCE 56 -#define RC_DEFSLOWPASTE 57 -#define RC_DEFUTF8 58 -#define RC_DEFWRAP 59 -#define RC_DEFWRITELOCK 60 -#define RC_DETACH 61 -#define RC_DIGRAPH 62 -#define RC_DINFO 63 -#define RC_DISPLAYS 64 -#define RC_DUMPTERMCAP 65 -#define RC_ECHO 66 -#define RC_ENCODING 67 -#define RC_ESCAPE 68 -#define RC_EVAL 69 -#define RC_EXEC 70 -#define RC_FIT 71 -#define RC_FLOW 72 -#define RC_FOCUS 73 -#define RC_GR 74 -#define RC_HARDCOPY 75 -#define RC_HARDCOPY_APPEND 76 -#define RC_HARDCOPYDIR 77 -#define RC_HARDSTATUS 78 -#define RC_HEIGHT 79 -#define RC_HELP 80 -#define RC_HISTORY 81 -#define RC_HSTATUS 82 -#define RC_IDLE 83 -#define RC_IGNORECASE 84 -#define RC_INFO 85 -#define RC_KANJI 86 -#define RC_KILL 87 -#define RC_LASTMSG 88 -#define RC_LICENSE 89 -#define RC_LOCKSCREEN 90 -#define RC_LOG 91 -#define RC_LOGFILE 92 -#define RC_LOGIN 93 -#define RC_LOGTSTAMP 94 -#define RC_MAPDEFAULT 95 -#define RC_MAPNOTNEXT 96 -#define RC_MAPTIMEOUT 97 -#define RC_MARKKEYS 98 -#define RC_MAXWIN 99 -#define RC_META 100 -#define RC_MONITOR 101 -#define RC_MSGMINWAIT 102 -#define RC_MSGWAIT 103 -#define RC_MULTIUSER 104 -#define RC_NETHACK 105 -#define RC_NEXT 106 -#define RC_NONBLOCK 107 -#define RC_NUMBER 108 -#define RC_OBUFLIMIT 109 -#define RC_ONLY 110 -#define RC_OTHER 111 -#define RC_PARTIAL 112 -#define RC_PASSWORD 113 -#define RC_PASTE 114 -#define RC_PASTEFONT 115 -#define RC_POW_BREAK 116 -#define RC_POW_DETACH 117 -#define RC_POW_DETACH_MSG 118 -#define RC_PREV 119 -#define RC_PRINTCMD 120 -#define RC_PROCESS 121 -#define RC_QUIT 122 -#define RC_READBUF 123 -#define RC_READREG 124 -#define RC_REDISPLAY 125 -#define RC_REGISTER 126 -#define RC_REMOVE 127 -#define RC_REMOVEBUF 128 -#define RC_RESET 129 -#define RC_RESIZE 130 -#define RC_SCREEN 131 -#define RC_SCROLLBACK 132 -#define RC_SELECT 133 -#define RC_SESSIONNAME 134 -#define RC_SETENV 135 -#define RC_SETSID 136 -#define RC_SHELL 137 -#define RC_SHELLTITLE 138 -#define RC_SILENCE 139 -#define RC_SILENCEWAIT 140 -#define RC_SLEEP 141 -#define RC_SLOWPASTE 142 -#define RC_SORENDITION 143 -#define RC_SOURCE 144 -#define RC_SPLIT 145 -#define RC_STARTUP_MESSAGE 146 -#define RC_STUFF 147 -#define RC_SU 148 -#define RC_SUSPEND 149 -#define RC_TERM 150 -#define RC_TERMCAP 151 -#define RC_TERMCAPINFO 152 -#define RC_TERMINFO 153 -#define RC_TIME 154 -#define RC_TITLE 155 -#define RC_UMASK 156 -#define RC_UNSETENV 157 -#define RC_UTF8 158 -#define RC_VBELL 159 -#define RC_VBELL_MSG 160 -#define RC_VBELLWAIT 161 -#define RC_VERBOSE 162 -#define RC_VERSION 163 -#define RC_WALL 164 -#define RC_WIDTH 165 -#define RC_WINDOWLIST 166 -#define RC_WINDOWS 167 -#define RC_WRAP 168 -#define RC_WRITEBUF 169 -#define RC_WRITELOCK 170 -#define RC_XOFF 171 -#define RC_XON 172 -#define RC_ZMODEM 173 -#define RC_ZOMBIE 174 - -#define RC_LAST 174 diff -Nru screen-4.0.3/comm.sh screen-4.1.0~20120320gitdb59704/comm.sh --- screen-4.0.3/comm.sh 2003-09-08 14:38:15.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/comm.sh 2011-10-04 22:32:21.000000000 +0000 @@ -43,6 +43,8 @@ #define NEED_FORE (1<<6) /* this command needs a fore window */ #define NEED_DISPLAY (1<<7) /* this command needs a display */ #define NEED_LAYER (1<<8) /* this command needs a layer */ +#define CAN_QUERY (1<<9) /* this command can be queried, i.e. used with -Q to + get back a result to stdout */ #define ARGS_01 (ARGS_0 | ARGS_PLUS1) #define ARGS_02 (ARGS_0 | ARGS_PLUS2) @@ -61,6 +63,10 @@ int nr; char **args; int *argl; + int quiet; /* Suppress (currently unused) + 0x01 - Error message + 0x02 - Normal message + */ }; #define RC_ILLEGAL -1 diff -Nru screen-4.0.3/config.h.in screen-4.1.0~20120320gitdb59704/config.h.in --- screen-4.0.3/config.h.in 2006-10-23 13:06:32.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/config.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,663 +0,0 @@ -/* Copyright (c) 1993-2000 - * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) - * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) - * Copyright (c) 1987 Oliver Laumann - * - * 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 (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** - * $Id: config.h.in,v 1.12 1994/05/31 12:31:36 mlschroe Exp $ FAU - */ - - - - - -/********************************************************************** - * - * User Configuration Section - */ - -/* - * Maximum of simultaneously allowed windows per screen session. - */ -#ifndef MAXWIN -# define MAXWIN 40 -#endif - -/* - * Define SOCKDIR to be the directory to contain the named sockets - * screen creates. This should be in a common subdirectory, such as - * /usr/local or /tmp. It makes things a little more secure if you - * choose a directory which is not writable by everyone or where the - * "sticky" bit is on, but this isn't required. - * If SOCKDIR is not defined screen will put the named sockets in - * the user's home directory. Notice that this can cause you problems - * if some user's HOME directories are AFS- or NFS-mounted. Especially - * AFS is unlikely to support named sockets. - * - * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison). - */ -#undef SOCKDIR - -/* - * Define this if the SOCKDIR is not shared between hosts. - */ -#define SOCKDIR_IS_LOCAL_TO_HOST - -/* - * Screen sources two startup files. First a global file with a path - * specified here, second your local $HOME/.screenrc - * Don't define this, if you don't want it. - */ -#ifndef ETCSCREENRC -# define ETCSCREENRC "/usr/local/etc/screenrc" -#endif - -/* - * Screen can look for the environment variable $SYSSCREENRC and -if it - * exists- load the file specified in that variable as global screenrc. - * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1). - * Otherwise ETCSCREENRC is always loaded. - */ -#define ALLOW_SYSSCREENRC 1 - -/* - * Screen needs encoding files for the translation of utf8 - * into some encodings, e.g. JIS, BIG5. - * Only needed if FONT, ENCODINGS and UTF8 are defined. - */ -#ifndef SCREENENCODINGS -# define SCREENENCODINGS "/usr/local/lib/screen/encodings" -#endif -/* - * Define CHECKLOGIN to force Screen users to enter their Unix password - * in addition to the screen password. - * - * Define NOSYSLOG if yo do not have logging facilities. Currently - * syslog() will be used to trace ``su'' commands only. - */ -#define CHECKLOGIN 1 -#undef NOSYSLOG - - -/* - * define PTYMODE if you do not like the default of 0622, which allows - * public write to your pty. - * define PTYGROUP to some numerical group-id if you do not want the - * tty to be in "your" group. - * Note, screen is unable to change mode or group of the pty if it - * is not installed with sufficient privilege. (e.g. set-uid-root) - * define PTYROFS if the /dev/pty devices are mounted on a read-only - * filesystem so screen should not even attempt to set mode or group - * even if running as root (e.g. on TiVo). - */ -#undef PTYMODE -#undef PTYGROUP -#undef PTYROFS - -/* - * If screen is NOT installed set-uid root, screen can provide tty - * security by exclusively locking the ptys. While this keeps other - * users from opening your ptys, it also keeps your own subprocesses - * from being able to open /dev/tty. Define LOCKPTY to add this - * exclusive locking. - */ -#undef LOCKPTY - -/* - * If you'd rather see the status line on the first line of your - * terminal rather than the last, define TOPSTAT. - */ -#undef TOPSTAT - -/* - * define DETACH can detach a session. An absolute 'must'. - */ -#define DETACH - -/* - * here come the erlangen extensions to screen: - * define LOCK if you want to use a lock program for a screenlock. - * define PASSWORD for secure reattach of your screen. - * define COPY_PASTE to use the famous hacker's treasure zoo. - * define POW_DETACH to have a detach_and_logout key (requires DETACH). - * define REMOTE_DETACH (-d option) to move screen between terminals. - * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking - * define PSEUDOS to allow window input/output filtering - * define MULTI to allow multiple attaches. - * define MULTIUSER to allow other users attach to your session - * (if they are in the acl, of course) - * define MAPKEYS to include input keyboard translation. - * define FONT to support ISO2022/alternet charset support - * define COLOR to include ansi color support. This may expose - * a bug in x11r6-color-xterm. - * define DW_CHARS to include support for double-width character - * sets. - * define ENCODINGS to include support for encodings like euc or big5. - * Needs FONT to work. - * define UTF8 if you want support for UTF-8 encoding. - * Needs FONT and ENCODINGS to work. - * define COLORS16 if you want 16 colors. - * Needs COLOR to work. - * define BUILTIN_TELNET to add telnet support to screen. - * Syntax: screen //telnet host [port] - * define RXVT_OSC if you want support for rxvts special - * change fgcolor/bgcolor/bgpicture sequences - */ -#undef SIMPLESCREEN -#ifndef SIMPLESCREEN -# define LOCK -# define PASSWORD -# define COPY_PASTE -# define REMOTE_DETACH -# define POW_DETACH -# define AUTO_NUKE -# define PSEUDOS -# define MULTI -# define MULTIUSER -# define MAPKEYS -# define COLOR -# define FONT -# define DW_CHARS -# define ENCODINGS -# define UTF8 -# define COLORS16 -# define ZMODEM -# define BLANKER_PRG -#endif /* SIMPLESCREEN */ - -#undef BUILTIN_TELNET -#undef RXVT_OSC -#undef COLORS256 - - -/* - * If you have a braille display you should define HAVE_BRAILLE. - * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi - * Rangin (bargi@dots.physics.orst.edu). - * WARNING: this is more or less unsupported code, it may be full of - * bugs leading to security holes, enable at your own risk! - */ -#undef HAVE_BRAILLE - - -/* - * As error messages are mostly meaningless to the user, we - * try to throw out phrases that are somewhat more familiar - * to ...well, at least familiar to us NetHack players. - */ -#ifndef NONETHACK -# define NETHACK -#endif /* NONETHACK */ - -/* - * If screen is installed with permissions to update /etc/utmp (such - * as if it is installed set-uid root), define UTMPOK. - */ -#define UTMPOK - -/* Set LOGINDEFAULT to one (1) - * if you want entries added to /etc/utmp by default, else set it to - * zero (0). - * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined! - */ -#define LOGINDEFAULT 1 - -/* Set LOGOUTOK to one (1) - * if you want the user to be able to log her/his windows out. - * (Meaning: They are there, but not visible in /etc/utmp). - * Disabling this feature only makes sense if you have a secure /etc/utmp - * database. - * Negative examples: suns usually have a world writable utmp file, - * xterm will run perfectly without s-bit. - * - * If LOGOUTOK is undefined and UTMPOK is defined, all windows are - * initially and permanently logged in. - * - * Set CAREFULUTMP to one (1) if you want that users have at least one - * window per screen session logged in. - */ -#define LOGOUTOK 1 -#undef CAREFULUTMP - - -/* - * If UTMPOK is defined and your system (incorrectly) counts logins by - * counting non-null entries in /etc/utmp (instead of counting non-null - * entries with no hostname that are not on a pseudo tty), define USRLIMIT - * to have screen put an upper-limit on the number of entries to write - * into /etc/utmp. This helps to keep you from exceeding a limited-user - * license. - */ -#undef USRLIMIT - -/* - * both must be defined if you want to favor tcsendbreak over - * other calls to generate a break condition on serial lines. - * (Do not bother, if you are not using plain tty windows.) - */ -#define POSIX_HAS_A_GOOD_TCSENDBREAK -#define SUNOS4_AND_WE_TRUST_TCSENDBREAK - -/* - * to lower the interrupt load on the host machine, you may want to - * adjust the VMIN and VTIME settings used for plain tty windows. - * See the termio(4) manual page (Non-Canonical Mode Input Processing) - * for details. - * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you - * best user responsiveness, but highest interrupt frequency. - * (Do not bother, if you are not using plain tty windows.) - */ -#define TTYVMIN 100 -#define TTYVTIME 2 - -/* - * looks like the above values are ignored by setting FNDELAY. - * This is default for all pty/ttys, you may disable it for - * ttys here. After playing with it for a while, one may find out - * that this feature may cause screen to lock up. - */ -#ifdef bsdi -# define TTY_DISABLE_FNBLOCK /* select barfs without it ... */ -#endif - - -/* - * Some terminals, e.g. Wyse 120, use a bitfield to select attributes. - * This doesn't work with the standard so/ul/m? terminal entries, - * because they will cancel each other out. - * On TERMINFO machines, "sa" (sgr) may work. If you want screen - * to switch attributes only with sgr, define USE_SGR. - * This is *not* recomended, do this only if you must. - */ -#undef USE_SGR - - -/* - * Define USE_LOCALE if you want screen to use the locale names - * for the name of the month and day of the week. - */ -#define USE_LOCALE - -/* - * Define USE_PAM if your system supports PAM (Pluggable Authentication - * Modules) and you want screen to use it instead of calling crypt(). - * (You may also need to add -lpam to LIBS in the Makefile.) - */ -#undef USE_PAM - -/* - * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w - * if the terminal width is greater than 131 columns. No longer needed - * on modern systems which use $COLUMNS or the tty settings instead. - */ -#undef CHECK_SCREEN_W - -/********************************************************************** - * - * End of User Configuration Section - * - * Rest of this file is modified by 'configure' - * Change at your own risk! - * - */ - -/* - * Some defines to identify special unix variants - */ -#ifndef SVR4 -#undef SVR4 -#endif - -/* #ifndef __osf__ */ -#ifndef MIPS -#undef MIPS -#endif -/* #endif */ - -#ifndef OSX -#undef OSX -#endif - -#ifndef ISC -#undef ISC -#endif - -#ifndef sysV68 -#undef sysV68 -#endif - -#ifndef _POSIX_SOURCE -#undef _POSIX_SOURCE -#endif - -/* - * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX). - */ -#undef POSIX - -/* - * Define BSDJOBS if you have BSD-style job control (both process - * groups and a tty that deals correctly with them). - */ -#undef BSDJOBS - -/* - * Define TERMIO if you have struct termio instead of struct sgttyb. - * This is usually the case for SVID systems, where BSD uses sgttyb. - * POSIX systems should define this anyway, even though they use - * struct termios. - */ -#undef TERMIO - -/* - * Define CYTERMIO if you have cyrillic termio modes. - */ -#undef CYTERMIO - -/* - * Define TERMINFO if your machine emulates the termcap routines - * with the terminfo database. - * Thus the .screenrc file is parsed for - * the command 'terminfo' and not 'termcap'. - */ -#undef TERMINFO - -/* - * If your library does not define ospeed, define this. - */ -#undef NEED_OSPEED - -/* - * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX) - */ -#ifndef SYSV -#undef SYSV -#endif - -/* - * Define SIGVOID if your signal handlers return void. On older - * systems, signal returns int, but on newer ones, it returns void. - */ -#undef SIGVOID - -/* - * Define USESIGSET if you have sigset for BSD 4.1 reliable signals. - */ -#undef USESIGSET - -/* - * Define SYSVSIGS if signal handlers must be reinstalled after - * they have been called. - */ -#undef SYSVSIGS - -/* - * Define BSDWAIT if your system defines a 'union wait' in - * - * Only allow BSDWAIT i.e. wait3 on nonposix systems, since - * posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl - * - */ -#ifndef POSIX -#undef BSDWAIT -#endif - -/* - * On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com - */ -#ifdef BSDWAIT -#undef USE_WAIT2 -#endif - -/* - * Define HAVE_DIRENT_H if your system has instead of - * - */ -#undef HAVE_DIRENT_H - -/* - * If your system has getutent(), pututline(), etc. to write to the - * utmp file, define GETUTENT. - */ -#undef GETUTENT - -/* - * Define UTHOST if the utmp file has a host field. - */ -#undef UTHOST - -/* - * Define if you have the utempter utmp helper program - */ -#undef HAVE_UTEMPTER - -/* - * If ttyslot() breaks getlogin() by returning indexes to utmp entries - * of type DEAD_PROCESS, then our getlogin() replacement should be - * selected by defining BUGGYGETLOGIN. - */ -#undef BUGGYGETLOGIN - -/* - * If your system has the calls setreuid() and setregid(), - * define HAVE_SETREUID. Otherwise screen will use a forked process to - * safely create output files without retaining any special privileges. - */ -#undef HAVE_SETREUID - -/* - * If your system supports BSD4.4's seteuid() and setegid(), define - * HAVE_SETEUID. - */ -#undef HAVE_SETEUID - -/* - * If you want the "time" command to display the current load average - * define LOADAV. Maybe you must install screen with the needed - * privileges to read /dev/kmem. - * Note that NLIST_ stuff is only checked, when getloadavg() is not available. - */ -#undef LOADAV - -#undef LOADAV_NUM -#undef LOADAV_TYPE -#undef LOADAV_SCALE -#undef LOADAV_GETLOADAVG -#undef LOADAV_UNIX -#undef LOADAV_AVENRUN -#undef LOADAV_USE_NLIST64 - -#undef NLIST_DECLARED -#undef NLIST_STRUCT -#undef NLIST_NAME_UNION - -/* - * If your system has the new format /etc/ttys (like 4.3 BSD) and the - * getttyent(3) library functions, define GETTTYENT. - */ -#undef GETTTYENT - -/* - * Define USEBCOPY if the bcopy/memcpy from your system's C library - * supports the overlapping of source and destination blocks. When - * undefined, screen uses its own (probably slower) version of bcopy(). - * - * SYSV machines may have a working memcpy() -- Oh, this is - * quite unlikely. Tell me if you see one. - * "But then, memmove() should work, if at all available" he thought... - * Boing, never say "works everywhere" unless you checked SCO UNIX. - * Their memove fails the test in the configure script. Sigh. (Juergen) - */ -#undef USEBCOPY -#undef USEMEMCPY -#undef USEMEMMOVE - -/* - * If your system has vsprintf() and requires the use of the macros in - * "varargs.h" to use functions with variable arguments, - * define USEVARARGS. - */ -#undef USEVARARGS - -/* - * If your system has strerror() define this. - */ -#undef HAVE_STRERROR - -/* - * If the select return value doesn't treat a descriptor that is - * usable for reading and writing as two hits, define SELECT_BROKEN. - */ -#undef SELECT_BROKEN - -/* - * Define this if your system supports named pipes. - */ -#undef NAMEDPIPE - -/* - * Define this if your system exits select() immediatly if a pipe is - * opened read-only and no writer has opened it. - */ -#undef BROKEN_PIPE - -/* - * Define this if the unix-domain socket implementation doesn't - * create a socket in the filesystem. - */ -#undef SOCK_NOT_IN_FS - -/* - * If your system has setenv() and unsetenv() define USESETENV - */ -#undef USESETENV - -/* - * If your system does not come with a setenv()/putenv()/getenv() - * functions, you may bring in our own code by defining NEEDPUTENV. - */ -#undef NEEDPUTENV - -/* - * If the passwords are stored in a shadow file and you want the - * builtin lock to work properly, define SHADOWPW. - */ -#undef SHADOWPW - -/* - * If you are on a SYS V machine that restricts filename length to 14 - * characters, you may need to enforce that by setting NAME_MAX to 14 - */ -#undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ -#undef NAME_MAX - -/* - * define HAVE_RENAME if your system has a rename() function - */ -#undef HAVE_RENAME - -/* - * define HAVE__EXIT if your system has the _exit() call. - */ -#undef HAVE__EXIT - -/* - * define HAVE_LSTAT if your system has symlinks and the lstat() call. - */ -#undef HAVE_LSTAT - -/* - * define HAVE_UTIMES if your system has the utimes() call. - */ -#undef HAVE_UTIMES - -/* - * define HAVE_FCHOWN if your system has the fchown() call. - */ -#undef HAVE_FCHOWN - -/* - * define HAVE_FCHMOD if your system has the fchmod() call. - */ -#undef HAVE_FCHMOD - -/* - * define HAVE_VSNPRINTF if your system has vsnprintf() (GNU lib). - */ -#undef HAVE_VSNPRINTF - -/* - * define HAVE_GETCWD if your system has the getcwd() call. - */ -#undef HAVE_GETCWD - -/* - * define HAVE_SETLOCALE if your system has the setlocale() call. - */ -#undef HAVE_SETLOCALE - -/* - * define HAVE_STRFTIME if your system has the strftime() call. - */ -#undef HAVE_STRFTIME - -/* - * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call - * and defines CODESET. - */ -#undef HAVE_NL_LANGINFO - -/* - * Newer versions of Solaris include fdwalk, which can greatly improve - * the startup time of screen; otherwise screen spends a lot of time - * closing file descriptors. - */ -#undef HAVE_FDWALK - -/* - * define HAVE_DEV_PTC if you have a /dev/ptc character special - * device. - */ -#undef HAVE_DEV_PTC - -/* - * define HAVE_SVR4_PTYS if you have a /dev/ptmx character special - * device and support the ptsname(), grantpt(), unlockpt() functions. - */ -#undef HAVE_SVR4_PTYS - -/* - * define HAVE_GETPT if you have the getpt() function. - */ -#undef HAVE_GETPT - -/* - * define HAVE_OPENPTY if your system has the openpty() call. - */ -#undef HAVE_OPENPTY - -/* - * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen - * to unusual environments. E.g. For SunOs the defaults are "qpr" and - * "0123456789abcdef". For SunOs 4.1.2 - * #define PTYRANGE0 "pqrstuvwxyzPQRST" - * is recommended by Dan Jacobson. - */ -#undef PTYRANGE0 -#undef PTYRANGE1 - diff -Nru screen-4.0.3/configure screen-4.1.0~20120320gitdb59704/configure --- screen-4.0.3/configure 2003-12-05 13:46:53.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,9194 +0,0 @@ -#! /bin/sh -# From configure.in Revision: 1.18 . -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. -# -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# 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 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+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; 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'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# 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 - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - 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 - - ;; - 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_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - 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=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # 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 before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, 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 - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\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 sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -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$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# 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` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="screen.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if 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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# 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. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -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 | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$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" ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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 ;; - - -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 ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - 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 ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - 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 paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -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 - - -# 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 its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$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 - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - -# -# 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 \`..'] - -_ACEOF - - cat <<_ACEOF -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] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --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] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF -_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] - --disable-socket-dir disable system wide socket-dir and use ~/.screen instead - --enable-pam enable PAM support - --enable-locale use localized month/day names - --enable-telnet enable builtin telnet - --enable-colors256 enable support for 256 colors - --enable-rxvt_osc enable support for rxvt OSC codes - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-socket-dir=path where to put the per-user sockets - --with-pty-mode=mode default mode for ptys - --with-pty-group=group default group for ptys - --with-sys-screenrc=path where to put the global screenrc file - -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 - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style 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 - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -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 0 -fi -exec 5>config.log -cat >&5 <<_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.57. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -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` -hostinfo = `(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 - -} >&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_sep= -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_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - 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: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -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, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - 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 && - rm -rf 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 -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >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 -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; 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 `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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_config_headers="$ac_config_headers config.h" - - - -rev=`sed < ${srcdir}/patchlevel.h -n -e '/#define REV/s/#define REV *//p'` -vers=`sed < ${srcdir}/patchlevel.h -n -e '/#define VERS/s/#define VERS *//p'` -pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL *//p'` -VERSION="$rev.$vers.$pat" -echo "this is screen version $VERSION" 1>&6 - - -if test "x$prefix" = xNONE; then - echo $ECHO_N "checking for prefix by $ECHO_C" >&6 - # Extract the first word of "screen", so it can be a program name with args. -set dummy screen; 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_ac_prefix_program+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_prefix_program in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_prefix_program="$ac_prefix_program" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_prefix_program="$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 - - ;; -esac -fi -ac_prefix_program=$ac_cv_path_ac_prefix_program - -if test -n "$ac_prefix_program"; then - echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 -echo "${ECHO_T}$ac_prefix_program" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - if test -n $ac_prefix_program; then - prefix=`(dirname "$ac_prefix_program") 2>/dev/null || -$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ - X"$ac_prefix_program" : 'X\(//\)$' \| \ - X"$ac_prefix_program" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_prefix_program" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - prefix=`(dirname "$prefix") 2>/dev/null || -$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$prefix" : 'X\(//\)[^/]' \| \ - X"$prefix" : 'X\(//\)$' \| \ - X"$prefix" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$prefix" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - fi -fi - -if test "x$prefix" = xNONE; then - echo $ECHO_N "checking for prefix by $ECHO_C" >&6 - # Extract the first word of "gzip", so it can be a program name with args. -set dummy gzip; 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_ac_prefix_program+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_prefix_program in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_prefix_program="$ac_prefix_program" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_prefix_program="$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 - - ;; -esac -fi -ac_prefix_program=$ac_cv_path_ac_prefix_program - -if test -n "$ac_prefix_program"; then - echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 -echo "${ECHO_T}$ac_prefix_program" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - if test -n $ac_prefix_program; then - prefix=`(dirname "$ac_prefix_program") 2>/dev/null || -$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ - X"$ac_prefix_program" : 'X\(//\)$' \| \ - X"$ac_prefix_program" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_prefix_program" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - prefix=`(dirname "$prefix") 2>/dev/null || -$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$prefix" : 'X\(//\)[^/]' \| \ - X"$prefix" : 'X\(//\)$' \| \ - X"$prefix" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$prefix" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - fi -fi - - -old_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 $as_executable_p "$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 - -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 $as_executable_p "$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 - -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 - - CC=$ac_ct_CC -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 $as_executable_p "$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 - -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 "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_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -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 - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -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 $as_executable_p "$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 - -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 - 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 $as_executable_p "$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 - -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 -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 $as_executable_p "$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 - -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 - - CC=$ac_ct_CC -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` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&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 -#line $LINENO "configure" -/* 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" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - 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 -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check 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' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (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); }; 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 | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - 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 -#line $LINENO "configure" -/* 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 { (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 - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) 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 -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 -CFLAGS="-g" -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 - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -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 ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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; -} -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 -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - ''\ - '#include ' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext 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 - -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 -#line $LINENO "configure" -/* 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 -#line $LINENO "configure" -/* 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_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_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - -if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 -if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -echo "$as_me:$LINENO: checking for library containing strerror" >&5 -echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 -if test "${ac_cv_search_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_strerror=no -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror (); -int -main () -{ -strerror (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_strerror="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_strerror" = no; then - for ac_lib in cposix; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror (); -int -main () -{ -strerror (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_strerror="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 -echo "${ECHO_T}$ac_cv_search_strerror" >&6 -if test "$ac_cv_search_strerror" != no; then - test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" - -fi - - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -main(){exit(0);} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 ) - -if test $CC != cc ; then -echo "Your $CC failed - restarting with CC=cc" 1>&6 - -echo "" 1>&6 - -CC=cc -export CC -exec $0 $configure_args -fi - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -main(){exit(0);} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 ) -exec 5>&2 -eval $ac_link -echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6 - -echo "$ac_compile" 1>&6 - -{ { echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5 -echo "$as_me: error: Can't run the compiler - sorry" >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -main() -{ - int __something_strange_(); - __something_strange_(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5 -echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;} - { (exit 1); exit 1; }; } -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -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 $as_executable_p "$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 - -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 - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $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 $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# 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" -# ./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/* | \ - /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 $as_executable_p "$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 - - -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. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - 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' - - -if test -f etc/toolcheck; then -{ echo "$as_me:$LINENO: checking for buggy tools..." >&5 -echo "$as_me: checking for buggy tools..." >&6;} -sh etc/toolcheck 1>&6 -fi - - - -echo "$as_me:$LINENO: checking if a system-wide socket dir should be used" >&5 -echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6 -# Check whether --enable-socket-dir or --disable-socket-dir was given. -if test "${enable_socket_dir+set}" = set; then - enableval="$enable_socket_dir" - - echo "$as_me:$LINENO: result: no. ~/.screen will be used instead." >&5 -echo "${ECHO_T}no. ~/.screen will be used instead." >&6 - -else - - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking for the socket dir" >&5 -echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6 - SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")" - -# Check whether --with-socket-dir or --without-socket-dir was given. -if test "${with_socket_dir+set}" = set; then - withval="$with_socket_dir" - SOCKDIR="\"${withval}\"" -fi; - echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5 -echo "${ECHO_T}${SOCKDIR}" >&6 - cat >>confdefs.h <<_ACEOF -#define SOCKDIR $SOCKDIR -_ACEOF - - - -fi; - - -if test -n "$ISC"; then - cat >>confdefs.h <<\_ACEOF -#define ISC 1 -_ACEOF - LIBS="$LIBS -linet" -fi - - -if test -f /sysV68 ; then -cat >>confdefs.h <<\_ACEOF -#define sysV68 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for MIPS..." >&5 -echo "$as_me: checking for MIPS..." >&6;} -if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then -oldlibs="$LIBS" -test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha. -{ echo "$as_me:$LINENO: checking mld library..." >&5 -echo "$as_me: checking mld library..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$oldlibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -if test -r /dev/ptc; then -cat >>confdefs.h <<\_ACEOF -#define MIPS 1 -_ACEOF - -{ echo "$as_me:$LINENO: checking wait3..." >&5 -echo "$as_me: checking wait3..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -wait3(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ echo "$as_me:$LINENO: checking wait2..." >&5 -echo "$as_me: checking wait2..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -wait2(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define USE_WAIT2 1 -_ACEOF - LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd" - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -fi - - -{ echo "$as_me:$LINENO: checking for Ultrix..." >&5 -echo "$as_me: checking for Ultrix..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined(ultrix) || defined(__ultrix) - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - ULTRIX=1 -fi -rm -f conftest* - - -if test -f /usr/lib/libpyr.a ; then -oldlibs="$LIBS" -LIBS="$LIBS -lpyr" -{ echo "$as_me:$LINENO: checking Pyramid OSX..." >&5 -echo "$as_me: checking Pyramid OSX..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -open_controlling_pty("") - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define OSX 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$oldlibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi - -{ echo "$as_me:$LINENO: checking for butterfly..." >&5 -echo "$as_me: checking for butterfly..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined(butterfly) - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - butterfly=1 -fi -rm -f conftest* - - -if test -z "$butterfly"; then -if test -n "$ULTRIX"; then - test -z "$GCC" && CC="$CC -YBSD" -fi -{ echo "$as_me:$LINENO: checking for POSIX.1..." >&5 -echo "$as_me: checking for POSIX.1..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -main () { -#ifdef _POSIX_VERSION - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - echo "- you have a POSIX system" 1>&6 - cat >>confdefs.h <<\_ACEOF -#define POSIX 1 -_ACEOF - posix=1 -fi -rm -f conftest* - -fi - -{ echo "$as_me:$LINENO: checking for System V..." >&5 -echo "$as_me: checking for System V..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -int -main () -{ -int x = SIGCHLD | FNDELAY; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >>confdefs.h <<\_ACEOF -#define SYSV 1 -_ACEOF - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking for sequent/ptx..." >&5 -echo "$as_me: checking for sequent/ptx..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef _SEQUENT_ - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - LIBS="$LIBS -lsocket -linet";seqptx=1 -fi -rm -f conftest* - - -oldlibs="$LIBS" -LIBS="$LIBS -lelf" -{ echo "$as_me:$LINENO: checking SVR4..." >&5 -echo "$as_me: checking SVR4..." >&6;} -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 -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 -#line $LINENO "configure" -/* 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 -#line $LINENO "configure" -/* 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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#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)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 - - -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if test "${ac_cv_header_dwarf_h+set}" = set; then - echo "$as_me:$LINENO: checking for dwarf.h" >&5 -echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6 -if test "${ac_cv_header_dwarf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 -echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking dwarf.h usability" >&5 -echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 dwarf.h presence" >&5 -echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 in - yes:no ) - { echo "$as_me:$LINENO: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: dwarf.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: dwarf.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for dwarf.h" >&5 -echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6 -if test "${ac_cv_header_dwarf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_dwarf_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 -echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6 - -fi -if test $ac_cv_header_dwarf_h = yes; then - cat >>confdefs.h <<\_ACEOF -#define SVR4 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define BUGGYGETLOGIN 1 -_ACEOF - -else - if test "${ac_cv_header_elf_h+set}" = set; then - echo "$as_me:$LINENO: checking for elf.h" >&5 -echo $ECHO_N "checking for elf.h... $ECHO_C" >&6 -if test "${ac_cv_header_elf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 -echo "${ECHO_T}$ac_cv_header_elf_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking elf.h usability" >&5 -echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 elf.h presence" >&5 -echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 in - yes:no ) - { echo "$as_me:$LINENO: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: elf.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: elf.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for elf.h" >&5 -echo $ECHO_N "checking for elf.h... $ECHO_C" >&6 -if test "${ac_cv_header_elf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_elf_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 -echo "${ECHO_T}$ac_cv_header_elf_h" >&6 - -fi -if test $ac_cv_header_elf_h = yes; then - cat >>confdefs.h <<\_ACEOF -#define SVR4 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define BUGGYGETLOGIN 1 -_ACEOF - -fi - - -fi - - - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$oldlibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking for Solaris 2.x..." >&5 -echo "$as_me: checking for Solaris 2.x..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined(SVR4) && defined(sun) - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - LIBS="$LIBS -lsocket -lnsl -lkstat" -fi -rm -f conftest* - - - - -{ echo "$as_me:$LINENO: checking BSD job jontrol..." >&5 -echo "$as_me: checking BSD job jontrol..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ - -#ifdef POSIX -tcsetpgrp(0, 0); -#else -int x = TIOCSPGRP; -#ifdef SYSV -setpgrp(); -#else -int y = TIOCNOTTY; -#endif -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- you have jobcontrol" 1>&6 - cat >>confdefs.h <<\_ACEOF -#define BSDJOBS 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "- you don't have jobcontrol" 1>&6 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking setreuid..." >&5 -echo "$as_me: checking setreuid..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -#ifdef __hpux -setresuid(0, 0, 0); -#else -setreuid(0, 0); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_SETREUID 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking seteuid..." >&5 -echo "$as_me: checking seteuid..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) -seteuid_is_broken(0); -#else -seteuid(0); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_SETEUID 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - -{ echo "$as_me:$LINENO: checking select..." >&5 -echo "$as_me: checking select..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -select(0, 0, 0, 0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$LIBS -lnet -lnsl" -{ echo "$as_me:$LINENO: checking select with $LIBS..." >&5 -echo "$as_me: checking select with $LIBS..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -select(0, 0, 0, 0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 -echo "$as_me: error: !!! no select - no screen" >&2;} - { (exit 1); exit 1; }; } -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking fifos..." >&5 -echo "$as_me: checking fifos..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - -#ifndef O_NONBLOCK -#define O_NONBLOCK O_NDELAY -#endif -#ifndef S_IFIFO -#define S_IFIFO 0010000 -#endif - -char *fin = "/tmp/conftest$$"; - -main() -{ - struct stat stb; -#ifdef FD_SET - fd_set f; -#else - int f; -#endif - - (void)alarm(5); -#ifdef POSIX - if (mkfifo(fin, 0777)) -#else - if (mknod(fin, S_IFIFO|0777, 0)) -#endif - exit(1); - if (stat(fin, &stb) || (stb.st_mode & S_IFIFO) != S_IFIFO) - exit(1); - close(0); -#ifdef __386BSD__ - /* - * The next test fails under 386BSD, but screen works using fifos. - * Fifos in O_RDWR mode are only used for the BROKEN_PIPE case and for - * the select() configuration test. - */ - exit(0); -#endif - if (open(fin, O_RDONLY | O_NONBLOCK)) - exit(1); - if (fork() == 0) - { - close(0); - if (open(fin, O_WRONLY | O_NONBLOCK)) - exit(1); - close(0); - if (open(fin, O_WRONLY | O_NONBLOCK)) - exit(1); - if (write(0, "TEST", 4) == -1) - exit(1); - exit(0); - } -#ifdef FD_SET - FD_SET(0, &f); -#else - f = 1; -#endif - if (select(1, &f, 0, 0, 0) == -1) - exit(1); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- your fifos are usable" 1>&6 - fifo=1 -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 ) -echo "- your fifos are not usable" 1>&6 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f /tmp/conftest* - -if test -n "$fifo"; then -{ echo "$as_me:$LINENO: checking for broken fifo implementation..." >&5 -echo "$as_me: checking for broken fifo implementation..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include - -#ifndef O_NONBLOCK -#define O_NONBLOCK O_NDELAY -#endif -#ifndef S_IFIFO -#define S_IFIFO 0010000 -#endif - -char *fin = "/tmp/conftest$$"; - -main() -{ - struct timeval tv; -#ifdef FD_SET - fd_set f; -#else - int f; -#endif - -#ifdef POSIX - if (mkfifo(fin, 0600)) -#else - if (mknod(fin, S_IFIFO|0600, 0)) -#endif - exit(1); - close(0); - if (open(fin, O_RDONLY|O_NONBLOCK)) - exit(1); -#ifdef FD_SET - FD_SET(0, &f); -#else - f = 1; -#endif - tv.tv_sec = 1; - tv.tv_usec = 0; - if (select(1, &f, 0, 0, &tv)) - exit(1); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- your implementation is ok" 1>&6 - -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 ) -echo "- you have a broken implementation" 1>&6 - cat >>confdefs.h <<\_ACEOF -#define BROKEN_PIPE 1 -_ACEOF - fifobr=1 -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f /tmp/conftest* -fi - - -{ echo "$as_me:$LINENO: checking sockets..." >&5 -echo "$as_me: checking sockets..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include - -char *son = "/tmp/conftest$$"; - -main() -{ - int s1, s2, l; - struct sockaddr_un a; -#ifdef FD_SET - fd_set f; -#else - int f; -#endif - - (void)alarm(5); - if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - exit(1); - a.sun_family = AF_UNIX; - strcpy(a.sun_path, son); - (void) unlink(son); - if (bind(s1, (struct sockaddr *) &a, strlen(son)+2) == -1) - exit(1); - if (listen(s1, 2)) - exit(1); - if (fork() == 0) - { - if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - kill(getppid(), 3); - (void)connect(s2, (struct sockaddr *)&a, strlen(son) + 2); - if (write(s2, "HELLO", 5) == -1) - kill(getppid(), 3); - exit(0); - } - l = sizeof(a); - close(0); - if (accept(s1, &a, &l)) - exit(1); -#ifdef FD_SET - FD_SET(0, &f); -#else - f = 1; -#endif - if (select(1, &f, 0, 0, 0) == -1) - exit(1); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- your sockets are usable" 1>&6 - sock=1 -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 ) -echo "- your sockets are not usable" 1>&6 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f /tmp/conftest* - -if test -n "$sock"; then -{ echo "$as_me:$LINENO: checking socket implementation..." >&5 -echo "$as_me: checking socket implementation..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include - -char *son = "/tmp/conftest$$"; - -main() -{ - int s; - struct stat stb; - struct sockaddr_un a; - if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - exit(0); - a.sun_family = AF_UNIX; - strcpy(a.sun_path, son); - (void) unlink(son); - if (bind(s, (struct sockaddr *) &a, strlen(son)+2) == -1) - exit(0); - if (stat(son, &stb)) - exit(1); - close(s); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- you are normal" 1>&6 - -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 ) -echo "- unix domain sockets are not kept in the filesystem" 1>&6 - -cat >>confdefs.h <<\_ACEOF -#define SOCK_NOT_IN_FS 1 -_ACEOF - socknofs=1 -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f /tmp/conftest* -fi - - -if test -n "$fifo"; then - if test -n "$sock"; then - if test -n "$nore"; then - echo "- hmmm... better take the fifos" 1>&6 - - cat >>confdefs.h <<\_ACEOF -#define NAMEDPIPE 1 -_ACEOF - - elif test -n "$fifobr"; then - echo "- as your fifos are broken lets use the sockets." 1>&6 - - else - echo "- both sockets and fifos usable. let's take fifos." 1>&6 - - cat >>confdefs.h <<\_ACEOF -#define NAMEDPIPE 1 -_ACEOF - - fi - else - echo "- using named pipes" 1>&6 - - cat >>confdefs.h <<\_ACEOF -#define NAMEDPIPE 1 -_ACEOF - - fi -elif test -n "$sock"; then - echo "- using unix-domain sockets" 1>&6 - -else - { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5 -echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;} - { (exit 1); exit 1; }; } -fi - - -{ echo "$as_me:$LINENO: checking select return value..." >&5 -echo "$as_me: checking select return value..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - -char *nam = "/tmp/conftest$$"; - -#ifdef NAMEDPIPE - -#ifndef O_NONBLOCK -#define O_NONBLOCK O_NDELAY -#endif -#ifndef S_IFIFO -#define S_IFIFO 0010000 -#endif - - -main() -{ -#ifdef FD_SET - fd_set f; -#else - int f; -#endif - -#ifdef __FreeBSD__ -/* From Andrew A. Chernov (ache@astral.msk.su): - * opening RDWR fifo fails in BSD 4.4, but select return values are - * right. - */ - exit(0); -#endif - (void)alarm(5); -#ifdef POSIX - if (mkfifo(nam, 0777)) -#else - if (mknod(nam, S_IFIFO|0777, 0)) -#endif - exit(1); - close(0); - if (open(nam, O_RDWR | O_NONBLOCK)) - exit(1); - if (write(0, "TEST", 4) == -1) - exit(1); - -#else - -#include -#include -#include - -main() -{ - int s1, s2, l; - struct sockaddr_un a; -#ifdef FD_SET - fd_set f; -#else - int f; -#endif - - (void)alarm(5); - if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - exit(1); - a.sun_family = AF_UNIX; - strcpy(a.sun_path, nam); - (void) unlink(nam); - if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1) - exit(1); - if (listen(s1, 2)) - exit(1); - if (fork() == 0) - { - if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - kill(getppid(), 3); - (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2); - if (write(s2, "HELLO", 5) == -1) - kill(getppid(), 3); - exit(0); - } - l = sizeof(a); - close(0); - if (accept(s1, (struct sockaddr *)&a, &l)) - exit(1); -#endif - - -#ifdef FD_SET - FD_SET(0, &f); -#else - f = 1; -#endif - if (select(1, &f, 0, 0, 0) == -1) - exit(1); - if (select(1, &f, &f, 0, 0) != 2) - exit(1); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- select is ok" 1>&6 - -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 ) -echo "- select can't count" 1>&6 - cat >>confdefs.h <<\_ACEOF -#define SELECT_BROKEN 1 -_ACEOF - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -{ echo "$as_me:$LINENO: checking for tgetent..." >&5 -echo "$as_me: checking for tgetent..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -tgetent((char *)0, (char *)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -olibs="$LIBS" -LIBS="-lcurses $olibs" -{ echo "$as_me:$LINENO: checking libcurses..." >&5 -echo "$as_me: checking libcurses..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -#ifdef __hpux -__sorry_hpux_libcurses_is_totally_broken_in_10_10(); -#else -tgetent((char *)0, (char *)0); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="-ltermcap $olibs" -{ echo "$as_me:$LINENO: checking libtermcap..." >&5 -echo "$as_me: checking libtermcap..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -tgetent((char *)0, (char *)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="-ltermlib $olibs" -{ echo "$as_me:$LINENO: checking libtermlib..." >&5 -echo "$as_me: checking libtermlib..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -tgetent((char *)0, (char *)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="-lncurses $olibs" -{ echo "$as_me:$LINENO: checking libncurses..." >&5 -echo "$as_me: checking libncurses..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -tgetent((char *)0, (char *)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 -echo "$as_me: error: !!! no tgetent - no screen" >&2;} - { (exit 1); exit 1; }; } -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -main() -{ - exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- you use the termcap database" 1>&6 - -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 ) -echo "- you use the terminfo database" 1>&6 - cat >>confdefs.h <<\_ACEOF -#define TERMINFO 1 -_ACEOF - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: checking ospeed..." >&5 -echo "$as_me: checking ospeed..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern short ospeed; -int -main () -{ -ospeed=5; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >>confdefs.h <<\_ACEOF -#define NEED_OSPEED 1 -_ACEOF - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking for /dev/ptc..." >&5 -echo "$as_me: checking for /dev/ptc..." >&6;} -if test -r /dev/ptc; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEV_PTC 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for SVR4 ptys..." >&5 -echo "$as_me: checking for SVR4 ptys..." >&6;} -sysvr4ptys= -if test -c /dev/ptmx ; then -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -ptsname(0);grantpt(0);unlockpt(0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_SVR4_PTYS 1 -_ACEOF - -sysvr4ptys=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi - - -for ac_func in getpt -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 eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* 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 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -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 -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&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 -z "$sysvr4ptys"; then - -for ac_func in openpty -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 eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* 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 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -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 -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&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 - echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 -echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 -if test "${ac_cv_lib_util_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lutil $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char openpty (); -int -main () -{ -openpty (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_util_openpty=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_util_openpty=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 -echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 -if test $ac_cv_lib_util_openpty = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_OPENPTY 1 -_ACEOF - LIBS="$LIBS -lutil" -fi - -fi -done - -fi - -{ echo "$as_me:$LINENO: checking for ptyranges..." >&5 -echo "$as_me: checking for ptyranges..." >&6;} -if test -d /dev/ptym ; then -pdir='/dev/ptym' -else -pdir='/dev' -fi -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef M_UNIX - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - ptys=`echo /dev/ptyp??` -else - ptys=`echo $pdir/pty??` -fi -rm -f conftest* - -if test "$ptys" != "$pdir/pty??" ; then -p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` -p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` -cat >>confdefs.h <<_ACEOF -#define PTYRANGE0 "$p0" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PTYRANGE1 "$p1" -_ACEOF - -fi - - -# Check whether --with-pty-mode or --without-pty-mode was given. -if test "${with_pty_mode+set}" = set; then - withval="$with_pty_mode" - ptymode="${withval}" -fi; - -# Check whether --with-pty-group or --without-pty-group was given. -if test "${with_pty_group+set}" = set; then - withval="$with_pty_group" - ptygrp="${withval}" -fi; -test -n "$ptymode" || ptymode=0620 -if test -n "$ptygrp" ; then -cat >>confdefs.h <<_ACEOF -#define PTYMODE $ptymode -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PTYGROUP $ptygrp -_ACEOF - -else - -{ echo "$as_me:$LINENO: checking default tty permissions/group..." >&5 -echo "$as_me: checking default tty permissions/group..." >&6;} -rm -f conftest_grp -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -main() -{ - struct stat sb; - char *x,*ttyname(); - int om, m; - FILE *fp; - - if (!(x = ttyname(0))) exit(1); - if (stat(x, &sb)) exit(1); - om = sb.st_mode; - if (om & 002) exit(0); - m = system("mesg y"); - if (m == -1 || m == 127) exit(1); - if (stat(x, &sb)) exit(1); - m = sb.st_mode; - if (chmod(x, om)) exit(1); - if (m & 002) exit(0); - if (sb.st_gid == getgid()) exit(1); - if (!(fp=fopen("conftest_grp", "w"))) - exit(1); - fprintf(fp, "%d\n", sb.st_gid); - fclose(fp); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - if test -f conftest_grp; then - ptygrp=`cat conftest_grp` - echo "- pty mode: $ptymode, group: $ptygrp" 1>&6 - - cat >>confdefs.h <<_ACEOF -#define PTYMODE $ptymode -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define PTYGROUP $ptygrp -_ACEOF - - else - echo "- ptys are world accessable" 1>&6 - - fi - -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 ) - - WRITEPATH='' - XTERMPATH='' - # Extract the first word of "write", so it can be a program name with args. -set dummy write; 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_WRITEPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $WRITEPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_WRITEPATH="$WRITEPATH" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_WRITEPATH="$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 - - ;; -esac -fi -WRITEPATH=$ac_cv_path_WRITEPATH - -if test -n "$WRITEPATH"; then - echo "$as_me:$LINENO: result: $WRITEPATH" >&5 -echo "${ECHO_T}$WRITEPATH" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - # Extract the first word of "xterm", so it can be a program name with args. -set dummy xterm; 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_XTERMPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $XTERMPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_XTERMPATH="$XTERMPATH" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_XTERMPATH="$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 - - ;; -esac -fi -XTERMPATH=$ac_cv_path_XTERMPATH - -if test -n "$XTERMPATH"; then - echo "$as_me:$LINENO: result: $XTERMPATH" >&5 -echo "${ECHO_T}$XTERMPATH" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - found= - if test -n "$WRITEPATH$XTERMPATH"; then - findfollow= - lsfollow= - found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null` - if test -n "$found"; then - findfollow=-follow - lsfollow=L - fi - if test -n "$XTERMPATH"; then - ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'` - if test tty != "$ptygrpn"; then - XTERMPATH= - fi - fi - fi - if test -n "$WRITEPATH$XTERMPATH"; then - found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print` - if test -n "$found"; then - ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'` - echo "- pty mode: $ptymode, group: $ptygrp" 1>&6 - - cat >>confdefs.h <<_ACEOF -#define PTYMODE $ptymode -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define PTYGROUP $ptygrp -_ACEOF - - else - echo "- ptys are world accessable" 1>&6 - - fi - else - echo "- can't determine - assume ptys are world accessable" 1>&6 - - fi - - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest_grp -fi - -{ echo "$as_me:$LINENO: checking getutent..." >&5 -echo "$as_me: checking getutent..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include /* to get time_t on SCO */ -#include -#if defined(SVR4) && !defined(DGUX) -#include -#define utmp utmpx -#else -#include -#endif -#ifdef __hpux -#define pututline _pututline -#endif - -int -main () -{ -int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define GETUTENT 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -olibs="$LIBS" -LIBS="$LIBS -lgen" -{ echo "$as_me:$LINENO: checking getutent with -lgen..." >&5 -echo "$as_me: checking getutent with -lgen..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#if defined(SVR4) && !defined(DGUX) -#include -#define utmp utmpx -#else -#include -#endif -#ifdef __hpux -#define pututline _pututline -#endif - -int -main () -{ -int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define GETUTENT 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$olibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking ut_host..." >&5 -echo "$as_me: checking ut_host..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#if defined(SVR4) && !defined(DGUX) -#include -#define utmp utmpx -#else -#include -#endif - -int -main () -{ -struct utmp u; u.ut_host[0] = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define UTHOST 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -if test "${ac_cv_header_utempter_h+set}" = set; then - echo "$as_me:$LINENO: checking for utempter.h" >&5 -echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6 -if test "${ac_cv_header_utempter_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 -echo "${ECHO_T}$ac_cv_header_utempter_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking utempter.h usability" >&5 -echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 utempter.h presence" >&5 -echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 in - yes:no ) - { echo "$as_me:$LINENO: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: utempter.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: utempter.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for utempter.h" >&5 -echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6 -if test "${ac_cv_header_utempter_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_utempter_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 -echo "${ECHO_T}$ac_cv_header_utempter_h" >&6 - -fi -if test $ac_cv_header_utempter_h = yes; then - have_utempter=yes -else - have_utempter=no -fi - - -if test "$have_utempter" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_UTEMPTER 1 -_ACEOF - - LIBS="$LIBS -lutempter" -fi - -{ echo "$as_me:$LINENO: checking for libutil(s)..." >&5 -echo "$as_me: checking for libutil(s)..." >&6;} -test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" -test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" - -{ echo "$as_me:$LINENO: checking getloadavg..." >&5 -echo "$as_me: checking getloadavg..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -getloadavg((double *)0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define LOADAV_GETLOADAVG 1 -_ACEOF - load=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -if test -f /usr/lib/libkvm.a ; then -olibs="$LIBS" -LIBS="$LIBS -lkvm" -{ echo "$as_me:$LINENO: checking getloadavg with -lkvm..." >&5 -echo "$as_me: checking getloadavg with -lkvm..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -getloadavg((double *)0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define LOADAV_GETLOADAVG 1 -_ACEOF - load=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$olibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -if test -z "$load" ; then -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined(NeXT) || defined(apollo) || defined(linux) - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - load=1 -fi -rm -f conftest* - -fi -if test -z "$load" ; then -{ echo "$as_me:$LINENO: checking for kernelfile..." >&5 -echo "$as_me: checking for kernelfile..." >&6;} -for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do - if test -f $core || test -c $core; then - break - fi -done -if test ! -f $core && test ! -c $core ; then - echo "- no kernelfile found" 1>&6 - -else - echo "- using kernelfile '$core'" 1>&6 - - if test -r $core ; then - cat >>confdefs.h <<_ACEOF -#define LOADAV_UNIX "$core" -_ACEOF - - if test "${ac_cv_header_nlist_h+set}" = set; then - echo "$as_me:$LINENO: checking for nlist.h" >&5 -echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6 -if test "${ac_cv_header_nlist_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 -echo "${ECHO_T}$ac_cv_header_nlist_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking nlist.h usability" >&5 -echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 nlist.h presence" >&5 -echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 in - yes:no ) - { echo "$as_me:$LINENO: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: nlist.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: nlist.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for nlist.h" >&5 -echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6 -if test "${ac_cv_header_nlist_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_nlist_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 -echo "${ECHO_T}$ac_cv_header_nlist_h" >&6 - -fi -if test $ac_cv_header_nlist_h = yes; then - cat >>confdefs.h <<\_ACEOF -#define NLIST_STRUCT 1 -_ACEOF - - { echo "$as_me:$LINENO: checking n_un in struct nlist..." >&5 -echo "$as_me: checking n_un in struct nlist..." >&6;} - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -struct nlist n; n.n_un.n_name = 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define NLIST_NAME_UNION 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi - - - - { echo "$as_me:$LINENO: checking for nlist declaration..." >&5 -echo "$as_me: checking for nlist declaration..." >&6;} - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef NLIST_STRUCT -# include -#else -# include -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "nlist(( | )( | )*.*\(|\()" >/dev/null 2>&1; then - cat >>confdefs.h <<\_ACEOF -#define NLIST_DECLARED 1 -_ACEOF - -fi -rm -f conftest* - - - { echo "$as_me:$LINENO: checking for avenrun symbol..." >&5 -echo "$as_me: checking for avenrun symbol..." >&6;} - nlist64= - for av in avenrun _avenrun _Loadavg avenrun _avenrun _Loadavg; do - 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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef NLIST_STRUCT -#include -#else -#include -#endif - -$nlist64 - -struct nlist nl[2]; - -main() -{ -#if !defined(_AUX_SOURCE) && !defined(AUX) -# ifdef NLIST_NAME_UNION - nl[0].n_un.n_name = "$av"; -# else - nl[0].n_name = "$av"; -# endif -#else - strncpy(nl[0].n_name, "$av", sizeof(nl[0].n_name)); -#endif - nlist(LOADAV_UNIX, nl); - if (nl[0].n_value == 0) - exit(1); - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - avensym=$av;break -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - if test "$av" = _Loadavg; then - nlist64='#define nlist nlist64' - fi - done - if test -z "$avensym" ; then - echo "- no avenrun symbol found" 1>&6 - - else - echo "- using avenrun symbol '$avensym'" 1>&6 - - cat >>confdefs.h <<_ACEOF -#define LOADAV_AVENRUN "$avensym" -_ACEOF - - if test -n "$nlist64"; then - echo "- used nlist64 to find it" 1>&6 - - cat >>confdefs.h <<\_ACEOF -#define LOADAV_USE_NLIST64 1 -_ACEOF - - fi - load=1 - fi - else - echo "Can't configure the load average display feature" 1>&6 - - echo "because $core is not readable by you." 1>&6 - - echo "To configure the load average display feature" 1>&6 - - echo "re-run configure as root if possible." 1>&6 - - echo "If you are not the system administrator then disregard" 1>&6 - - echo "this warning. You can still use screen without" 1>&6 - - echo "the load average display feature." 1>&6 - - fi -fi -fi - -cat > conftest.c < -#include - -_CUT_HERE_ - -#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) -loadtype=long -# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) -loadscale=65536 -# else -# if defined(FSCALE) && !defined(__osf__) -# undef FSCALE -loadscale=FSCALE -# else -# ifdef sgi -loadtype=int -loadscale=1024 -# else -# if defined(MIPS) || defined(SVR4) || defined(m88k) -loadscale=256 -# else /* not MIPS */ -loadscale=1000 /* our default value */ -# endif /* MIPS */ -# endif /* sgi */ -# endif /* not FSCALE */ -# endif /* not apollo */ -#else -loadtype=double -loadscale=1 -#endif -#ifdef alliant -loadnum=4 -#else -loadnum=3 -#endif - -EOF -eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.out" -. ./conftest.out -rm -f conftest* - - -if test -n "$load" ; then cat >>confdefs.h <<\_ACEOF -#define LOADAV 1 -_ACEOF - fi -if test -n "$loadtype" ; then cat >>confdefs.h <<_ACEOF -#define LOADAV_TYPE $loadtype -_ACEOF - fi -if test -n "$loadnum" ; then cat >>confdefs.h <<_ACEOF -#define LOADAV_NUM $loadnum -_ACEOF - fi -if test -n "$loadscale" ; then cat >>confdefs.h <<_ACEOF -#define LOADAV_SCALE $loadscale -_ACEOF - fi - -if test -n "$posix" ; then - -echo "assuming posix signal definition" 1>&6 - -cat >>confdefs.h <<\_ACEOF -#define SIGVOID 1 -_ACEOF - - -else - -{ echo "$as_me:$LINENO: checking return type of signal handlers..." >&5 -echo "$as_me: checking return type of signal handlers..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#ifdef signal -#undef signal -#endif -extern void (*signal ()) (); -int -main () -{ -int i; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define SIGVOID 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking sigset..." >&5 -echo "$as_me: checking sigset..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -int -main () -{ - -#ifdef SIGVOID -sigset(0, (void (*)())0); -#else -sigset(0, (int (*)())0); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define USESIGSET 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking signal implementation..." >&5 -echo "$as_me: checking signal implementation..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -#ifndef SIGCLD -#define SIGCLD SIGCHLD -#endif -#ifdef USESIGSET -#define signal sigset -#endif - -int got; - -#ifdef SIGVOID -void -#endif -hand() -{ - got++; -} - -main() -{ - /* on hpux we use sigvec to get bsd signals */ -#ifdef __hpux - (void)signal(SIGCLD, hand); - kill(getpid(), SIGCLD); - kill(getpid(), SIGCLD); - if (got < 2) - exit(1); -#endif - exit(0); -} - -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 ) -cat >>confdefs.h <<\_ACEOF -#define SYSVSIGS 1 -_ACEOF - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -fi - - -{ echo "$as_me:$LINENO: checking for crypt and sec libraries..." >&5 -echo "$as_me: checking for crypt and sec libraries..." >&6;} -test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" -oldlibs="$LIBS" -LIBS="$LIBS -lcrypt" -{ echo "$as_me:$LINENO: checking crypt..." >&5 -echo "$as_me: checking crypt..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$oldlibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" -test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" -oldlibs="$LIBS" -LIBS="$LIBS -lsun" -{ echo "$as_me:$LINENO: checking IRIX sun library..." >&5 -echo "$as_me: checking IRIX sun library..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* 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 { (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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$oldlibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking syslog..." >&5 -echo "$as_me: checking syslog..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -closelog(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -oldlibs="$LIBS" -LIBS="$LIBS -lbsd" -{ echo "$as_me:$LINENO: checking syslog in libbsd.a..." >&5 -echo "$as_me: checking syslog in libbsd.a..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -closelog(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "- found." 1>&6 - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -LIBS="$oldlibs" -echo "- bad news: syslog missing." 1>&6 - cat >>confdefs.h <<\_ACEOF -#define NOSYSLOG 1 -_ACEOF - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef M_UNIX - yes; -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - LIBS="$LIBS -lsocket -lcrypt_i" -fi -rm -f conftest* - - -{ echo "$as_me:$LINENO: checking wait union..." >&5 -echo "$as_me: checking wait union..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ - - union wait x; - int y; -#ifdef WEXITSTATUS - y = WEXITSTATUS(x); -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define BSDWAIT 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -if test -z "$butterfly"; then -{ echo "$as_me:$LINENO: checking for termio or termios..." >&5 -echo "$as_me: checking for termio or termios..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - cat >>confdefs.h <<\_ACEOF -#define TERMIO 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - if test -n "$posix"; then -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - cat >>confdefs.h <<\_ACEOF -#define TERMIO 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi -rm -f conftest.err conftest.$ac_ext -fi - -fi -rm -f conftest.err conftest.$ac_ext -fi - -{ echo "$as_me:$LINENO: checking getspnam..." >&5 -echo "$as_me: checking getspnam..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -getspnam("x"); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define SHADOWPW 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking getttyent..." >&5 -echo "$as_me: checking getttyent..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -getttyent(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define GETTTYENT 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking fdwalk..." >&5 -echo "$as_me: checking fdwalk..." >&6;} -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -fdwalk(NULL, NULL); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_FDWALK 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -{ echo "$as_me:$LINENO: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5 -echo "$as_me: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&6;} -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -main() { - char buf[10]; - strcpy(buf, "abcdefghi"); - bcopy(buf, buf + 2, 3); - if (strncmp(buf, "ababcf", 6)) - exit(1); - strcpy(buf, "abcdefghi"); - bcopy(buf + 2, buf, 3); - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define USEBCOPY 1 -_ACEOF - -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#define bcopy(s,d,l) memmove(d,s,l) -main() { - char buf[10]; - strcpy(buf, "abcdefghi"); - bcopy(buf, buf + 2, 3); - if (strncmp(buf, "ababcf", 6)) - exit(1); - strcpy(buf, "abcdefghi"); - bcopy(buf + 2, buf, 3); - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define USEMEMMOVE 1 -_ACEOF - -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#define bcopy(s,d,l) memcpy(d,s,l) -main() { - char buf[10]; - strcpy(buf, "abcdefghi"); - bcopy(buf, buf + 2, 3); - if (strncmp(buf, "ababcf", 6)) - exit(1); - strcpy(buf, "abcdefghi"); - bcopy(buf + 2, buf, 3); - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cat >>confdefs.h <<\_ACEOF -#define USEMEMCPY 1 -_ACEOF - -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -echo "$as_me:$LINENO: checking long file names" >&5 -echo $ECHO_N "checking long file names... $ECHO_C" >&6 -(echo 1 > /tmp/conftest9012345) 2>/dev/null -(echo 2 > /tmp/conftest9012346) 2>/dev/null -val=`cat /tmp/conftest9012345 2>/dev/null` -if test -f /tmp/conftest9012345 && test "$val" = 1; 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 -cat >>confdefs.h <<\_ACEOF -#define NAME_MAX 14 -_ACEOF - -fi -rm -f /tmp/conftest* - -echo "$as_me:$LINENO: checking for vsprintf" >&5 -echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -vsprintf(0,0,0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -#define USEVARARGS 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - - - - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -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); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in dir; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" - -fi - -else - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in x; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" - -fi - -fi - - -echo "$as_me:$LINENO: checking for setenv" >&5 -echo $ECHO_N "checking for setenv... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -setenv((char *)0,(char *)0);unsetenv((char *)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -#define USESETENV 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -echo "$as_me:$LINENO: checking for putenv" >&5 -echo $ECHO_N "checking for putenv... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -putenv((char *)0);unsetenv((char *)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\_ACEOF -#define NEEDPUTENV 1 -_ACEOF - - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -echo "$as_me:$LINENO: checking for nl_langinfo(CODESET)" >&5 -echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -int -main () -{ -nl_langinfo(CODESET); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -#define HAVE_NL_LANGINFO 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - -echo "$as_me:$LINENO: checking for library containing gethostname" >&5 -echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6 -if test "${ac_cv_search_gethostname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_gethostname=no -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostname (); -int -main () -{ -gethostname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostname="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_gethostname" = no; then - for ac_lib in nsl; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostname (); -int -main () -{ -gethostname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostname="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5 -echo "${ECHO_T}$ac_cv_search_gethostname" >&6 -if test "$ac_cv_search_gethostname" != no; then - test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS" - -fi - - - - - - - - - - - - - -for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime -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 eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* 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 -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -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 -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&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 - - -# Check whether --enable-pam or --disable-pam was given. -if test "${enable_pam+set}" = set; then - enableval="$enable_pam" - -fi; -if test "$enable_pam" = "yes"; then - echo "$as_me:$LINENO: checking for PAM support" >&5 -echo $ECHO_N "checking for PAM support... $ECHO_C" >&6 - oldlibs="$LIBS" - LIBS="$LIBS -lpam" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - - pam_start(0, 0, 0, 0); - pam_authenticate(0, 0); - pam_end(0,0); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -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); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -#define USE_PAM 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6;LIBS="$oldlibs" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi - -# Check whether --enable-use_locale or --disable-use_locale was given. -if test "${enable_use_locale+set}" = set; then - enableval="$enable_use_locale" - -fi; -if test "$enable_use_locale" = "yes"; then - cat >>confdefs.h <<\_ACEOF -#define USE_LOCALE 1 -_ACEOF - -fi -# Check whether --enable-telnet or --disable-telnet was given. -if test "${enable_telnet+set}" = set; then - enableval="$enable_telnet" - -fi; -if test "$enable_telnet" = "yes"; then - cat >>confdefs.h <<\_ACEOF -#define BUILTIN_TELNET 1 -_ACEOF - -fi -# Check whether --enable-colors256 or --disable-colors256 was given. -if test "${enable_colors256+set}" = set; then - enableval="$enable_colors256" - -fi; -if test "$enable_colors256" = "yes"; then - cat >>confdefs.h <<\_ACEOF -#define COLORS256 1 -_ACEOF - -fi -# Check whether --enable-rxvt_osc or --disable-rxvt_osc was given. -if test "${enable_rxvt_osc+set}" = set; then - enableval="$enable_rxvt_osc" - -fi; -if test "$enable_rxvt_osc" = "yes"; then - cat >>confdefs.h <<\_ACEOF -#define RXVT_OSC 1 -_ACEOF - -fi - -if test -z "$old_CFLAGS"; then - if test "x$CFLAGS" = "x-g"; then - CFLAGS="-O" - fi -fi -test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" - -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 -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -main(){exit(0);} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 ) -{ { echo "$as_me:$LINENO: error: Can't run the compiler - internal error. Sorry." >&5 -echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - -ETCSCREENRC="\"/usr/local/etc/screenrc\"" -if test -n "$prefix"; then -ETCSCREENRC="\"$prefix/etc/screenrc\"" -fi -echo "$as_me:$LINENO: checking for the global screenrc file" >&5 -echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6 - -# Check whether --with-sys-screenrc or --without-sys-screenrc was given. -if test "${with_sys_screenrc+set}" = set; then - withval="$with_sys_screenrc" - ETCSCREENRC="\"${withval}\"" -fi; -cat >>confdefs.h <<_ACEOF -#define ETCSCREENRC $ETCSCREENRC -_ACEOF - -echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5 -echo "${ECHO_T}$ETCSCREENRC" >&6 - -SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" -if test -n "$datadir"; then -eval SCREENENCODINGS="$datadir/screen/utf8encodings" -SCREENENCODINGS="\"$SCREENENCODINGS\"" -fi -echo "$as_me:$LINENO: checking for the utf8-encodings location" >&5 -echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6 -cat >>confdefs.h <<_ACEOF -#define SCREENENCODINGS $SCREENENCODINGS -_ACEOF - -echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5 -echo "${ECHO_T}$SCREENENCODINGS" >&6 - - ac_config_files="$ac_config_files Makefile doc/Makefile" - ac_config_commands="$ac_config_commands default" -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, 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 \ - "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 \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!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 "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - 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}' - -# 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 - -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_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${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 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+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; 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'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# 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 - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - 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 - - ;; - 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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - 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=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # 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 before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, 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 - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -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 sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -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$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -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, 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.57, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_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 - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -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 0 ;; - --debug | --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;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -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" ;; - - 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 $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { 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 to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $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 -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# 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 - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@VERSION@,$VERSION,;t t -s,@ac_prefix_program@,$ac_prefix_program,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@AWK@,$AWK,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@WRITEPATH@,$WRITEPATH,;t t -s,@XTERMPATH@,$XTERMPATH,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$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'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # 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. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -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,@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,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #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. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # 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. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - 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 - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$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'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - default ) -# a hook for preserving undef directive in config.h -mv config.h conftest -sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2 /\*\3@' < conftest > config.h -rm -f conftest - ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (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 - - -echo "" -if test -z "$AWK"; then -echo "!!! Since you have no awk you must copy the files 'comm.h.dist'" -echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'." -echo "!!! Do _not_ change the user configuration section in config.h!" -echo "Please check the pathnames in the Makefile." -else -echo "Now please check the pathnames in the Makefile and in the user" -echo "configuration section in config.h." -fi -echo "Then type 'make' to make screen. Good luck." -echo "" diff -Nru screen-4.0.3/configure.in screen-4.1.0~20120320gitdb59704/configure.in --- screen-4.0.3/configure.in 2003-06-03 11:58:24.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/configure.in 2012-02-20 01:01:57.000000000 +0000 @@ -1,18 +1,18 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl $Id: configure.in,v 1.18 1994/09/06 16:59:54 mlschroe Exp $ FAU +dnl $Id$ GNU dnl dnl Many thanks to David MacKenzie for writing autoconf and dnl providing a sample configure.in file for screen. dnl -AC_REVISION($Revision: 1.18 $)dnl +AC_REVISION($Revision$)dnl AC_INIT(screen.c) AC_CONFIG_HEADER(config.h) dnl dnl Define some useful macros dnl -AC_DEFUN(AC_PROGRAM_SOURCE, +AC_DEFUN([AC_PROGRAM_SOURCE], [AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c < + +/* For select - According to earlier standards */ +#include #include +#include + #include #include @@ -310,13 +331,10 @@ main() { struct stat stb; -#ifdef FD_SET fd_set f; -#else - int f; -#endif (void)alarm(5); + unlink(fin); #ifdef POSIX if (mkfifo(fin, 0777)) #else @@ -348,11 +366,7 @@ exit(1); exit(0); } -#ifdef FD_SET FD_SET(0, &f); -#else - f = 1; -#endif if (select(1, &f, 0, 0, 0) == -1) exit(1); exit(0); @@ -364,10 +378,16 @@ if test -n "$fifo"; then AC_CHECKING(for broken fifo implementation) AC_TRY_RUN([ -#include -#include +/* For select - According to POSIX 1003.1-2001 */ +#include + +/* For select - According to earlier standards */ #include +#include +#include + #include +#include #ifndef O_NONBLOCK #define O_NONBLOCK O_NDELAY @@ -381,11 +401,7 @@ main() { struct timeval tv; -#ifdef FD_SET fd_set f; -#else - int f; -#endif #ifdef POSIX if (mkfifo(fin, 0600)) @@ -396,11 +412,7 @@ close(0); if (open(fin, O_RDONLY|O_NONBLOCK)) exit(1); -#ifdef FD_SET FD_SET(0, &f); -#else - f = 1; -#endif tv.tv_sec = 1; tv.tv_usec = 0; if (select(1, &f, 0, 0, &tv)) @@ -420,10 +432,18 @@ AC_CHECKING(sockets) AC_TRY_RUN([ +/* For select - According to POSIX 1003.1-2001 */ +#include + +/* For select - According to earlier standards */ +#include #include +#include + +#include +#include #include #include -#include char *son = "/tmp/conftest$$"; @@ -431,11 +451,7 @@ { int s1, s2, l; struct sockaddr_un a; -#ifdef FD_SET fd_set f; -#else - int f; -#endif (void)alarm(5); if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) @@ -460,11 +476,7 @@ close(0); if (accept(s1, &a, &l)) exit(1); -#ifdef FD_SET FD_SET(0, &f); -#else - f = 1; -#endif if (select(1, &f, 0, 0, 0) == -1) exit(1); exit(0); @@ -476,7 +488,14 @@ if test -n "$sock"; then AC_CHECKING(socket implementation) AC_TRY_RUN([ +/* For select - According to POSIX 1003.1-2001 */ +#include + +/* For select - According to earlier standards */ +#include #include +#include + #include #include #include @@ -518,8 +537,7 @@ elif test -n "$fifobr"; then AC_NOTE(- as your fifos are broken lets use the sockets.) else - AC_NOTE(- both sockets and fifos usable. let's take fifos.) - AC_DEFINE(NAMEDPIPE) + AC_NOTE(- both sockets and fifos usable. let's take sockets.) fi else AC_NOTE(- using named pipes, of course) @@ -537,7 +555,14 @@ AC_CHECKING(select return value) AC_TRY_RUN([ +/* For select - According to POSIX 1003.1-2001 */ +#include + +/* For select - According to earlier standards */ +#include #include +#include + #include #include @@ -555,11 +580,7 @@ main() { -#ifdef FD_SET fd_set f; -#else - int f; -#endif #ifdef __FreeBSD__ /* From Andrew A. Chernov (ache@astral.msk.su): @@ -591,11 +612,7 @@ { int s1, s2, l; struct sockaddr_un a; -#ifdef FD_SET fd_set f; -#else - int f; -#endif (void)alarm(5); if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) @@ -623,11 +640,7 @@ #endif -#ifdef FD_SET FD_SET(0, &f); -#else - f = 1; -#endif if (select(1, &f, 0, 0, 0) == -1) exit(1); if (select(1, &f, &f, 0, 0) != 2) @@ -658,10 +671,13 @@ LIBS="-ltermlib $olibs" AC_CHECKING(libtermlib) AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, +LIBS="-lncursesw $olibs" +AC_CHECKING(libncursesw) +AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, LIBS="-lncurses $olibs" AC_CHECKING(libncurses) AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, -AC_MSG_ERROR(!!! no tgetent - no screen)))))) +AC_MSG_ERROR(!!! no tgetent - no screen))))))) AC_TRY_RUN([ main() @@ -1193,17 +1209,7 @@ exit(0); /* libc version works properly. */ }], AC_DEFINE(USEMEMCPY)) -AC_MSG_CHECKING(long file names) -(echo 1 > /tmp/conftest9012345) 2>/dev/null -(echo 2 > /tmp/conftest9012346) 2>/dev/null -val=`cat /tmp/conftest9012345 2>/dev/null` -if test -f /tmp/conftest9012345 && test "$val" = 1; then -AC_MSG_RESULT(yes) -else -AC_MSG_RESULT(no) -AC_DEFINE(NAME_MAX, 14) -fi -rm -f /tmp/conftest* +AC_SYS_LONG_FILE_NAMES AC_MSG_CHECKING(for vsprintf) AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) @@ -1211,11 +1217,32 @@ AC_HEADER_DIRENT AC_MSG_CHECKING(for setenv) -AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV), -AC_MSG_RESULT(no) -AC_MSG_CHECKING(for putenv) -AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV) -)) +if test -z "$ac_setenv_args"; then + AC_TRY_LINK( + [#include ], + [ + setenv((char *) 0, (char *) 0, 0); + ], ac_setenv_args=3) +fi +if test -z "$ac_setenv_args"; then + AC_TRY_LINK( + [#include ], + [ + setenv((char *) 0, (char *) 0); + ], ac_setenv_args=2) +fi +if test -n "$ac_setenv_args"; then + AC_DEFINE(USESETENV) + if test "$ac_setenv_args" = 3; then + AC_DEFINE(HAVE_SETENV_3) + elif test "$ac_setenv_args" = 2; then + AC_DEFINE(HAVE_SETENV_2) + fi +else + AC_MSG_RESULT(no) + AC_MSG_CHECKING(for putenv) + AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)) +fi AC_MSG_CHECKING([for nl_langinfo(CODESET)]) AC_TRY_LINK([ #include @@ -1268,23 +1295,10 @@ AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) -ETCSCREENRC="\"/usr/local/etc/screenrc\"" -if test -n "$prefix"; then -ETCSCREENRC="\"$prefix/etc/screenrc\"" -fi +ETCSCREENRC= AC_MSG_CHECKING(for the global screenrc file) -AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path where to put the global screenrc file], [ ETCSCREENRC="\"${withval}\"" ]) -AC_DEFINE_UNQUOTED(ETCSCREENRC,$ETCSCREENRC) -AC_MSG_RESULT($ETCSCREENRC) - -SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" -if test -n "$datadir"; then -eval SCREENENCODINGS="$datadir/screen/utf8encodings" -SCREENENCODINGS="\"$SCREENENCODINGS\"" -fi -AC_MSG_CHECKING(for the utf8-encodings location) -AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS) -AC_MSG_RESULT($SCREENENCODINGS) +AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ]) +AC_SUBST(ETCSCREENRC) AC_OUTPUT(Makefile doc/Makefile, [[ # a hook for preserving undef directive in config.h diff -Nru screen-4.0.3/debian/NEWS screen-4.1.0~20120320gitdb59704/debian/NEWS --- screen-4.0.3/debian/NEWS 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/NEWS 2012-09-16 11:59:36.000000000 +0000 @@ -0,0 +1,16 @@ +screen (4.1.0~20120320gitdb59704-7) unstable; urgency=low + + In case you upgrade screen from 4.0.3 to 4.1.0 while running inside + screen and you have to reconnect to that screen session (or any other + screen session which has been started before the upgrade), there may be + a few screen features not working until you exit the 4.0.3-started + session and replace it with a 4.1.0-started session. + + Known issues of 4.0.3 to 4.1.0 interoperability as of now: + + * Terminal window resizing (WINCH signal) does not propagate to the + screen session. Detach and reattach again instead to get the size of + the terminals inside the screen session adjusted propely. + + -- Axel Beckert Sun, 16 Sep 2012 12:48:44 +0200 + diff -Nru screen-4.0.3/debian/changelog screen-4.1.0~20120320gitdb59704/debian/changelog --- screen-4.0.3/debian/changelog 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/changelog 2013-02-27 12:07:29.000000000 +0000 @@ -1,73 +1,267 @@ -screen (4.0.3-14ubuntu7~blueyedppa2~lucid) lucid; urgency=low +screen (4.1.0~20120320gitdb59704-7~lucid1~ppa1) lucid; urgency=low - * debian/patches/62-fix-term-length.dpatch - Fix "$TERM too long - sorry" error when length of $TERM is more than 20 - bytes. Upstream bug: http://savannah.gnu.org/bugs/?30880 - * Convert it back to using sysvinit rather than upstart (this is meant to - run on Debian, too). + * No-change backport to lucid - -- Daniel Hahler Sat, 09 Apr 2011 04:25:55 +0200 + -- Daniel Hahler Wed, 27 Feb 2013 13:07:29 +0100 -screen (4.0.3-14ubuntu6) natty; urgency=low +screen (4.1.0~20120320gitdb59704-7) unstable; urgency=low - * Suggest byobu, rather than Depend. LP: #681831 + * Extend 60-644788-screen-4.1.0-4.0.3-interoperability.patch: + + Add support for detaching (Closes: #684342) + + Document remaining issues in debian/NEWS + + -- Axel Beckert Sun, 16 Sep 2012 13:42:12 +0200 + +screen (4.1.0~20120320gitdb59704-6) unstable; urgency=low + + * Apply patch by Julien Cristau to add 4.0.3 + interoperability. (Closes: #683228; fixing the issue properly instead + of working around it. Thanks!) + + Drop all debconf handling and translations of debconf templates + (Closes: #679747, #683227; Thanks Beatrice Torracca and Christian + Perrier!) + + Drop build-depends on po-debconf and pre-depends on debconf + + Drop debian/NEWS (Closes: #678950) + + Remove no more necessary lintian override + * Screen's info pages are now split over more files than before. Also + include the new file doc/screen.info-6 (Closes: #682283) + + -- Axel Beckert Tue, 07 Aug 2012 08:54:42 +0200 + +screen (4.1.0~20120320gitdb59704-5) unstable; urgency=low + + * Disable patch 52fix_screen_utf8_nfd.patch since it introduced a + regression (Closes: #677512, Reopens: #600246) + * Fix bug number of Slovak debconf translation in + 4.1.0~20120320gitdb59704-3 changelog entry + * Use GMANE URLs for refering to upstream discussions as lists.gnu.org + doesn't support threading over month boundaries. (Thanks Evgeni + Golov!) + * Add translations of debconf templates: + + Romanian (Closes: #679366; Thanks Andrei POPESCU!) + * Update translations of debconf templates: + + German (Closes: #679452; Thanks Helge Kreutzmann!) + + -- Axel Beckert Sat, 30 Jun 2012 15:27:26 +0200 + +screen (4.1.0~20120320gitdb59704-4) unstable; urgency=low + + * Fix missing quoting in debian/config's dpkg --compare-version call + (Closes: #678207) + * Update NEWS.Debian entry. Now includes how to resurrect running + screen 4.0.3 sessions including generic commands for copy and + paste. (Closes: #678181) + * Set sticky bit on /var/run/screen if screen is not setuid or setgid + (Closes: #592895) + * Fix race condition when creating directories in /var/run/screen/. + (Closes: #653434) + * Add translations of debconf templates + + Norwegian Bokmål (Closes: #678112; Thanks Bjørn Steensrud!) + + Polish (Closes: #678158; Thanks Michał Kułach!) + + Galician (Closes: #678469; Thanks Jorge Barreiro!) + + French (Closes: #678548; Thanks David Prévot!) + + Czech (Closes: #678669; Thanks Michal Šimůnek!) + + Spanish (Closes: #678891; Thanks Fernando C. Estrada!) + + -- Axel Beckert Sun, 24 Jun 2012 23:54:09 +0200 + +screen (4.1.0~20120320gitdb59704-3) unstable; urgency=low + + * Fix workaround for #644788 (detect running screen in maintainer + scripts) on kfreebsd (Closes: #677227) + * Update revised debconf templates and package description received from + the debian-l10n-english team (Closes: #677303) + * Add translations of debconf templates + + Simplified Chinese (Closes: #677726; Thanks Aron Xu!) + + Danish (Closes: #677748; Thanks Joe Hansen!) + + Swedish (Closes: #677752; Thanks Martin Bagge!) + + Slovak (Closes: #677848; Thanks Miguel Figueiredo!) + + Portuguese (Closes: #677838; Thanks Miguel Figueiredo!) + + Russian (Closes: #678021; Thanks Yuri Kozlov!) + * Updated German translation + * Run debconf-updatepo automatically in clean target + + Add build-dependency on po-debconf + + -- Axel Beckert Mon, 18 Jun 2012 21:10:49 +0200 + +screen (4.1.0~20120320gitdb59704-2) unstable; urgency=low + + * Upload to unstable as the two RC issues which the experimental package + had, are now resolved or at least workarounded: + - Copy /usr/bin/screen to /tmp/screen-4.0.3 on upgrade from pre-4.1.0 + and use debconf to inform the user about it. (Closes: #644788) + - Add patch to fix terminal handling on kfreebsd (Closes: #660567) + Thanks Jan Christoph Nordholz! + * Add patch to fix parallel building. + * Use dh_lintian instead of handling lintian overrides manually. + * No more clean up manually what dh_clean can clean up. + * Add new patch to fix man page errors and warnings: + - Lintian warning manpage-has-errors-from-man fixed by replacing all + occurrences of "..." by "…" + - Fixes tons of lintian warnings hyphen-used-as-minus-sign + - Added two false positives of hyphen-used-as-minus-sign to + lintian-overrides + - Fixes two typos found by lintian + - Update 80EXP_session_creation_time.patch accordingly + + -- Axel Beckert Sun, 10 Jun 2012 17:54:53 +0200 + +screen (4.1.0~20120320gitdb59704-1) experimental; urgency=low + + * Happy 25th Birthday GNU Screen + * New upstream snapshot + - Refreshed the following patches: + + 01configure_fix_alpha_vsprintf + + 11replace_doc_paths + + 14size_matters + + 48screen-ipv6 + + 51fix-utf8-status-padding-bug + + 52fix_screen_utf8_nfd + + 58-show-encoding-hardstatus + + 80EXP_session_creation_time + - Removed those hunks from 16fix_gcc_warnings which have been applied + upstream. + - Manually adapted patch 26source_encoding. + + [ Axel Beckert ] + * Switch Maintainer and Uploaders. + * Add patch fix-utf8-status-padding-bug by Kees Cook and Dustin Kirkland + (probably fixes #215955) + * Updated previous changelog entry to document further bugs which have + been fixed by that upload. + * Add build dependency on dpkg-dev (>= 1.16.1~) for being able to + include /usr/share/dpkg/buildflags.mk + * Add lintian override for init.d-script-does-not-implement-optional-option + warning. A cleanup script does not need a status subcommand. + * Fix lintian warning init.d-script-missing-lsb-description. + * Changes taken from Ubuntu's screen package: + - debian/init: Use find -delete rather than find -print0 | xargs rm to + avoid starting two processes. + - debian/patches/58-show-encoding-hardstatus.patch (Closes: #533498; + the remaining part of #533498 has been fixed upstream, see + https://savannah.gnu.org/bugs/index.php?26401) + * Add patch 52fix_screen_utf8_nfd by Nobuhiro Iwamatsu to fix screen + outputing "ÿ" after a connected character. (Closes: #600246) + * Bumped Standards-Version to 3.9.3. + + [ Moritz Muehlenhoff ] + * Enable hardening build flags (Closes: #656513) + + -- Axel Beckert Tue, 20 Mar 2012 22:16:07 +0100 + +screen (4.1.0~20110819git450e8f3-1) experimental; urgency=low + + [ Brian P Kroth ] + * New upstream snapshot based on 4.1.0 prerelease 20101110git066b098 as + packaged by Fedora 15 (Closes: #641867) + * Removed the following patches which have been applied upstream or are + otherwise no more necessary: + - 01CVS + - 02configure_use_ncursesw + - 03fully_expand_screenencodings + - 09CHERRY_* + - 15manpage_typos + - 16fix_gcc_warnings_II + - 18manpage_maxwin_limit + - 19flowcontrol_lockup + - 20defmonitor + - 21manpage_nethack_activation + - 25allow_symlink_sockdir + - 27doc_sty_noenvpassing + - 28blankerprg_callsemantics + - 29infodoc_version + - 31upstream_cherries + - 33increase_max_winmsg_renditions + - 35screen_invoked_with_a_command + - 40cjk_eastasian + - 50EXP_tilde_expansion + * Refreshed the following patches: + - 10norootpassword + - 14size_matters + - 26source_encoding + * Added patches from Fedora: + - 47screen-cc: Additional assertions to improve stability + - 48screen-ipv6: IPv6 support for built-in telnet + * Enable telnet (Closes: #353090) and localized day/month names + + [ Axel Beckert ] + * Add myself as Uploader. + * Remove Adam Lazur from Uploaders. (Closes: #603009) + * New upstream snapshot based on 4.1.0 prerelease, commit 450e8f3 of + 2011-Aug-19. (LP: #183849) + - Fixes a crash when attaching to a layout that was created while + detached. (Closes: #591624, LP: #786292, #788670) + - Raises MAXWIN to 100 (Closes: #450421) + - No more segfaults if resized to 0 or 1 line tall (Closes: #532240, + LP: #315237) + - screen -d -m no more segfaults on setenv without value (Closes: #496750) + - Now has tsl, fsl and dsl terminfo caps (Closes: #152961) + - Windows created with "-d -m" no more ignore "-X exec" (Closes: #481411) + - Now has a session name string escape (Closes: #488619) + - Re-optimize screen updates (Closes: #621704, LP: #588846) + - No more mishandles xterm control string to set window title (Closes: + #344759) Thanks to Thomas Dickey and Sadrul Habib Chowdhury. + - Fixes/Relaxes requirement for a controlling terminal (Closes: #461107) + - Uses fuzzy-matching for session names only if required (Closes: #361274) + - Has customizable digraphs (Closes: #25096, a wishlist bug from 1998! :-) + - Fixes a bug with displaying blank spaces with bce on. (Closes: #578729, + LP: #702094) + - Fix using alternate screen buffers in some cases. (Closes: #558724) + - Several fixes for handling mouse events. (Closes: #223320) + - Passes signals to programs running inside screen on kfreebsd. + (Closes: 522689) + - Documents vertical split in man-page. (Closes: #611453) + - Adds focus left/right commands. (Closes: #526002) + - Locked screens no more can be unlocked by reattaching to it: + (Closes: #238535) + - Shows cursor in front of the selected window in "windowlist -b" + (Closes: #446082) + * Remove the patches which have been applied upstream or are + otherwise no more necessary: + - 17manpage_sessionname_warning + - 30fix_fsf_address + * Refreshed the following patches: + - 10norootpassword + - 11replace_doc_paths + - 12kfreebsd_ctty + - 14size_matters + - 16fix_gcc_warnings + - 22exchange_file_mode + - 23exitcode_q_ls + - 24option_parser + - 32misc_minor_fixes + * Refreshed and renumbered the following patches: + - {51 => 80}EXP_session_creation_time + * Added patches: + - 46fix-keybinding-typo-in-manpage (Closes: #630535, #541793) + - 49long-usernames (Closes: #560231, LP: #582153) + - 50increase-max-TERM-length (Closes: #621804, #630976) + * Use dh_autoreconf + - Build-Depend on dh-autoreconf + * Convert to source format "3.0 (quilt)" + - Remove build dependency on dpatch + * Bump Standards-Version to 3.9.2 (no changes) + * Update debian/copyright + - Upstream switched to GPLv3 + - Update debian packaging information + * Fix lintian warning debian-rules-missing-recommended-target + * Add lintian override for + possibly-insecure-handling-of-tmp-files-in-maintainer-script + * /etc/init.d/screen-cleanup: check for existence of screen binary + (Closes: #612990) + * Add Vcs-* headers + * Add extend-diff-ignore=config\.h\.in to debian/source/options + * Added a NEWS file stating problems to attach to a detached 4.0.3 + session with a 4.1.0 screen, e.g. during a dist-upgrade + * Suggest iselect, screenie or byobu (Closes: #176626) - -- LaMont Jones Fri, 03 Dec 2010 04:32:13 -0700 + -- Axel Beckert Sun, 09 Oct 2011 03:29:31 +0200 -screen (4.0.3-14ubuntu5) natty; urgency=low +screen (4.0.3-14+hurd.1) unreleased; urgency=low - * debian/patches/61-silence_command_from_echo.dpatch: - - print "command from..." when command is "echo" is unnecessary, - annoying, LP: #671486 + * Fix #522689. - -- Dustin Kirkland Fri, 05 Nov 2010 11:25:38 -0500 - -screen (4.0.3-14ubuntu4) maverick; urgency=low - - * Fix typo in upstart job: "filesystem" rather than "filesystems"; - LP: #595898. - * Remove debian/=screen.debhelper.log. - * Add "task" to the upstart job as it isn't a service; also use "script" - rather than "pre-start script" for clarity. - * Use find -delete rather than find -print0 | xargs rm to avoid starting two - processes. - * Rewrite "if test foo || ! test bar" into "if [ foo ] || [ ! bar ]" for - clarity. - - -- Loïc Minier Fri, 18 Jun 2010 14:12:51 +0200 - -screen (4.0.3-14ubuntu3) maverick; urgency=low - - * debian/screen-cleanup.upstart: start on filesystem, rather than - local-filesystem, in case /var is remote - - -- Dustin Kirkland Thu, 17 Jun 2010 09:25:16 -0500 - -screen (4.0.3-14ubuntu2) maverick; urgency=low - - * debian/screen-cleanup.upstart, debian/init: convert screen to an - upstart script to fix some bugs where /var/run is not mounted when - screen-cleanup runs, LP: #574773 - - -- Dustin Kirkland Mon, 14 Jun 2010 08:13:33 -0500 - -screen (4.0.3-14ubuntu1) lucid; urgency=low - - * Merge from debian testing, remaining changes: - - debian/control: - + maintainer updates, recommend byobu - - debian/patches/33increase_max_winmsg_renditions.dpatch: - + upped hardcode value from 80 to 256 - - debian/patches/56-source-file-not-found-warning.dpatch: - + sourcing a file that's not found should fail more gracefully - - debian/patches/58-show-encoding-hardstatus.dpatch: - + show encoding in hardstatus - - debian/patches/59-no-beep-on-write-acl.dpatch: - + instead of beeping on all displays, report failure to attached display - - debian/patches/60-byobu-pointer.dpatch: - + helpful text pointing new screen users to byobu - - -- Dustin Kirkland Tue, 10 Nov 2009 11:55:17 -0600 + -- Samuel Thibault Sun, 06 Mar 2011 23:28:56 +0000 screen (4.0.3-14) unstable; urgency=low @@ -82,48 +276,6 @@ -- Jan Christoph Nordholz Tue, 28 Jul 2009 13:21:24 +0200 -screen (4.0.3-13ubuntu4) karmic; urgency=low - - * debian/patches/33increase_max_winmsg_renditions.dpatch: bump max - winmsg renditions from 80 to 256 - - -- Dustin Kirkland Mon, 06 Jul 2009 00:27:39 -0500 - -screen (4.0.3-13ubuntu3) karmic; urgency=low - - * debian/control: revert last change, drop byobu back down to a - recommends, LP: #391052 - - -- Dustin Kirkland Tue, 23 Jun 2009 10:08:09 -0500 - -screen (4.0.3-13ubuntu2) karmic; urgency=low - - * debian/control: depend on byobu; this will replace the screen-profiles - version with the dpkg-diversion of /usr/bin/screen, which is causing - the permissions issue in LP: #390405 - * debian/patches/60-byobu-pointer.dpatch: add a one-liner pointing to byobu, - for upgrading users who previously just typed 'screen' to launch byobu - (now that the diversion has been removed) - - -- Dustin Kirkland Tue, 23 Jun 2009 01:47:43 -0500 - -screen (4.0.3-13ubuntu1) karmic; urgency=low - - * Merge with Debian, remaining changes: (LP: #388791) - + Add show encoding feature, using "%e" in hardstatus to show current - encoding. Ported from FreeBSD original by yzlin@cs.nctu.edu.tw. - LP: #286810 - + debian/patches/56-source-file-not-found-warning.dpatch: When sourcing a - file in a screenrc which is not found, fail more gracefully by not - interrupting normal operation; instead, print a debug message. LP: - #323756 - + debian/control: recommend byobu - + Add 59-no-beep-on-write-acl.dpatch: do not beep on all displays when the - write ACL triggers, instead report failure as done with regular screen - command ACL failures. - - -- أحمد المحمودي (Ahmed El-Mahmoudy) Thu, 18 Jun 2009 07:18:37 +0300 - screen (4.0.3-13) unstable; urgency=low * Sync with Ubuntu, closes: #520359. New dpatches: @@ -159,54 +311,6 @@ -- Jan Christoph Nordholz Wed, 04 Feb 2009 01:14:20 +0100 -screen (4.0.3-11ubuntu6) karmic; urgency=low - - * debian/control: account for rename of screen-profiles to byobu; - recommend byobu - - -- Dustin Kirkland Mon, 11 May 2009 07:48:56 -0500 - -screen (4.0.3-11ubuntu5) karmic; urgency=low - - * Add 59-no-beep-on-write-acl.dpatch: do not beep on all displays when - the write ACL triggers, instead report failure as done with regular - screen command ACL failures. - - -- Kees Cook Wed, 29 Apr 2009 10:30:50 -0700 - -screen (4.0.3-11ubuntu4) jaunty; urgency=low - - [ rascov ] - * Add show encoding feature, using "%e" in hardstatus to show current - encoding. Ported from FreeBSD original by yzlin@cs.nctu.edu.tw. - LP: #286810 - - -- Dustin Kirkland Wed, 11 Feb 2009 05:53:52 -0600 - -screen (4.0.3-11ubuntu3) jaunty; urgency=low - - * debian/patches/56-source-file-not-found-warning.dpatch: When sourcing a - file in a screenrc which is not found, fail more gracefully by not - interrupting normal operation; instead, print a debug message. LP: #323756 - * debian/patches/57-screen-invoked-with-a-command.dpatch: Cherry pick from - upstream source; fixes LP: #311443 - - -- Dustin Kirkland Wed, 04 Feb 2009 14:19:09 +0100 - -screen (4.0.3-11ubuntu2) jaunty; urgency=low - - * debian/control: recommend screen-profiles - - -- Dustin Kirkland Fri, 23 Jan 2009 09:50:59 -0500 - -screen (4.0.3-11ubuntu1) jaunty; urgency=low - - * debian/patches/55-increase_max_winmsg_renditions.dpatch: Increase - MAX_WINMSG_REND constant from 16 to 80, LP: #315871 - * debian/patches/00list: updated accordingly - - -- Dustin Kirkland Sat, 10 Jan 2009 12:20:42 -0600 - screen (4.0.3-11) unstable; urgency=low * Unbreak and <^A Bksp> using a patch from Loïc Minier @@ -960,4 +1064,3 @@ * converted to new source format -- joost witteveen Sat, 4 Jan 1997 11:40:40 +0100 - diff -Nru screen-4.0.3/debian/control screen-4.1.0~20120320gitdb59704/debian/control --- screen-4.0.3/debian/control 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/control 2012-09-16 10:43:08.000000000 +0000 @@ -1,23 +1,24 @@ Source: screen Section: misc Priority: optional -Maintainer: Ubuntu Core Developers -XSBC-Original-Maintainer: Jan Christoph Nordholz -Uploaders: Adam Lazur -Standards-Version: 3.8.2 -Build-Depends: libncursesw5-dev, texinfo, libpam0g-dev, debhelper (>> 7), dpatch +Maintainer: Axel Beckert +Uploaders: Jan Christoph Nordholz +Standards-Version: 3.9.3 +Build-Depends: libncursesw5-dev, texinfo, libpam0g-dev, debhelper (>> 7), dh-autoreconf, dpkg-dev (>= 1.16.1~) Homepage: http://savannah.gnu.org/projects/screen +Vcs-Git: git://anonscm.debian.org/collab-maint/screen.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/screen.git Package: screen Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Suggests: byobu -Description: terminal multiplexor with VT100/ANSI terminal emulation - screen is a terminal multiplexor that runs several separate "screens" on a - single physical character-based terminal. Each virtual terminal emulates a - DEC VT100 plus several ANSI X3.64 and ISO 2022 functions. Screen sessions +Suggests: iselect (>= 1.4.0-1) | screenie | byobu +Description: terminal multiplexer with VT100/ANSI terminal emulation + GNU Screen is a terminal multiplexer that runs several separate "screens" on + a single physical character-based terminal. Each virtual terminal emulates a + DEC VT100 plus several ANSI X3.64 and ISO 2022 functions. Screen sessions can be detached and resumed later on a different terminal. . - Screen also supports a whole slew of other features. Some of these are: - configurable input and output translation, serial port support, configurable - logging, multi-user support, and utf8 charset support. + Screen also supports a whole slew of other features, including configurable + input and output translation, serial port support, configurable logging, + and multi-user support. diff -Nru screen-4.0.3/debian/copyright screen-4.1.0~20120320gitdb59704/debian/copyright --- screen-4.0.3/debian/copyright 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/copyright 2012-09-16 10:43:08.000000000 +0000 @@ -16,7 +16,7 @@ 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 + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -28,12 +28,14 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -On Debian systems, the complete text of the GNU General Public License, version 2 -can be found in /usr/share/common-licenses/GPL-2. +On Debian systems, the complete text of the GNU General Public License, version 3 +can be found in /usr/share/common-licenses/GPL-3. Debian Modifications: Copyright (C) 1996 Ian Murdock Copyright (C) 1997 joost witteveen Copyright (C) 1997-2001 Juan Cespedes Copyright (C) 2001-2003 Adam Lazur - Copyright (C) 2007 Jan Christoph Nordholz + Copyright (C) 2007-2009 Jan Christoph Nordholz + Copyright (C) 2011 Brian Kroth + Copyright (C) 2011 Axel Beckert diff -Nru screen-4.0.3/debian/info screen-4.1.0~20120320gitdb59704/debian/info --- screen-4.0.3/debian/info 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/info 2012-09-16 10:43:08.000000000 +0000 @@ -4,3 +4,4 @@ doc/screen.info-3 doc/screen.info-4 doc/screen.info-5 +doc/screen.info-6 diff -Nru screen-4.0.3/debian/init screen-4.1.0~20120320gitdb59704/debian/init --- screen-4.0.3/debian/init 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/init 2012-09-16 10:43:08.000000000 +0000 @@ -11,10 +11,14 @@ # Default-Start: S # Default-Stop: # Short-Description: screen sessions cleaning +# Description: Cleans up the screen session directory and fixes its +# permissions if needed. ### END INIT INFO set -e +test -f /usr/bin/screen || exit 0 + SCREENDIR=/var/run/screen case "$1" in @@ -24,7 +28,7 @@ mkdir $SCREENDIR chown root:utmp $SCREENDIR fi - find $SCREENDIR -type p -print0 | xargs -0r rm -f -- + find $SCREENDIR -type p -delete # If the local admin has used dpkg-statoverride to install the screen # binary with different set[ug]id bits, change the permissions of # $SCREENDIR accordingly @@ -34,7 +38,7 @@ elif [ "$BINARYPERM" -ge 2000 ]; then chmod 0775 $SCREENDIR else - chmod 0777 $SCREENDIR + chmod 1777 $SCREENDIR fi ;; stop|restart|reload|force-reload) diff -Nru screen-4.0.3/debian/lintian-overrides screen-4.1.0~20120320gitdb59704/debian/lintian-overrides --- screen-4.0.3/debian/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/lintian-overrides 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,5 @@ +screen: setgid-binary usr/bin/screen 2755 root/utmp +screen: possibly-insecure-handling-of-tmp-files-in-maintainer-script preinst:8 +screen: init.d-script-does-not-implement-optional-option etc/init.d/screen-cleanup status +screen: hyphen-used-as-minus-sign usr/share/man/man1/screen.1.gz:669 +screen: hyphen-used-as-minus-sign usr/share/man/man1/screen.1.gz:823 diff -Nru screen-4.0.3/debian/patches/00list screen-4.1.0~20120320gitdb59704/debian/patches/00list --- screen-4.0.3/debian/patches/00list 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -# before doing anything else, advance to CVS HEAD -01CVS -# 01-08: fixes to configure, altering preprocessor macros etc. -01configure_fix_alpha_vsprintf -02configure_use_ncursesw -03fully_expand_screenencodings -04AUTOCONF -05fix_osdef_include -# 09 : Cherry-picked upstream commits -09CHERRY_f6b50e17 -09CHERRY_97708d58 -09CHERRY_bb04008e -# 10-49: "regular" code and documentation fixes -10norootpassword -11replace_doc_paths -12kfreebsd_ctty -13split_info_files -14size_matters -15manpage_typos -16fix_gcc_warnings -16fix_gcc_warnings_II -17manpage_sessionname_warning -18manpage_maxwin_limit -19flowcontrol_lockup -20defmonitor -21manpage_nethack_activation -22exchange_file_mode -23exitcode_q_ls -24option_parser -25allow_symlink_sockdir -26source_encoding -27doc_sty_noenvpassing -28blankerprg_callsemantics -29infodoc_version -30fix_fsf_address -31upstream_cherries -32misc_minor_fixes -33increase_max_winmsg_renditions -35screen_invoked_with_a_command -40cjk_eastasian -45suppress_remap -# 50-99: experimental patches, new features etc. -50EXP_tilde_expansion -51EXP_session_creation_time -56-source-file-not-found-warning.dpatch -58-show-encoding-hardstatus.dpatch -59-no-beep-on-write-acl.dpatch -60-byobu-pointer.dpatch -61-silence_command_from_echo.dpatch -62-fix-term-length.dpatch diff -Nru screen-4.0.3/debian/patches/01CVS.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/01CVS.dpatch --- screen-4.0.3/debian/patches/01CVS.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/01CVS.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,5169 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 01CVS.dpatch by -## -## DP: Diff between 4.0.3 and CVS HEAD (checked out on 2008/06/01). - -@DPATCH@ -diff -Naur screen-4.0.3.orig/Makefile.in screen-4.0.3/Makefile.in ---- screen-4.0.3.orig/Makefile.in 2006-10-23 15:06:32.000000000 +0200 -+++ screen-4.0.3/Makefile.in 2008-06-01 23:39:31.000000000 +0200 -@@ -78,7 +78,7 @@ - # This doesn't work if $(bindir)/screen is a symlink - -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi - rm -f $(DESTDIR)$(bindir)/screen -- (cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen) -+ (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) - cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) - - ############################################################################### -diff -Naur screen-4.0.3.orig/NEWS screen-4.0.3/NEWS ---- screen-4.0.3.orig/NEWS 2003-07-21 20:04:05.000000000 +0200 -+++ screen-4.0.3/NEWS 2008-06-01 23:39:31.000000000 +0200 -@@ -1,4 +1,18 @@ - ------------------------------ -+ What's new in screen-4.0.3 ? -+ ------------------------------ -+ -+* zombie command has new option 'onerror' -+ -+* buffer overflow in resize.c fixed -+ -+* minor docu update -+ -+* more robust startup -+ -+* use setresuid; SendAttachMsg() for fd-passing added; DoCSI enhanced. -+ -+ ------------------------------ - What's new in screen-4.0.0 ? - ------------------------------ - -diff -Naur screen-4.0.3.orig/ansi.c screen-4.0.3/ansi.c ---- screen-4.0.3.orig/ansi.c 2003-12-05 14:57:05.000000000 +0100 -+++ screen-4.0.3/ansi.c 2008-06-01 23:39:31.000000000 +0200 -@@ -1225,18 +1225,42 @@ - SaveCursor(); - break; - case 't': -- if (a1 != 8) -- break; -- a1 = curr->w_args[2]; -- if (a1 < 1) -- a1 = curr->w_width; -- if (a2 < 1) -- a2 = curr->w_height; -- if (a1 > 10000 || a2 > 10000) -- break; -- WChangeSize(curr, a1, a2); -- cols = curr->w_width; -- rows = curr->w_height; -+ switch(a1) -+ { -+ case 11: -+ if (curr->w_layer.l_cvlist) -+ Report("\033[1t", 0, 0); -+ else -+ Report("\033[2t", 0, 0); -+ break; -+ case 7: -+ LRefreshAll(&curr->w_layer, 0); -+ break; -+ case 21: -+ a1 = strlen(curr->w_title); -+ if ((unsigned)(curr->w_inlen + 5 + a1) <= sizeof(curr->w_inbuf)) -+ { -+ bcopy("\033]l", curr->w_inbuf + curr->w_inlen, 3); -+ bcopy(curr->w_title, curr->w_inbuf + curr->w_inlen + 3, a1); -+ bcopy("\033\\", curr->w_inbuf + curr->w_inlen + 3 + a1, 2); -+ curr->w_inlen += 5 + a1; -+ } -+ break; -+ case 8: -+ a1 = curr->w_args[2]; -+ if (a1 < 1) -+ a1 = curr->w_width; -+ if (a2 < 1) -+ a2 = curr->w_height; -+ if (a1 > 10000 || a2 > 10000) -+ break; -+ WChangeSize(curr, a1, a2); -+ cols = curr->w_width; -+ rows = curr->w_height; -+ break; -+ default: -+ break; -+ } - break; - case 'u': - RestoreCursor(); -diff -Naur screen-4.0.3.orig/ansi.h screen-4.0.3/ansi.h ---- screen-4.0.3.orig/ansi.h 2003-02-24 17:55:08.000000000 +0100 -+++ screen-4.0.3/ansi.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: ansi.h,v 1.6 1994/05/31 12:31:28 mlschroe Exp $ FAU -+ * $Id: ansi.h,v 1.28 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - #define NATTR 6 -diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c ---- screen-4.0.3.orig/attacher.c 2003-09-08 16:24:48.000000000 +0200 -+++ screen-4.0.3/attacher.c 2008-06-01 23:39:31.000000000 +0200 -@@ -57,7 +57,7 @@ - extern int xflag, dflag, rflag, quietflag, adaptflag; - extern struct mode attach_Mode; - extern struct NewWindow nwin_options; --extern int MasterPid; -+extern int MasterPid, attach_fd; - - #ifdef MULTIUSER - extern char *multi; -@@ -87,6 +87,9 @@ - * returns 1 if we could attach one, or 0 if none. - * Understands MSG_ATTACH, MSG_DETACH, MSG_POW_DETACH - * MSG_CONT, MSG_WINCH and nothing else! -+ * -+ * if type == MSG_ATTACH and sockets are used, attaches -+ * tty filedescriptor. - */ - - static int -@@ -96,6 +99,11 @@ - { - int r, l = sizeof(*m); - -+#ifndef NAMEDPIPE -+ if (m->type == MSG_ATTACH) -+ return SendAttachMsg(s, m, attach_fd); -+#endif -+ - while(l > 0) - { - r = write(s, (char *)m + (sizeof(*m) - l), l); -@@ -184,8 +192,13 @@ - { - real_uid = multi_uid; - eff_uid = own_uid; -+#ifdef HAVE_SETRESUID -+ if (setresuid(multi_uid, own_uid, multi_uid)) -+ Panic(errno, "setresuid"); -+#else - xseteuid(multi_uid); - xseteuid(own_uid); -+#endif - if (chmod(attach_tty, 0666)) - Panic(errno, "chmod %s", attach_tty); - tty_oldmode = tty_mode; -diff -Naur screen-4.0.3.orig/braille.h screen-4.0.3/braille.h ---- screen-4.0.3.orig/braille.h 2001-04-28 15:26:42.000000000 +0200 -+++ screen-4.0.3/braille.h 2008-06-01 23:39:31.000000000 +0200 -@@ -22,7 +22,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: braille.h,v 1.1 1995/09/06 15:51:18 jnweiger Exp jnweiger $ FAU -+ * $Id: braille.h,v 1.12 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - #ifdef HAVE_BRAILLE -diff -Naur screen-4.0.3.orig/comm.c screen-4.0.3/comm.c ---- screen-4.0.3.orig/comm.c 2003-09-08 16:25:08.000000000 +0200 -+++ screen-4.0.3/comm.c 2008-06-01 23:39:31.000000000 +0200 -@@ -183,7 +183,9 @@ - { "fit", NEED_DISPLAY|ARGS_0 }, - { "flow", NEED_FORE|ARGS_01 }, - { "focus", NEED_DISPLAY|ARGS_01 }, -+ { "focusminsize", ARGS_02 }, - { "gr", NEED_FORE|ARGS_01 }, -+ { "group", NEED_FORE|ARGS_01 }, - { "hardcopy", ARGS_012 }, - { "hardcopy_append", ARGS_1 }, - { "hardcopydir", ARGS_01 }, -@@ -202,6 +204,7 @@ - #endif - { "kill", NEED_FORE|ARGS_0 }, - { "lastmsg", NEED_DISPLAY|ARGS_0 }, -+ { "layout", ARGS_1|ARGS_ORMORE}, - { "license", NEED_LAYER|ARGS_0 }, - #ifdef LOCK - { "lockscreen", NEED_DISPLAY|ARGS_0 }, -@@ -267,7 +270,7 @@ - { "removebuf", ARGS_0 }, - #endif - { "reset", NEED_FORE|ARGS_0 }, -- { "resize", NEED_DISPLAY|ARGS_01 }, -+ { "resize", NEED_DISPLAY|ARGS_0|ARGS_ORMORE }, - { "screen", ARGS_0|ARGS_ORMORE }, - #ifdef COPY_PASTE - { "scrollback", NEED_FORE|ARGS_1 }, -@@ -284,7 +287,7 @@ - { "slowpaste", NEED_FORE|ARGS_01 }, - { "sorendition", ARGS_012 }, - { "source", ARGS_1 }, -- { "split", NEED_DISPLAY|ARGS_0 }, -+ { "split", NEED_DISPLAY|ARGS_01 }, - { "startup_message", ARGS_1 }, - { "stuff", NEED_LAYER|ARGS_12 }, - #ifdef MULTIUSER -@@ -311,7 +314,7 @@ - { "version", ARGS_0 }, - { "wall", NEED_DISPLAY|ARGS_1}, - { "width", ARGS_0123 }, -- { "windowlist", NEED_DISPLAY|ARGS_012 }, -+ { "windowlist", ARGS_012 }, - { "windows", NEED_DISPLAY|ARGS_0 }, - { "wrap", NEED_FORE|ARGS_01 }, - #ifdef COPY_PASTE -@@ -323,5 +326,5 @@ - #ifdef ZMODEM - { "zmodem", ARGS_012 }, - #endif -- { "zombie", ARGS_01 } -+ { "zombie", ARGS_012 } - }; -diff -Naur screen-4.0.3.orig/config.h.in screen-4.0.3/config.h.in ---- screen-4.0.3.orig/config.h.in 2006-10-23 15:06:32.000000000 +0200 -+++ screen-4.0.3/config.h.in 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: config.h.in,v 1.12 1994/05/31 12:31:36 mlschroe Exp $ FAU -+ * $Id: config.h.in,v 1.26 2005/12/19 16:13:08 jnweiger Exp $ FAU - */ - - -@@ -458,6 +458,7 @@ - * define HAVE_SETREUID. Otherwise screen will use a forked process to - * safely create output files without retaining any special privileges. - */ -+#undef HAVE_SETRESUID - #undef HAVE_SETREUID - - /* -diff -Naur screen-4.0.3.orig/configure screen-4.0.3/configure ---- screen-4.0.3.orig/configure 2003-12-05 14:46:53.000000000 +0100 -+++ screen-4.0.3/configure 2008-06-01 23:39:31.000000000 +0200 -@@ -3911,7 +3911,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#if defined(SVR4) && defined(sun) -+#if defined(__SVR4) && defined(__sun) - yes - #endif - -@@ -4042,7 +4042,7 @@ - main () - { - --#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) -+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(__sun) && defined(__SVR4)) || defined(ISC) || defined(sony_news) - seteuid_is_broken(0); - #else - seteuid(0); -@@ -5572,7 +5572,7 @@ - - #include /* to get time_t on SCO */ - #include --#if defined(SVR4) && !defined(DGUX) -+#if defined(__SVR4) && !defined(DGUX) - #include - #define utmp utmpx - #else -@@ -5624,7 +5624,7 @@ - - #include - #include --#if defined(SVR4) && !defined(DGUX) -+#if defined(__SVR4) && !defined(DGUX) - #include - #define utmp utmpx - #else -@@ -5680,7 +5680,7 @@ - - #include - #include --#if defined(SVR4) && !defined(DGUX) -+#if defined(__SVR4) && !defined(DGUX) - #include - #define utmp utmpx - #else -@@ -6316,7 +6316,7 @@ - - _CUT_HERE_ - --#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) -+#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(__sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(__SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) - loadtype=long - # if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) - loadscale=65536 -@@ -6329,7 +6329,7 @@ - loadtype=int - loadscale=1024 - # else --# if defined(MIPS) || defined(SVR4) || defined(m88k) -+# if defined(MIPS) || defined(__SVR4) || defined(m88k) - loadscale=256 - # else /* not MIPS */ - loadscale=1000 /* our default value */ -diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in ---- screen-4.0.3.orig/configure.in 2003-06-03 13:58:24.000000000 +0200 -+++ screen-4.0.3/configure.in 2008-06-01 23:39:31.000000000 +0200 -@@ -1,11 +1,11 @@ - dnl Process this file with autoconf to produce a configure script. - dnl --dnl $Id: configure.in,v 1.18 1994/09/06 16:59:54 mlschroe Exp $ FAU -+dnl $Id: configure.in,v 1.27 2006/05/02 12:58:25 mls Exp $ FAU - dnl - dnl Many thanks to David MacKenzie for writing autoconf and - dnl providing a sample configure.in file for screen. - dnl --AC_REVISION($Revision: 1.18 $)dnl -+AC_REVISION($Revision: 1.27 $)dnl - AC_INIT(screen.c) - AC_CONFIG_HEADER(config.h) - -@@ -93,7 +93,12 @@ - AC_MSG_RESULT(yes) - AC_MSG_CHECKING(for the socket dir) - SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")" -- AC_ARG_WITH(socket-dir, [ --with-socket-dir=path where to put the per-user sockets], [ SOCKDIR="\"${withval}\"" ]) -+ AC_ARG_WITH(socket-dir, [ --with-socket-dir=path where to put the per-user sockets], [ -+ case "${withval}" in -+ *\"*) SOCKDIR="${withval}" ;; -+ *) SOCKDIR="\"${withval}\"" ;; -+ esac -+ ]) - AC_MSG_RESULT(${SOCKDIR}) - AC_DEFINE_UNQUOTED(SOCKDIR, $SOCKDIR) - ] -@@ -252,15 +257,15 @@ - ], AC_NOTE(- you have jobcontrol) AC_DEFINE(BSDJOBS), AC_NOTE(- you don't have jobcontrol)) - - dnl --dnl **** setreuid(), seteuid() **** -+dnl **** setresuid(), setreuid(), seteuid() **** - dnl --AC_CHECKING(setreuid) -+AC_CHECKING(setresuid) - AC_TRY_LINK(,[ --#ifdef __hpux - setresuid(0, 0, 0); --#else -+], AC_DEFINE(HAVE_SETRESUID)) -+AC_CHECKING(setreuid) -+AC_TRY_LINK(,[ - setreuid(0, 0); --#endif - ], AC_DEFINE(HAVE_SETREUID)) - dnl - dnl seteuid() check: -@@ -518,8 +523,7 @@ - elif test -n "$fifobr"; then - AC_NOTE(- as your fifos are broken lets use the sockets.) - else -- AC_NOTE(- both sockets and fifos usable. let's take fifos.) -- AC_DEFINE(NAMEDPIPE) -+ AC_NOTE(- both sockets and fifos usable. let's take sockets.) - fi - else - AC_NOTE(- using named pipes, of course) -diff -Naur screen-4.0.3.orig/display.c screen-4.0.3/display.c ---- screen-4.0.3.orig/display.c 2003-12-05 14:45:41.000000000 +0100 -+++ screen-4.0.3/display.c 2008-06-01 23:39:31.000000000 +0200 -@@ -60,6 +60,8 @@ - #ifdef COLOR - static void SetBackColor __P((int)); - #endif -+static void FreePerp __P((struct canvas *)); -+static struct canvas *AddPerp __P((struct canvas *)); - - - extern struct layer *flayer; -@@ -121,6 +123,8 @@ - int captionalways; - int hardstatusemu = HSTATUS_IGNORE; - -+int focusminwidth, focusminheight; -+ - /* - * Default layer management - */ -@@ -312,7 +316,6 @@ - FreeDisplay() - { - struct win *p; -- struct canvas *cv, *cvp; - #ifdef MULTI - struct display *d, **dp; - #endif -@@ -379,15 +382,16 @@ - if (D_obuf) - free(D_obuf); - *dp = display->d_next; -- cv = display->d_cvlist; - #else /* MULTI */ - ASSERT(display == displays); - ASSERT(display == &TheDisplay); -- cv = display->d_cvlist; -- display->d_cvlist = 0; - displays = 0; - #endif /* MULTI */ - -+ while (D_canvas.c_slperp) -+ FreeCanvas(D_canvas.c_slperp); -+ D_cvlist = 0; -+ - for (p = windows; p; p = p->w_next) - { - if (p->w_pdisplay == display) -@@ -397,11 +401,6 @@ - if (p->w_readev.condneg == &D_status || p->w_readev.condneg == &D_obuflenmax) - p->w_readev.condpos = p->w_readev.condneg = 0; - } -- for (; cv; cv = cvp) -- { -- cvp = cv->c_next; -- FreeCanvas(cv); -- } - #ifdef ZMODEM - for (p = windows; p; p = p->w_next) - if (p->w_zdisplay == display) -@@ -425,11 +424,23 @@ - cv->c_xe = D_width - 1; - cv->c_ys = 0; - cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; -+ debug2("MakeDefaultCanvas 0,0 %d,%d\n", cv->c_xe, cv->c_ye); - cv->c_xoff = 0; - cv->c_yoff = 0; - cv->c_next = 0; - cv->c_display = display; - cv->c_vplist = 0; -+ cv->c_slnext = 0; -+ cv->c_slprev = 0; -+ cv->c_slperp = 0; -+ cv->c_slweight = 1; -+ cv->c_slback = &D_canvas; -+ D_canvas.c_slperp = cv; -+ D_canvas.c_xs = cv->c_xs; -+ D_canvas.c_xe = cv->c_xe; -+ D_canvas.c_ys = cv->c_ys; -+ D_canvas.c_ye = cv->c_ye; -+ cv->c_slorient = SLICE_UNKN; - cv->c_captev.type = EV_TIMEOUT; - cv->c_captev.data = (char *)cv; - cv->c_captev.handler = cv_winid_fn; -@@ -452,14 +463,68 @@ - return 0; - } - -+static struct canvas ** -+CreateCanvasChainRec(cv, cvp) -+struct canvas *cv; -+struct canvas **cvp; -+{ -+ for (; cv; cv = cv->c_slnext) -+ { -+ if (cv->c_slperp) -+ cvp = CreateCanvasChainRec(cv->c_slperp, cvp); -+ else -+ { -+ *cvp = cv; -+ cvp = &cv->c_next; -+ } -+ } -+ return cvp; -+} -+ -+void -+RecreateCanvasChain() -+{ -+ struct canvas **cvp; -+ cvp = CreateCanvasChainRec(D_canvas.c_slperp, &D_cvlist); -+ *cvp = 0; -+} -+ - static void - FreeCanvas(cv) - struct canvas *cv; - { - struct viewport *vp, *nvp; -+ struct canvas **cvp; - struct win *p; - -- p = Layer2Window(cv->c_layer); -+ if (cv->c_slprev) -+ cv->c_slprev->c_slnext = cv->c_slnext; -+ if (cv->c_slnext) -+ cv->c_slnext->c_slprev = cv->c_slprev; -+ if (cv->c_slback && cv->c_slback->c_slperp == cv) -+ cv->c_slback->c_slperp = cv->c_slnext; -+ if (cv->c_slperp) -+ { -+ while (cv->c_slperp) -+ FreeCanvas(cv->c_slperp); -+ free(cv); -+ return; -+ } -+ -+ if (display) -+ { -+ if (D_forecv == cv) -+ D_forecv = 0; -+ /* remove from canvas chain as SetCanvasWindow might call -+ * some layer function */ -+ for (cvp = &D_cvlist; *cvp ; cvp = &(*cvp)->c_next) -+ if (*cvp == cv) -+ { -+ *cvp = cv->c_next; -+ break; -+ } -+ } -+ p = cv->c_layer ? Layer2Window(cv->c_layer) : 0; - SetCanvasWindow(cv, 0); - if (p) - WindowChanged(p, 'u'); -@@ -477,31 +542,371 @@ - } - - int --AddCanvas() -+CountCanvas(cv) -+struct canvas *cv; -+{ -+ int num = 0; -+ for (; cv; cv = cv->c_slnext) -+ { -+ if (cv->c_slperp) -+ { -+ struct canvas *cvp; -+ int nump = 1, n; -+ for (cvp = cv->c_slperp; cvp; cvp = cvp->c_slnext) -+ if (cvp->c_slperp) -+ { -+ n = CountCanvas(cvp->c_slperp); -+ if (n > nump) -+ nump = n; -+ } -+ num += nump; -+ } -+ else -+ num++; -+ } -+ return num; -+} -+ -+int -+CountCanvasPerp(cv) -+struct canvas *cv; - { -- int hh, h, i, j; -- struct canvas *cv, **cvpp; -+ struct canvas *cvp; -+ int num = 1, n; -+ for (cvp = cv->c_slperp; cvp; cvp = cvp->c_slnext) -+ if (cvp->c_slperp) -+ { -+ n = CountCanvas(cvp->c_slperp); -+ if (n > num) -+ num = n; -+ } -+ return num; -+} - -- for (cv = D_cvlist, j = 0; cv; cv = cv->c_next) -- j++; -- j++; /* new canvas */ -- h = D_height - (D_has_hstatus == HSTATUS_LASTLINE); -- if (h / j <= 1) -- return -1; -+void -+EqualizeCanvas(cv, gflag) -+struct canvas *cv; -+int gflag; -+{ -+ struct canvas *cv2; -+ for (; cv; cv = cv->c_slnext) -+ { -+ if (cv->c_slperp && gflag) -+ { -+ cv->c_slweight = CountCanvasPerp(cv); -+ for (cv2 = cv->c_slperp; cv2; cv2 = cv2->c_slnext) -+ if (cv2->c_slperp) -+ EqualizeCanvas(cv2->c_slperp, gflag); -+ } -+ else -+ cv->c_slweight = 1; -+ } -+} - -- for (cv = D_cvlist; cv; cv = cv->c_next) -- if (cv == D_forecv) -- break; -- ASSERT(cv); -- cvpp = &cv->c_next; -+void -+ResizeCanvas(cv) -+struct canvas *cv; -+{ -+ struct canvas *cv2, *cvn, *fcv; -+ int nh, i, maxi, hh, m, w, wsum; -+ int need, got; -+ int xs, ys, xe, ye; -+ int focusmin = 0; -+ -+ xs = cv->c_xs; -+ ys = cv->c_ys; -+ xe = cv->c_xe; -+ ye = cv->c_ye; -+ cv = cv->c_slperp; -+ debug2("ResizeCanvas: %d,%d", xs, ys); -+ debug2(" %d,%d\n", xe, ye); -+ if (cv == 0) -+ return; -+ if (cv->c_slorient == SLICE_UNKN) -+ { -+ ASSERT(!cv->c_slnext && !cv->c_slperp); -+ cv->c_xs = xs; -+ cv->c_xe = xe; -+ cv->c_ys = ys; -+ cv->c_ye = ye; -+ cv->c_xoff = cv->c_xs; -+ cv->c_yoff = cv->c_ys; -+ return; -+ } -+ -+ fcv = 0; -+ if (focusminwidth || focusminheight) -+ { -+ debug("searching for focus canvas\n"); -+ cv2 = D_forecv; -+ while (cv2->c_slback) -+ { -+ if (cv2->c_slback == cv->c_slback) -+ { -+ fcv = cv2; -+ focusmin = cv->c_slorient == SLICE_VERT ? focusminheight : focusminwidth; -+ if (focusmin > 0) -+ focusmin--; -+ else if (focusmin < 0) -+ focusmin = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; -+ debug1("found, focusmin=%d\n", focusmin); -+ } -+ cv2 = cv2->c_slback; -+ } -+ } -+ if (focusmin) -+ { -+ m = CountCanvas(cv) * 2; -+ nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; -+ nh -= m; -+ if (nh < 0) -+ nh = 0; -+ if (focusmin > nh) -+ focusmin = nh; -+ debug1("corrected to %d\n", focusmin); -+ } -+ -+ /* pass 1: calculate weight sum */ -+ for (cv2 = cv, wsum = 0; cv2; cv2 = cv2->c_slnext) -+ { -+ debug1(" weight %d\n", cv2->c_slweight); -+ wsum += cv2->c_slweight; -+ } -+ debug1("wsum = %d\n", wsum); -+ if (wsum == 0) -+ wsum = 1; -+ w = wsum; -+ -+ /* pass 2: calculate need/excess space */ -+ nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; -+ for (cv2 = cv, need = got = 0; cv2; cv2 = cv2->c_slnext) -+ { -+ m = cv2->c_slperp ? CountCanvasPerp(cv2) * 2 - 1 : 1; -+ if (cv2 == fcv) -+ m += focusmin; -+ hh = cv2->c_slweight ? nh * cv2->c_slweight / w : 0; -+ w -= cv2->c_slweight; -+ nh -= hh; -+ debug2(" should %d min %d\n", hh, m); -+ if (hh <= m + 1) -+ need += m + 1 - hh; -+ else -+ got += hh - m - 1; -+ } -+ debug2("need: %d, got %d\n", need, got); -+ if (need > got) -+ need = got; -+ -+ /* pass 3: distribute space */ -+ nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; -+ i = cv->c_slorient == SLICE_VERT ? ys : xs; -+ maxi = cv->c_slorient == SLICE_VERT ? ye : xe; -+ w = wsum; -+ for (; cv; cv = cvn) -+ { -+ cvn = cv->c_slnext; -+ if (i > maxi) -+ { -+ if (cv->c_slprev && !cv->c_slback->c_slback && !cv->c_slprev->c_slperp && !cv->c_slprev->c_slprev) -+ { -+ cv->c_slprev->c_slorient = SLICE_UNKN; -+ if (!captionalways) -+ { -+ cv->c_slback->c_ye++; -+ cv->c_slprev->c_ye++; -+ } -+ } -+ SetCanvasWindow(cv, 0); -+ FreeCanvas(cv); -+ continue; -+ } -+ m = cv->c_slperp ? CountCanvasPerp(cv) * 2 - 1 : 1; -+ if (cv == fcv) -+ m += focusmin; -+ hh = cv->c_slweight ? nh * cv->c_slweight / w : 0; -+ w -= cv->c_slweight; -+ nh -= hh; -+ debug2(" should %d min %d\n", hh, m); -+ if (hh <= m + 1) -+ { -+ hh = m + 1; -+ debug1(" -> %d\n", hh); -+ } -+ else -+ { -+ int hx = need * (hh - m - 1) / got; -+ debug3(" -> %d - %d = %d\n", hh, hx, hh - hx); -+ got -= (hh - m - 1); -+ hh -= hx; -+ need -= hx; -+ debug2(" now need=%d got=%d\n", need, got); -+ } -+ ASSERT(hh >= m + 1); -+ /* hh is window size plus pation line */ -+ if (i + hh > maxi + 2) -+ { -+ hh = maxi + 2 - i; -+ debug1(" not enough space, reducing to %d\n", hh); -+ } -+ if (i + hh == maxi + 1) -+ { -+ hh++; -+ debug(" incrementing as no other canvas will fit\n"); -+ } -+ if (cv->c_slorient == SLICE_VERT) -+ { -+ cv->c_xs = xs; -+ cv->c_xe = xe; -+ cv->c_ys = i; -+ cv->c_ye = i + hh - 2; -+ cv->c_xoff = xs; -+ cv->c_yoff = i; -+ } -+ else -+ { -+ cv->c_xs = i; -+ cv->c_xe = i + hh - 2; -+ cv->c_ys = ys; -+ cv->c_ye = ye; -+ cv->c_xoff = i; -+ cv->c_yoff = ys; -+ } -+ cv->c_xoff = cv->c_xs; -+ cv->c_yoff = cv->c_ys; -+ if (cv->c_slperp) -+ { -+ ResizeCanvas(cv); -+ if (!cv->c_slperp->c_slnext) -+ { -+ debug("deleting perp node\n"); -+ FreePerp(cv->c_slperp); -+ FreePerp(cv); -+ } -+ } -+ i += hh; -+ } -+} -+ -+static struct canvas * -+AddPerp(cv) -+struct canvas *cv; -+{ -+ struct canvas *pcv; -+ debug("Creating new perp node\n"); -+ if ((pcv = (struct canvas *)calloc(1, sizeof *cv)) == 0) -+ return 0; -+ pcv->c_next = 0; -+ pcv->c_display = cv->c_display; -+ pcv->c_slnext = cv->c_slnext; -+ pcv->c_slprev = cv->c_slprev; -+ pcv->c_slperp = cv; -+ pcv->c_slback = cv->c_slback; -+ if (cv->c_slback && cv->c_slback->c_slperp == cv) -+ cv->c_slback->c_slperp = pcv; -+ pcv->c_slorient = cv->c_slorient; -+ pcv->c_xoff = 0; -+ pcv->c_yoff = 0; -+ pcv->c_xs = cv->c_xs; -+ pcv->c_xe = cv->c_xe; -+ pcv->c_ys = cv->c_ys; -+ pcv->c_ye = cv->c_ye; -+ if (pcv->c_slnext) -+ pcv->c_slnext->c_slprev = pcv; -+ if (pcv->c_slprev) -+ pcv->c_slprev->c_slnext = pcv; -+ pcv->c_slweight = cv->c_slweight; -+ cv->c_slweight = 1; -+ cv->c_slnext = 0; -+ cv->c_slprev = 0; -+ cv->c_slperp = 0; -+ cv->c_slback = pcv; -+ cv->c_slorient = SLICE_UNKN; -+ return pcv; -+} -+ -+static void -+FreePerp(pcv) -+struct canvas *pcv; -+{ -+ struct canvas *cv; -+ -+ if (!pcv->c_slperp) -+ return; -+ cv = pcv->c_slperp; -+ cv->c_slprev = pcv->c_slprev; -+ if (cv->c_slprev) -+ cv->c_slprev->c_slnext = cv; -+ cv->c_slback = pcv->c_slback; -+ if (cv->c_slback && cv->c_slback->c_slperp == pcv) -+ cv->c_slback->c_slperp = cv; -+ cv->c_slorient = pcv->c_slorient; -+ cv->c_slweight = pcv->c_slweight; -+ while (cv->c_slnext) -+ { -+ cv = cv->c_slnext; -+ cv->c_slorient = pcv->c_slorient; -+ cv->c_slback = pcv->c_slback; -+ cv->c_slweight = pcv->c_slweight; -+ } -+ cv->c_slnext = pcv->c_slnext; -+ if (cv->c_slnext) -+ cv->c_slnext->c_slprev = cv; -+ free(pcv); -+} -+ -+int -+AddCanvas(orient) -+int orient; -+{ -+ struct canvas *cv; -+ int xs, xe, ys, ye; -+ int h, num; -+ -+ cv = D_forecv; -+ debug2("AddCanvas orient %d, forecv is %d\n", orient, cv->c_slorient); -+ -+ if (cv->c_slorient != SLICE_UNKN && cv->c_slorient != orient) -+ if (!AddPerp(cv)) -+ return -1; -+ -+ cv = D_forecv; -+ xs = cv->c_slback->c_xs; -+ xe = cv->c_slback->c_xe; -+ ys = cv->c_slback->c_ys; -+ ye = cv->c_slback->c_ye; -+ if (!captionalways && cv == D_canvas.c_slperp && !cv->c_slnext) -+ ye--; /* need space for caption */ -+ debug2("Adding Canvas to slice %d,%d ", xs, ys); -+ debug2("%d,%d\n", xe, ye); -+ -+ num = CountCanvas(cv->c_slback->c_slperp) + 1; -+ debug1("Num = %d\n", num); -+ if (orient == SLICE_VERT) -+ h = ye - ys + 1; -+ else -+ h = xe - xs + 1; -+ -+ h -= 2 * num - 1; -+ if (h < 0) -+ return -1; /* can't fit in */ - - if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) - return -1; - -- cv->c_xs = 0; -- cv->c_xe = D_width - 1; -- cv->c_ys = 0; -- cv->c_ye = D_height - 1; -+ D_forecv->c_slback->c_ye = ye; /* in case we modified it above */ -+ D_forecv->c_slorient = orient; /* in case it was UNKN */ -+ cv->c_slnext = D_forecv->c_slnext; -+ cv->c_slprev = D_forecv; -+ D_forecv->c_slnext = cv; -+ if (cv->c_slnext) -+ cv->c_slnext->c_slprev = cv; -+ cv->c_slorient = orient; -+ cv->c_slback = D_forecv->c_slback; -+ -+ cv->c_xs = xs; -+ cv->c_xe = xe; -+ cv->c_ys = ys; -+ cv->c_ye = ye; - cv->c_xoff = 0; - cv->c_yoff = 0; - cv->c_display = display; -@@ -522,20 +927,12 @@ - cv->c_layer = &cv->c_blank; - cv->c_lnext = 0; - -- cv->c_next = *cvpp; -- *cvpp = cv; -- -- i = 0; -- for (cv = D_cvlist; cv; cv = cv->c_next) -- { -- hh = h / j-- - 1; -- cv->c_ys = i; -- cv->c_ye = i + hh - 1; -- cv->c_yoff = i; -- i += hh + 1; -- h -= hh + 1; -- } -+ cv->c_next = 0; - -+ cv = cv->c_slback; -+ EqualizeCanvas(cv->c_slperp, 0); -+ ResizeCanvas(cv); -+ RecreateCanvasChain(); - RethinkDisplayViewports(); - ResizeLayersToCanvases(); - return 0; -@@ -544,40 +941,55 @@ - void - RemCanvas() - { -- int hh, h, i, j; -- struct canvas *cv, **cvpp; -- int did = 0; -- -- h = D_height - (D_has_hstatus == HSTATUS_LASTLINE); -- for (cv = D_cvlist, j = 0; cv; cv = cv->c_next) -- j++; -- if (j == 1) -- return; -- i = 0; -- j--; -- for (cvpp = &D_cvlist; (cv = *cvpp); cvpp = &cv->c_next) -+ int xs, xe, ys, ye; -+ struct canvas *cv; -+ -+ debug("RemCanvas\n"); -+ cv = D_forecv; -+ if (cv->c_slorient == SLICE_UNKN) -+ return; -+ while (cv->c_slprev) -+ cv = cv->c_slprev; -+ if (!cv->c_slnext) -+ return; -+ if (!cv->c_slnext->c_slnext && cv->c_slback->c_slback) - { -- if (cv == D_forecv && !did) -- { -- *cvpp = cv->c_next; -- FreeCanvas(cv); -- cv = *cvpp; -- D_forecv = cv ? cv : D_cvlist; -- D_fore = Layer2Window(D_forecv->c_layer); -- flayer = D_forecv->c_layer; -- if (cv == 0) -- break; -- did = 1; -- } -- hh = h / j-- - 1; -- if (!captionalways && i == 0 && j == 0) -- hh++; -- cv->c_ys = i; -- cv->c_ye = i + hh - 1; -- cv->c_yoff = i; -- i += hh + 1; -- h -= hh + 1; -- } -+ /* two canvases in slice, kill perp node */ -+ cv = D_forecv; -+ debug("deleting perp node\n"); -+ FreePerp(cv->c_slprev ? cv->c_slprev : cv->c_slnext); -+ FreePerp(cv->c_slback); -+ } -+ xs = cv->c_slback->c_xs; -+ xe = cv->c_slback->c_xe; -+ ys = cv->c_slback->c_ys; -+ ye = cv->c_slback->c_ye; -+ /* free canvas */ -+ cv = D_forecv; -+ D_forecv = cv->c_slprev; -+ if (!D_forecv) -+ D_forecv = cv->c_slnext; -+ FreeCanvas(cv); -+ -+ cv = D_forecv; -+ while (D_forecv->c_slperp) -+ D_forecv = D_forecv->c_slperp; -+ -+ /* if only one canvas left, set orient back to unknown */ -+ if (!cv->c_slnext && !cv->c_slprev && !cv->c_slback->c_slback) -+ { -+ cv->c_slorient = SLICE_UNKN; -+ if (!captionalways) -+ cv->c_slback->c_ye = ++ye; /* caption line no longer needed */ -+ } -+ cv = cv->c_slback; -+ EqualizeCanvas(cv->c_slperp, 0); -+ ResizeCanvas(cv); -+ -+ D_fore = Layer2Window(D_forecv->c_layer); -+ flayer = D_forecv->c_layer; -+ -+ RecreateCanvasChain(); - RethinkDisplayViewports(); - ResizeLayersToCanvases(); - } -@@ -585,24 +997,35 @@ - void - OneCanvas() - { -- struct canvas *mycv = D_forecv; -- struct canvas *cv, **cvpp; -+ struct canvas *cv = D_forecv, *ocv = 0; - -- for (cvpp = &D_cvlist; (cv = *cvpp);) -+ if (cv->c_slprev) - { -- if (cv == mycv) -- { -- cv->c_ys = 0; -- cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; -- cv->c_yoff = 0; -- cvpp = &cv->c_next; -- } -- else -- { -- *cvpp = cv->c_next; -- FreeCanvas(cv); -- } -+ ocv = cv->c_slprev; -+ cv->c_slprev->c_slnext = cv->c_slnext; -+ } -+ if (cv->c_slnext) -+ { -+ ocv = cv->c_slnext; -+ cv->c_slnext->c_slprev = cv->c_slprev; - } -+ if (!ocv) -+ return; -+ if (cv->c_slback && cv->c_slback->c_slperp == cv) -+ cv->c_slback->c_slperp = ocv; -+ cv->c_slorient = SLICE_UNKN; -+ while (D_canvas.c_slperp) -+ FreeCanvas(D_canvas.c_slperp); -+ cv = D_forecv; -+ D_canvas.c_slperp = cv; -+ cv->c_slback = &D_canvas; -+ cv->c_slnext = 0; -+ cv->c_slprev = 0; -+ ASSERT(!cv->c_slperp); -+ if (!captionalways) -+ D_canvas.c_ye++; /* caption line no longer needed */ -+ ResizeCanvas(&D_canvas); -+ RecreateCanvasChain(); - RethinkDisplayViewports(); - ResizeLayersToCanvases(); - } -@@ -2383,7 +2806,7 @@ - ShowHStatus(str) - char *str; - { -- int l, i, ox, oy, max; -+ int l, ox, oy, max; - - if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE == D_height-1) - return; /* sorry, in use */ -@@ -2422,9 +2845,7 @@ - l = D_width; - GotoPos(0, D_height - 1); - SetRendition(captionalways || D_cvlist == 0 || D_cvlist->c_next ? &mchar_null: &mchar_so); -- if (!PutWinMsg(str, 0, l)) -- for (i = 0; i < l; i++) -- PUTCHARLP(str[i]); -+ PutWinMsg(str, 0, l); - if (!captionalways && D_cvlist && !D_cvlist->c_next) - while (l++ < D_width) - PUTCHARLP(' '); -@@ -2510,7 +2931,7 @@ - struct viewport *vp, *lvp; - struct canvas *cv, *lcv, *cvlist, *cvlnext; - struct layer *oldflayer; -- int xx, yy; -+ int xx, yy, l; - char *buf; - struct win *p; - -@@ -2522,6 +2943,12 @@ - if (D_status == STATUS_ON_WIN && y == STATLINE) - return; /* can't refresh status */ - -+ if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) -+ { -+ RefreshHStatus(); -+ return; -+ } -+ - if (isblank == 0 && D_CE && to == D_width - 1 && from < to) - { - GotoPos(from, y); -@@ -2536,6 +2963,32 @@ - lvp = 0; - for (cv = display->d_cvlist; cv; cv = cv->c_next) - { -+ if (y == cv->c_ye + 1 && from >= cv->c_xs && from <= cv->c_xe) -+ { -+ p = Layer2Window(cv->c_layer); -+ buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP), &cv->c_captev, 0); -+ if (cv->c_captev.timeout.tv_sec) -+ evenq(&cv->c_captev); -+ xx = to > cv->c_xe ? cv->c_xe : to; -+ l = strlen(buf); -+ GotoPos(from, y); -+ SetRendition(&mchar_so); -+ if (l > xx - cv->c_xs + 1) -+ l = xx - cv->c_xs + 1; -+ PutWinMsg(buf, from - cv->c_xs, l); -+ from = cv->c_xs + l; -+ for (; from <= xx; from++) -+ PUTCHARLP(' '); -+ break; -+ } -+ if (from == cv->c_xe + 1 && y >= cv->c_ys && y <= cv->c_ye + 1) -+ { -+ GotoPos(from, y); -+ SetRendition(&mchar_so); -+ PUTCHARLP(' '); -+ from++; -+ break; -+ } - if (y < cv->c_ys || y > cv->c_ye || to < cv->c_xs || from > cv->c_xe) - continue; - debug2("- canvas hit: %d %d", cv->c_xs, cv->c_ys); -@@ -2552,6 +3005,8 @@ - } - } - } -+ if (cv) -+ continue; /* we advanced from */ - if (lvp == 0) - break; - if (from < lvp->v_xs) -@@ -2600,44 +3055,8 @@ - - from = xx + 1; - } -- if (from > to) -- return; /* all done */ -- -- if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) -- { -- RefreshHStatus(); -- return; -- } -- -- for (cv = display->d_cvlist; cv; cv = cv->c_next) -- if (y == cv->c_ye + 1) -- break; -- if (cv == 0) -- { -- if (!isblank) -- DisplayLine(&mline_null, &mline_blank, y, from, to); -- return; -- } -- -- p = Layer2Window(cv->c_layer); -- buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev, 0); -- if (cv->c_captev.timeout.tv_sec) -- evenq(&cv->c_captev); -- xx = strlen(buf); -- GotoPos(from, y); -- SetRendition(&mchar_so); -- if (PutWinMsg(buf, from, to + 1)) -- from = xx > to + 1 ? to + 1 : xx; -- else -- { -- while (from <= to && from < xx) -- { -- PUTCHARLP(buf[from]); -- from++; -- } -- } -- while (from++ <= to) -- PUTCHARLP(' '); -+ if (!isblank && from <= to) -+ DisplayLine(&mline_null, &mline_blank, y, from, to); - } - - /*********************************************************************/ -@@ -3920,3 +4339,296 @@ - } - - #endif -+ -+struct layout *layouts; -+struct layout *laytab[MAXLAY]; -+struct layout *layout_last, layout_last_marker; -+struct layout *layout_attach = &layout_last_marker; -+ -+void -+FreeLayoutCv(cv) -+struct canvas *cv; -+{ -+ for (; cv; cv = cv->c_slnext) -+ if (cv->c_slperp) -+ { -+ FreeLayoutCv(cv->c_slperp); -+ free(cv->c_slperp); -+ cv->c_slperp = 0; -+ } -+} -+ -+void -+DupLayoutCv(cvf, cvt, save) -+struct canvas *cvf, *cvt; -+int save; -+{ -+ while(cvf) -+ { -+ cvt->c_slorient = cvf->c_slorient; -+ cvt->c_slweight = cvf->c_slweight; -+ if (cvf == D_forecv) -+ D_forecv = cvt; -+ if (!save) -+ { -+ cvt->c_display = display; -+ if (!cvf->c_slperp) -+ { -+ cvt->c_captev.type = EV_TIMEOUT; -+ cvt->c_captev.data = (char *)cvt; -+ cvt->c_captev.handler = cv_winid_fn; -+ cvt->c_blank.l_cvlist = 0; -+ cvt->c_blank.l_layfn = &BlankLf; -+ cvt->c_blank.l_bottom = &cvt->c_blank; -+ } -+ cvt->c_layer = cvf->c_layer; -+ } -+ else -+ { -+ struct win *p = cvf->c_layer ? Layer2Window(cvf->c_layer) : 0; -+ cvt->c_layer = p ? &p->w_layer : 0; -+ } -+ if (cvf->c_slperp) -+ { -+ cvt->c_slperp = (struct canvas *)calloc(1, sizeof(struct canvas)); -+ cvt->c_slperp->c_slback = cvt; -+ DupLayoutCv(cvf->c_slperp, cvt->c_slperp, save); -+ } -+ if (cvf->c_slnext) -+ { -+ cvt->c_slnext = (struct canvas *)calloc(1, sizeof(struct canvas)); -+ cvt->c_slnext->c_slprev = cvt; -+ cvt->c_slnext->c_slback = cvt->c_slback; -+ } -+ cvf = cvf->c_slnext; -+ cvt = cvt->c_slnext; -+ } -+} -+ -+void -+PutWindowCv(cv) -+struct canvas *cv; -+{ -+ struct win *p; -+ for (; cv; cv = cv->c_slnext) -+ { -+ if (cv->c_slperp) -+ { -+ PutWindowCv(cv->c_slperp); -+ continue; -+ } -+ p = cv->c_layer ? (struct win *)cv->c_layer->l_data : 0; -+ cv->c_layer = 0; -+ SetCanvasWindow(cv, p); -+ } -+} -+ -+struct lay * -+CreateLayout(title, startat) -+char *title; -+int startat; -+{ -+ struct layout *lay; -+ int i; -+ -+ if (startat >= MAXLAY || startat < 0) -+ startat = 0; -+ for (i = startat; ;) -+ { -+ if (!laytab[i]) -+ break; -+ if (++i == MAXLAY) -+ i = 0; -+ if (i == startat) -+ { -+ Msg(0, "No more layouts\n"); -+ return 0; -+ } -+ } -+ lay = (struct layout *)calloc(1, sizeof(*lay)); -+ lay->lay_title = SaveStr(title); -+ lay->lay_autosave = 1; -+ lay->lay_number = i; -+ laytab[i] = lay; -+ lay->lay_next = layouts; -+ layouts = lay; -+ return lay; -+} -+ -+void -+SaveLayout(name, cv) -+char *name; -+struct canvas *cv; -+{ -+ struct layout *lay; -+ struct canvas *fcv; -+ for (lay = layouts; lay; lay = lay->lay_next) -+ if (!strcmp(lay->lay_title, name)) -+ break; -+ if (lay) -+ FreeLayoutCv(&lay->lay_canvas); -+ else -+ lay = CreateLayout(name, 0); -+ if (!lay) -+ return; -+ fcv = D_forecv; -+ DupLayoutCv(cv, &lay->lay_canvas, 1); -+ lay->lay_forecv = D_forecv; -+ D_forecv = fcv; -+ D_layout = lay; -+} -+ -+void -+AutosaveLayout(lay) -+struct layout *lay; -+{ -+ struct canvas *fcv; -+ if (!lay || !lay->lay_autosave) -+ return; -+ FreeLayoutCv(&lay->lay_canvas); -+ fcv = D_forecv; -+ DupLayoutCv(&D_canvas, &lay->lay_canvas, 1); -+ lay->lay_forecv = D_forecv; -+ D_forecv = fcv; -+} -+ -+struct layout * -+FindLayout(name) -+char *name; -+{ -+ struct layout *lay; -+ char *s; -+ int i; -+ for (i = 0, s = name; *s >= '0' && *s <= '9'; s++) -+ i = i * 10 + (*s - '0'); -+ if (!*s && s != name && i >= 0 && i < MAXLAY) -+ return laytab[i]; -+ for (lay = layouts; lay; lay = lay->lay_next) -+ if (!strcmp(lay->lay_title, name)) -+ break; -+ return lay; -+} -+ -+void -+LoadLayout(lay, cv) -+struct layout *lay; -+struct canvas *cv; -+{ -+ AutosaveLayout(D_layout); -+ if (!lay) -+ { -+ while (D_canvas.c_slperp) -+ FreeCanvas(D_canvas.c_slperp); -+ MakeDefaultCanvas(); -+ SetCanvasWindow(D_forecv, 0); -+ D_layout = 0; -+ return; -+ } -+ while (D_canvas.c_slperp) -+ FreeCanvas(D_canvas.c_slperp); -+ D_cvlist = 0; -+ D_forecv = lay->lay_forecv; -+ DupLayoutCv(&lay->lay_canvas, &D_canvas, 0); -+ D_canvas.c_ye = D_height - 1 - ((D_canvas.c_slperp && D_canvas.c_slperp->c_slnext) || captionalways) - (D_has_hstatus == HSTATUS_LASTLINE); -+ ResizeCanvas(&D_canvas); -+ RecreateCanvasChain(); -+ RethinkDisplayViewports(); -+ PutWindowCv(&D_canvas); -+ ResizeLayersToCanvases(); -+ D_layout = lay; -+} -+ -+void -+NewLayout(title, startat) -+char *title; -+int startat; -+{ -+ struct layout *lay; -+ struct canvas *fcv; -+ -+ lay = CreateLayout(title, startat); -+ if (!lay) -+ return; -+ LoadLayout(0, &D_canvas); -+ fcv = D_forecv; -+ DupLayoutCv(&D_canvas, &lay->lay_canvas, 1); -+ lay->lay_forecv = D_forecv; -+ D_forecv = fcv; -+ D_layout = lay; -+ lay->lay_autosave = 1; -+} -+ -+static char * -+AddLayoutsInfo(buf, len, where) -+char *buf; -+int len; -+int where; -+{ -+ char *s, *ss, *t; -+ struct layout *p, **pp; -+ int l; -+ -+ s = ss = buf; -+ for (pp = laytab; pp < laytab + MAXLAY; pp++) -+ { -+ if (pp - laytab == where && ss == buf) -+ ss = s; -+ if ((p = *pp) == 0) -+ continue; -+ t = p->lay_title; -+ l = strlen(t); -+ if (l > 20) -+ l = 20; -+ if (s - buf + l > len - 24) -+ break; -+ if (s > buf) -+ { -+ *s++ = ' '; -+ *s++ = ' '; -+ } -+ sprintf(s, "%d", p->lay_number); -+ if (p->lay_number == where) -+ ss = s; -+ s += strlen(s); -+ if (display && p == D_layout) -+ *s++ = '*'; -+ *s++ = ' '; -+ strncpy(s, t, l); -+ s += l; -+ } -+ *s = 0; -+ return ss; -+} -+ -+void -+ShowLayouts(where) -+int where; -+{ -+ char buf[1024]; -+ char *s, *ss; -+ -+ if (!display) -+ return; -+ if (!layouts) -+ { -+ Msg(0, "No layouts defined\n"); -+ return; -+ } -+ if (where == -1 && D_layout) -+ where = D_layout->lay_number; -+ ss = AddLayoutsInfo(buf, sizeof(buf), where); -+ s = buf + strlen(buf); -+ if (ss - buf > D_width / 2) -+ { -+ ss -= D_width / 2; -+ if (s - ss < D_width) -+ { -+ ss = s - D_width; -+ if (ss < buf) -+ ss = buf; -+ } -+ } -+ else -+ ss = buf; -+ Msg(0, "%s", ss); -+} -diff -Naur screen-4.0.3.orig/display.h screen-4.0.3/display.h ---- screen-4.0.3.orig/display.h 2003-07-01 16:01:42.000000000 +0200 -+++ screen-4.0.3/display.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,17 +19,18 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: display.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU -+ * $Id: display.h,v 1.26 2007/02/07 22:53:59 mls Exp $ FAU - */ - - #ifdef MAPKEYS - - #define KMAP_KEYS (T_OCAPS-T_CAPS) - #define KMAP_AKEYS (T_OCAPS-T_CURSOR) --#define KMAP_EXT 50 - - #define KMAP_NOTIMEOUT 0x4000 - -+#define MAXLAY 10 -+ - struct kmap_ext - { - char *str; -@@ -39,14 +40,33 @@ - struct action mm; - }; - -+#else -+ -+#define KMAP_KEYS 0 -+ - #endif - - struct win; /* forward declaration */ - -+#define SLICE_UNKN 0 -+#define SLICE_VERT (1 << 0) -+#define SLICE_HORI (1 << 1) -+ -+#define SLICE_THIS (1 << 2) /* used in equal test */ -+#define SLICE_GLOBAL (1 << 3) -+ - struct canvas - { - struct canvas *c_next; /* next canvas on display */ - struct display *c_display; /* back pointer to display */ -+ -+ struct canvas *c_slnext; /* next canvas in display slice */ -+ struct canvas *c_slprev; /* prev canvas in display slice */ -+ struct canvas *c_slperp; /* perpendicular slice */ -+ struct canvas *c_slback; /* perpendicular slice back pointer */ -+ int c_slorient; /* our slice orientation */ -+ int c_slweight; /* size ratio */ -+ - struct viewport *c_vplist; - struct layer *c_layer; /* layer on this canvas */ - struct canvas *c_lnext; /* next canvas that displays layer */ -@@ -60,6 +80,17 @@ - struct event c_captev; /* caption changed event */ - }; - -+struct layout -+{ -+ struct layout *lay_next; -+ char *lay_title; -+ int lay_number; -+ struct canvas lay_canvas; -+ struct canvas *lay_forecv; -+ struct canvas *lay_cvlist; -+ int lay_autosave; -+}; -+ - struct viewport - { - struct viewport *v_next; /* next vp on canvas */ -@@ -75,9 +106,11 @@ - struct display - { - struct display *d_next; /* linked list */ -- struct acluser *d_user; /* user who owns that display */ -+ struct acluser *d_user; /* user who owns that display */ -+ struct canvas d_canvas; /* our canvas slice */ - struct canvas *d_cvlist; /* the canvases of this display */ - struct canvas *d_forecv; /* current input focus */ -+ struct layout *d_layout; /* layout we're using */ - void (*d_processinput) __P((char *, int)); - char *d_processinputdata; /* data for processinput */ - int d_vpxmin, d_vpxmax; /* min/max used position on display */ -@@ -198,7 +231,9 @@ - - #define D_user DISPLAY(d_user) - #define D_username (DISPLAY(d_user) ? DISPLAY(d_user)->u_name : 0) -+#define D_canvas DISPLAY(d_canvas) - #define D_cvlist DISPLAY(d_cvlist) -+#define D_layout DISPLAY(d_layout) - #define D_forecv DISPLAY(d_forecv) - #define D_processinput DISPLAY(d_processinput) - #define D_processinputdata DISPLAY(d_processinputdata) -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2003-12-05 14:51:57.000000000 +0100 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:39:31.000000000 +0200 -@@ -283,9 +283,9 @@ - command. - .TP 5 - .BI "\-p " number_or_name --Preselect a window. This is usefull when you want to reattach to a --specific windor or you want to send a command via the \*Q-X\*U --option to a specific window. As with screen's select commant, \*Q-\*U -+Preselect a window. This is useful when you want to reattach to a -+specific window or you want to send a command via the \*Q-X\*U -+option to a specific window. As with screen's select command, \*Q-\*U - selects the blank window. As a special case for reattach, \*Q=\*U - brings up the windowlist on the blank window. - .TP 5 -@@ -360,6 +360,9 @@ - Attach to a not detached - .I screen - session. (Multi display mode). -+.I Screen -+refuses to attach from within itself. -+But when cascading multiple screens, loops are not detected; take care. - .TP 5 - .B \-X - Send the specified command to a running screen session. You can use -@@ -396,6 +399,7 @@ - .IP "\fBC-a tab\fP (focus)" - .PD - Switch the input focus to the next region. -+See also \fIsplit, remove, only\fP. - .IP "\fBC-a C-a\fP (other)" - Toggle to the window displayed previously. - Note that this binding defaults to the command character typed twice, -@@ -492,6 +496,7 @@ - Send a control-q to the current window. - .IP "\fBC-a Q\fP (only)" - Delete all regions but the current one. -+See also \fIsplit, remove, focus\fP. - .IP "\fBC-a r\fP" - .PD 0 - .IP "\fBC-a C-r\fP (wrap)" -@@ -505,6 +510,7 @@ - Send a control-s to the current window. - .IP "\fBC-a S\fP (split)" - Split the current region into two new ones. -+See also \fIonly, remove, focus\fP. - .IP "\fBC-a t\fP" - .PD 0 - .IP "\fBC-a C-t\fP (time)" -@@ -530,6 +536,7 @@ - Lock this terminal. - .IP "\fBC-a X\fP (remove)" - Kill the current region. -+See also \fIsplit, only, focus\fP. - .IP "\fBC-a z\fP" - .PD 0 - .IP "\fBC-a C-z\fP (suspend)" -@@ -1044,7 +1051,7 @@ - This key-binding makes \*Q^T\*U an escape character for key-bindings. If - you did the above \*Qstuff barfoo\*U binding, you can enter the word - \*Qfoo\*U by typing \*Q^Tfoo\*U. If you want to insert a \*Q^T\*U --you have to press the key twice (i.e. escape the escape binding). -+you have to press the key twice (i.e., escape the escape binding). - .sp - .nf - bindkey -k F1 command -@@ -1448,7 +1455,7 @@ - of the break, but it may be the only way to generate long breaks. - .IR Tcsendbreak " and " TIOCSBRK - may or may not produce long breaks with spikes (e.g. 4 per --second). This is not only system dependant, this also differs between -+second). This is not only system-dependent, this also differs between - serial board drivers. - Calling \*Qdefbreaktype\*U with no parameter displays the current setting. - .sp -@@ -1724,7 +1731,7 @@ - optional arguments) in the current window. The flow of data between - newcommands stdin/stdout/stderr, the process originally started in the window - (let us call it "application-process") and screen itself (window) is --controlled by the filedescriptor pattern fdpat. -+controlled by the file descriptor pattern fdpat. - This pattern is basically a three character sequence representing stdin, stdout - and stderr of newcommand. A dot (.) connects the file descriptor - to -@@ -1837,6 +1844,7 @@ - bind t focus top - bind b focus bottom - .fi -+Note that \fBk\fP is traditionally bound to the \fIkill\fP command. - .sp - .ne 3 - .BR "gr " [ on | off ] -@@ -1914,7 +1922,7 @@ - will use the type even if the terminal supports a hardstatus. - .P - The third form specifies the contents of the hardstatus line. '%h' is --used as default string, i.e. the stored hardstatus of the current -+used as default string, i.e., the stored hardstatus of the current - window (settable via \*QESC]0;^G\*U or \*QESC_ESC\e\*U) - is displayed. You can customize this to any string you like including - the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave out -@@ -2111,7 +2119,7 @@ - .br - .BI "logfile flush " secs - .PP --Defines the name the logfiles will get. The default is -+Defines the name the log files will get. The default is - \*Qscreenlog.%n\*U. The second form changes the number of seconds - .I screen - will wait before flushing the logfile buffer to the file-system. The -@@ -2702,6 +2710,7 @@ - display are resized to make room for the new region. The blank - window is displayed on the new region. Use the \*Qremove\*U or the - \*Qonly\*U command to delete regions. -+Use \*Qfocus\*U to toggle between regions. - .sp - .ne 3 - .B "startup_message on\fP|\fBoff" -@@ -3091,7 +3100,7 @@ - Note also that this is an experimental feature. - .sp - .ne 3 --.BR "zombie " [\fIkeys\fP] -+.BR "zombie " [\fIkeys\fP [ onerror ] ] - .br - .BR "defzombie " [\fIkeys\fP] - .PP -@@ -3113,6 +3122,10 @@ - should only be called \fBdefzombie\fP. Until we need this as a per window - setting, the commands \fBzombie\fP and \fBdefzombie\fP are synonymous. - -+Optionally you can put the word \*Qonerror\*U after the keys. This will cause screen -+to monitor exit status of the process running in the window. If it exits normally ('0'), -+the window disappears. Any other exit value causes the window to become a zombie. -+ - .SH "THE MESSAGE LINE" - .I Screen - displays informational messages and other diagnostics in a \fImessage line\fP. -@@ -3179,7 +3192,7 @@ - .PP - You may want to specify as many of these options as applicable. Unspecified - options cause the terminal driver to make up the parameter values of the --connection. These values are system dependant and may be in defaults or values -+connection. These values are system dependent and may be in defaults or values - saved from a previous connection. - .PP - For tty windows, the -@@ -3293,7 +3306,7 @@ - .IP u - all other users on this window - .IP w --all window numbers and names. With '-' quailifier: up to the current -+all window numbers and names. With '-' qualifier: up to the current - window; with '+' qualifier: starting with the window after the current - one. - .IP W -@@ -3345,7 +3358,7 @@ - color settings. Its format - is \*Q[attribute modifier] [color description]\*U. The attribute modifier - must be prefixed by a change type indicator if it can be confused with --a color desciption. The following change types are known: -+a color description. The following change types are known: - .IP + - add the specified set to the current attributes - .IP - -@@ -3403,14 +3416,14 @@ - unchanged. - .br - A one digit/letter color description is treated as foreground or --background color dependant on the current attributes: if reverse mode is -+background color dependent on the current attributes: if reverse mode is - set, the background color is changed instead of the foreground color. - If you don't like this, prefix the color with a \*Q.\*U. If you want --the same behaviour for two-letter color descriptions, also prefix them -+the same behavior for two-letter color descriptions, also prefix them - with a \*Q.\*U. - .br - As a special case, \*Q%{-}\*U restores the attributes and colors that --were set before the last change was made (i.e. pops one level of the -+were set before the last change was made (i.e., pops one level of the - color-change stack). - .PP - Examples: -@@ -4329,7 +4342,7 @@ - A \fI\fP tells - .I screen - how to map characters --in font \fI\fP ('B': Ascii, 'A': UK, 'K': german, etc.) -+in font \fI\fP ('B': Ascii, 'A': UK, 'K': German, etc.) - to strings. Every \fI\fP describes to what string a single - character will be translated. A template mechanism is used, as - most of the time the codes have a lot in common (for example -@@ -4349,7 +4362,7 @@ - .I screen - how to translate ISOlatin1 (charset 'B') - upper case umlaut characters on a hp700 terminal that has a --german charset. '\e304' gets translated to '\eE(K[\eE(B' and so on. -+German charset. '\e304' gets translated to '\eE(K[\eE(B' and so on. - Note that this line gets parsed *three* times before the internal - lookup table is built, therefore a lot of quoting is needed to - create a single '\e'. -@@ -4367,7 +4380,7 @@ - - termcap xterm 'XC=K%,%\eE(B,[\e304,\e\e\e\e\e326,]\e334' - --Here, a part of the german ('K') charset is emulated on an xterm. -+Here, a part of the German ('K') charset is emulated on an xterm. - If - .I screen - has to change to the 'K' charset, '\eE(B' will be sent -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2003-12-05 14:51:46.000000000 +0100 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:39:31.000000000 +0200 -@@ -345,9 +345,9 @@ - @end table - - @item -p @var{name_or_number} --Preselect a window. This is usefull when you want to reattach to a --specific windor or you want to send a command via the @samp{-X} --option to a specific window. As with screen's select commant, @samp{-} -+Preselect a window. This is useful when you want to reattach to a -+specific window or you want to send a command via the @samp{-X} -+option to a specific window. As with screen's select command, @samp{-} - selects the blank window. As a special case for reattach, @samp{=} - brings up the windowlist on the blank window. - -@@ -417,7 +417,10 @@ - - @item -x - Attach to a session which is already attached elsewhere (multi-display --mode). -+mode). -+@code{Screen} refuses to attach from within itself. -+But when cascading multiple screens, loops are not detected; take care. -+ - - @item -X - Send the specified command to a running screen session. You can use -@@ -1156,7 +1159,7 @@ - Send an XON character. @xref{XON/XOFF}. - @item zmodem [off|auto|catch|pass] - Define how screen treats zmodem requests. @xref{Zmodem}. --@item zombie [@var{keys}] -+@item zombie [@var{keys} [onerror] ] - Keep dead windows. @xref{Zombie}. - @end table - -@@ -1332,7 +1335,7 @@ - - You may want to specify as many of these options as applicable. - Unspecified options cause the terminal driver to make up the parameter --values of the connection. These values are system dependant and may be -+values of the connection. These values are system-dependent and may be - in defaults or values saved from a previous connection. - - For tty windows, the @code{info} command shows some of the modem -@@ -2888,7 +2891,7 @@ - users. - If your terminal sends characters, that cause you to abort copy mode, - then this command may help by binding these characters to do nothing. --The no-op character is `@' and is used like this: @code{markkeys @@=L=H} -+The no-op character is `@@' and is used like this: @code{markkeys @@=L=H} - if you do not want to use the `H' or `L' commands any longer. - As shown in this example, multiple keys can be assigned to one function - in a single statement. -@@ -2928,7 +2931,7 @@ - @noindent - @kbd{C-u} and @kbd{C-d} scroll the display up/down by the specified - amount of lines while preserving the cursor position. (Default: half --screenfull). -+screenful). - - @noindent - @kbd{C-b} and @kbd{C-f} move the cursor up/down a full screen. -@@ -3224,7 +3227,7 @@ - its optional arguments) in the current window. The flow of data between - newcommands stdin/stdout/stderr, the process originally started (let us call it - "application-process") and --screen itself (window) is controlled by the filedescriptor pattern @var{fdpat}. -+screen itself (window) is controlled by the file descriptor pattern @var{fdpat}. - This pattern is basically a three character sequence representing stdin, stdout - and stderr of newcommand. A dot (@code{.}) connects the file descriptor - to screen. An exclamation mark (@code{!}) causes the file descriptor to be -@@ -3466,7 +3469,7 @@ - changes the copy mode table and with neither option the user - table is selected. The argument @samp{string} is the sequence of - characters to which an action is bound. This can either be a fixed --tring or a termcap keyboard capability name (selectable with the -+string or a termcap keyboard capability name (selectable with the - @samp{-k} option). - - Some keys on a VT100 terminal can send a different -@@ -3516,7 +3519,7 @@ - This key-binding makes @samp{C-t} an escape character for key-bindings. If - you did the above @samp{stuff barfoo} binding, you can enter the word - @samp{foo} by typing @samp{C-t foo}. If you want to insert a --@samp{C-t} you have to press the key twice (i.e. escape the escape -+@samp{C-t} you have to press the key twice (i.e., escape the escape - binding). - - @example -@@ -3539,7 +3542,7 @@ - @end deffn - @deffn Command maptimeout timo - (none)@* --Set the intercharacter timer for input sequence detection to a timeout -+Set the inter-character timer for input sequence detection to a timeout - of @var{timo} ms. The default timeout is 300ms. Maptimeout with no - arguments shows the current setting. - @end deffn -@@ -4061,7 +4064,7 @@ - - This tells @code{screen}, how to translate ISOlatin1 (charset @samp{B}) - upper case umlaut characters on a @code{hp700} terminal that has a --german charset. @samp{\304} gets translated to -+German charset. @samp{\304} gets translated to - @samp{\E(K[\E(B} and so on. - Note that this line gets parsed *three* times before the internal - lookup table is built, therefore a lot of quoting is needed to -@@ -4080,7 +4083,7 @@ - termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334' - @end example - --Here, a part of the german (@samp{K}) charset is emulated on an xterm. -+Here, a part of the German (@samp{K}) charset is emulated on an xterm. - If screen has to change to the @samp{K} charset, @samp{\E(B} will be - sent - to the terminal, i.e. the ASCII charset is used instead. The -@@ -4145,7 +4148,7 @@ - the type even if the terminal supports a hardstatus line. - - The third form specifies the contents of the hardstatus line. --@code{%h} is used as default string, i.e. the stored hardstatus of the -+@code{%h} is used as default string, i.e., the stored hardstatus of the - current window (settable via @samp{ESC]0;^G} or @samp{ESC_\\}) is - displayed. - You can customize this to any string you like including -@@ -4217,7 +4220,7 @@ - @deffn Command hardcopydir directory - (none)@* - Defines a directory where hardcopy files will be placed. --If unset hardcopys are dumped in screen's current working -+If unset, hardcopys are dumped in screen's current working - directory. - @end deffn - -@@ -4247,7 +4250,7 @@ - @deffn Command logfile filename - @deffnx Command logfile flush secs - (none)@* --Defines the name the logfiles will get. The default is @samp{screenlog.%n}. -+Defines the name the log files will get. The default is @samp{screenlog.%n}. - The second form changes the number of seconds @code{screen} - will wait before flushing the logfile buffer to the file-system. The - default value is 10 seconds. -@@ -4407,7 +4410,7 @@ - session for the duration of the break, but it may be the only way to - generate long breaks. @code{tcsendbreak} and @code{TIOCSBRK} may or may not - produce long breaks with spikes (e.g. 4 per second). This is not only system --dependant, this also differs between serial board drivers. -+dependent, this also differs between serial board drivers. - Calling @code{defbreaktype} with no parameter displays the current setting. - @end deffn - -@@ -4530,7 +4533,7 @@ - - @node Zombie, Printcmd, Version, Miscellaneous - @section Zombie --@deffn Command zombie [@var{keys}] -+@deffn Command zombie [@var{keys} [onerror] ] - @deffnx Command defzombie [@var{keys}] - (none)@* - Per default windows are removed from the window list as soon as the -@@ -4546,6 +4549,11 @@ - As the zombie setting is affected globally for all windows, this command - should only be called @code{defzombie}. Until we need this as a per window - setting, the commands @code{zombie} and @code{defzombie} are synonymous. -+ -+Optionally you can put the word @code{onerror} after the keys. This will -+cause screen to monitor exit status of the process running in the window. -+If it exits normally ('0'), the window disappears. Any other exit value -+causes the window to become a zombie. - @end deffn - - @node Printcmd, Sorendition, Zombie, Miscellaneous -@@ -4759,7 +4767,7 @@ - @item u - all other users on this window - @item w --all window numbers and names. With @code{-} quailifier: up to the current -+all window numbers and names. With @code{-} qualifier: up to the current - window; with @code{+} qualifier: starting with the window after the current - one. - @item W -@@ -4811,7 +4819,7 @@ - color settings. Its format - is @samp{[attribute modifier] [color description]}. The attribute modifier - must be prefixed by a change type indicator if it can be confused with --a color desciption. The following change types are known: -+a color description. The following change types are known: - @table @code - @item + - add the specified set to the current attributes -@@ -4868,10 +4876,10 @@ - unchanged. - - A one digit/letter color description is treated as foreground or --background color dependant on the current attributes: if reverse mode is -+background color dependent on the current attributes: if reverse mode is - set, the background color is changed instead of the foreground color. - If you don't like this, prefix the color with a @samp{.}. If you want --the same behaviour for two-letter color descriptions, also prefix them -+the same behavior for two-letter color descriptions, also prefix them - with a @samp{.}. - - As a special case, @samp{%@{-@}} restores the attributes and colors that -@@ -5069,7 +5077,7 @@ - @menu - * Known Bugs:: Problems we know about. - * Reporting Bugs:: How to contact the maintainers. --* Availability:: Where to find the lastest screen version. -+* Availability:: Where to find the latest screen version. - @end menu - - @node Known Bugs, Reporting Bugs, , Bugs -diff -Naur screen-4.0.3.orig/encoding.c screen-4.0.3/encoding.c ---- screen-4.0.3.orig/encoding.c 2006-10-23 14:58:14.000000000 +0200 -+++ screen-4.0.3/encoding.c 2008-06-01 23:39:31.000000000 +0200 -@@ -997,7 +997,7 @@ - if (c1 >= 0xd800 && c1 < 0xe000) - comb_tofront(root, c1 - 0xd800); - i = combchars[root]->prev; -- if (c1 == i + 0xd800) -+ if (c1 == i + 0xd800) - { - /* completely full, can't recycle */ - debug("utf8_handle_comp: completely full!\n"); -@@ -1159,6 +1159,8 @@ - *statep = c; - return -1; - } -+ if (c < 0x80) -+ return c; - return c | (KANA << 16); - } - t = c; -@@ -1166,11 +1168,16 @@ - *statep = 0; - if (0x40 <= t && t <= 0xfc && t != 0x7f) - { -- if (c <= 0x9f) c = (c - 0x81) * 2 + 0x21; -- else c = (c - 0xc1) * 2 + 0x21; -- if (t <= 0x7e) t -= 0x1f; -- else if (t <= 0x9e) t -= 0x20; -- else t -= 0x7e, c++; -+ if (c <= 0x9f) -+ c = (c - 0x81) * 2 + 0x21; -+ else -+ c = (c - 0xc1) * 2 + 0x21; -+ if (t <= 0x7e) -+ t -= 0x1f; -+ else if (t <= 0x9e) -+ t -= 0x20; -+ else -+ t -= 0x7e, c++; - return (c << 8) | t | (KANJI << 16); - } - return t; -diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h ---- screen-4.0.3.orig/extern.h 2003-08-22 14:27:57.000000000 +0200 -+++ screen-4.0.3/extern.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: extern.h,v 1.18 1994/05/31 12:31:57 mlschroe Exp $ FAU -+ * $Id: extern.h,v 1.33 2007/02/06 20:44:37 mls Exp $ FAU - */ - - #if !defined(__GNUC__) || __GNUC__ < 2 -@@ -45,8 +45,8 @@ - extern void MakeNewEnv __P((void)); - extern char *MakeWinMsg __P((char *, struct win *, int)); - extern char *MakeWinMsgEv __P((char *, struct win *, int, int, struct event *, int)); --extern int PutWinMsg __P((char *, int, int)); --extern void WindowDied __P((struct win *)); -+extern void PutWinMsg __P((char *, int, int)); -+extern void WindowDied __P((struct win *, int, int)); - extern void setbacktick __P((int, int, int, char **)); - - /* ansi.c */ -@@ -65,7 +65,7 @@ - extern int MFindUsedLine __P((struct win *, int, int)); - - /* fileio.c */ --extern void StartRc __P((char *)); -+extern int StartRc __P((char *, int)); - extern void FinishRc __P((char *)); - extern void RcLine __P((char *, int)); - extern FILE *secfopen __P((char *, char *)); -@@ -113,7 +113,7 @@ - - /* input.c */ - extern void inp_setprompt __P((char *, char *)); --extern void Input __P((char *, int, int, void (*)(char *, int, char *), char *)); -+extern void Input __P((char *, int, int, void (*)(char *, int, char *), char *, int)); - extern int InInput __P((void)); - - /* help.c */ -@@ -122,7 +122,7 @@ - extern void display_copyright __P((void)); - extern void display_displays __P((void)); - extern void display_bindkey __P((char *, struct action *)); --extern void display_wlist __P((int, int)); -+extern void display_wlist __P((int, int, struct win *)); - extern int InWList __P((void)); - extern void WListUpdatecv __P((struct canvas *, struct win *)); - extern void WListLinkChanged __P((void)); -@@ -289,7 +289,7 @@ - #endif - extern void SetCanvasWindow __P((struct canvas *, struct win *)); - extern int MakeDefaultCanvas __P((void)); --extern int AddCanvas __P((void)); -+extern int AddCanvas __P((int)); - extern void RemCanvas __P((void)); - extern void OneCanvas __P((void)); - extern int RethinkDisplayViewports __P((void)); -@@ -335,6 +335,7 @@ - extern void ReceiveMsg __P((void)); - extern void SendCreateMsg __P((char *, struct NewWindow *)); - extern int SendErrorMsg __P((char *, char *)); -+extern int SendAttachMsg __P((int, struct msg *, int)); - - /* misc.c */ - extern char *SaveStr __P((const char *)); -diff -Naur screen-4.0.3.orig/fileio.c screen-4.0.3/fileio.c ---- screen-4.0.3.orig/fileio.c 2003-09-08 16:25:28.000000000 +0200 -+++ screen-4.0.3/fileio.c 2008-06-01 23:39:31.000000000 +0200 -@@ -128,9 +128,10 @@ - * 1) rcfilename = "/etc/screenrc" - * 2) rcfilename = RcFileName - */ --void --StartRc(rcfilename) -+int -+StartRc(rcfilename, nopanic) - char *rcfilename; -+int nopanic; - { - register int argc, len; - register char *p, *cp; -@@ -159,13 +160,13 @@ - * the file. - */ - debug3("StartRc: '%s','%s', '%s'\n", RcFileName, rc_name, rcfilename); -- Panic(0, "Unable to open \"%s\".", rc_name); -- /* NOTREACHED */ -+ if (!nopanic) Panic(0, "Unable to open \"%s\".", rc_name); -+ /* possibly NOTREACHED */ - } - debug1("StartRc: '%s' no good. ignored\n", rc_name); - Free(rc_name); - rc_name = oldrc_name; -- return; -+ return 1; - } - while (fgets(buf, sizeof buf, fp) != NULL) - { -@@ -238,7 +239,7 @@ - if (rc_recursion <= 10) - { - rc_recursion++; -- StartRc(args[1]); -+ (void)StartRc(args[1], 0); - rc_recursion--; - } - } -@@ -246,6 +247,7 @@ - fclose(fp); - Free(rc_name); - rc_name = oldrc_name; -+ return 0; - } - - void -@@ -779,7 +781,7 @@ - #ifdef SIGPIPE - signal(SIGPIPE, SIG_DFL); - #endif -- execl("/bin/sh", "sh", "-c", cmd, 0); -+ execl("/bin/sh", "sh", "-c", cmd, (char *)0); - Panic(errno, "/bin/sh"); - default: - break; -diff -Naur screen-4.0.3.orig/help.c screen-4.0.3/help.c ---- screen-4.0.3.orig/help.c 2003-09-08 16:25:33.000000000 +0200 -+++ screen-4.0.3/help.c 2008-06-01 23:39:31.000000000 +0200 -@@ -37,6 +37,9 @@ - extern struct mchar mchar_blank, mchar_so; - extern unsigned char *blank; - extern struct win *wtab[]; -+#ifdef MAPKEYS -+extern struct term term[]; -+#endif - - static void PadStr __P((char *, int, int, int)); - -@@ -161,7 +164,7 @@ - used[n] = 0; - mcom = 0; - mkey = 0; -- for (key = 0; key < 256; key++) -+ for (key = 0; key < 256 + KMAP_KEYS; key++) - { - n = ktabp[key].nr; - if (n == RC_ILLEGAL) -@@ -314,7 +317,7 @@ - x += helpdata->inter - !col; - n = helpdata->nact[n]; - buf[0] = '\0'; -- for (key = 0; key < 256; key++) -+ for (key = 0; key < 256 + KMAP_KEYS; key++) - if (ktabp[key].nr == n && ktabp[key].args == noargs && strlen(buf) < sizeof(buf) - 7) - { - strcat(buf, " "); -@@ -333,13 +336,13 @@ - while ((n = ktabp[helpdata->command_search].nr) == RC_ILLEGAL - || ktabp[helpdata->command_search].args == noargs) - { -- if (++helpdata->command_search >= 256) -+ if (++helpdata->command_search >= 256 + KMAP_KEYS) - return -1; - } - buf[0] = '\0'; - add_key_to_buf(buf, helpdata->command_search); -- PadStr(buf, 4, 0, crow); -- AddAction(&ktabp[helpdata->command_search++], 4, crow); -+ PadStr(buf, 5, 0, crow); -+ AddAction(&ktabp[helpdata->command_search++], 5, crow); - helpdata->grow++; - } - else -@@ -425,6 +428,17 @@ - strcpy(buf, "unset"); - else if (key == ' ') - strcpy(buf, "sp"); -+#ifdef MAPKEYS -+ else if (key >= 256) -+ { -+ key = key - 256 + T_CAPS; -+ buf[0] = ':'; -+ buf[1] = term[key].tcname[0]; -+ buf[2] = term[key].tcname[1]; -+ buf[3] = ':'; -+ buf[4] = 0; -+ } -+#endif - else - buf[AddXChar(buf, key)] = 0; - } -@@ -865,6 +879,7 @@ - int last; - int start; - int order; -+ struct win *group; - }; - - static struct LayFuncs WListLf = -@@ -878,6 +893,8 @@ - DefRestore - }; - -+#define WTAB_GROUP_MATCHES(i) (group == wtab[i]->w_group) -+ - static int - WListResize(wi, he) - int wi, he; -@@ -904,9 +921,11 @@ - struct wlistdata *wlistdata; - struct display *olddisplay = display; - int h; -+ struct win *group; - - ASSERT(flayer); - wlistdata = (struct wlistdata *)flayer->l_data; -+ group = wlistdata->group; - h = wlistdata->numwin; - while (!done && *plen > 0) - { -@@ -914,7 +933,7 @@ - { - int n = (unsigned char)**ppbuf - '0'; - int d = 0; -- if (n < MAXWIN && wtab[n]) -+ if (n < MAXWIN && wtab[n] && WTAB_GROUP_MATCHES(n)) - { - int i; - for (d = -wlistdata->npos, i = WListNext(wlistdata, -1, 0); i != n; i = WListNext(wlistdata, i, 1), d++) -@@ -960,7 +979,7 @@ - case ' ': - done = 1; - h = wlistdata->pos; -- if (!display || !wtab[h] || wtab[h] == D_fore || (flayer->l_cvlist && flayer->l_cvlist->c_lnext)) -+ if (!display || h == MAXWIN || !wtab[h] || wtab[h] == D_fore || (flayer->l_cvlist && flayer->l_cvlist->c_lnext)) - HelpAbort(); - #ifdef MULTIUSER - else if (AclCheckPermWin(D_user, ACL_READ, wtab[h])) -@@ -970,7 +989,8 @@ - ExitOverlayPage(); /* no need to redisplay */ - /* restore display, don't switch wrong user */ - display = olddisplay; -- SwitchWindow(h); -+ if (h != MAXWIN) -+ SwitchWindow(h); - break; - case 0033: - case 0007: -@@ -1003,29 +1023,37 @@ - { - char *str; - int n; -+ int yoff; -+ struct wlistdata *wlistdata; - -- display = 0; -+ if (i == MAXWIN) -+ return; -+ wlistdata = (struct wlistdata *)flayer->l_data; -+ yoff = wlistdata->group ? 3 : 2; -+ display = Layer2Window(flayer) ? 0 : flayer->l_cvlist ? flayer->l_cvlist->c_display : 0; - str = MakeWinMsgEv(wliststr, wtab[i], '%', flayer->l_width, (struct event *)0, 0); - n = strlen(str); - if (i != pos && isblank) - while (n && str[n - 1] == ' ') - n--; -- LPutWinMsg(flayer, str, (i == pos || !isblank) ? flayer->l_width : n, i == pos ? &mchar_so : &mchar_blank, 0, y + 2); -+ LPutWinMsg(flayer, str, (i == pos || !isblank) ? flayer->l_width : n, i == pos ? &mchar_so : &mchar_blank, 0, y + yoff); - #if 0 -- LPutStr(flayer, str, n, i == pos ? &mchar_so : &mchar_blank, 0, y + 2); -+ LPutStr(flayer, str, n, i == pos ? &mchar_so : &mchar_blank, 0, y + yoff); - if (i == pos || !isblank) - while(n < flayer->l_width) -- LPutChar(flayer, i == pos ? &mchar_so : &mchar_blank, n++, y + 2); -+ LPutChar(flayer, i == pos ? &mchar_so : &mchar_blank, n++, y + yoff); - #endif - return; - } - -+ - static int - WListNext(wlistdata, old, delta) - struct wlistdata *wlistdata; - int old, delta; - { - int i, j; -+ struct win *group = wlistdata->group; - - if (old == MAXWIN) - return MAXWIN; -@@ -1034,22 +1062,22 @@ - if (old == -1) - { - for (old = 0; old < MAXWIN; old++) -- if (wtab[old]) -+ if (wtab[old] && WTAB_GROUP_MATCHES(old)) - break; - if (old == MAXWIN) - return old; - } -- if (!wtab[old]) -+ if (!wtab[old] || !WTAB_GROUP_MATCHES(old)) - return MAXWIN; - i = old; - while (delta > 0 && i < MAXWIN - 1) -- if (wtab[++i]) -+ if (wtab[++i] && WTAB_GROUP_MATCHES(i)) - { - old = i; - delta--; - } - while (delta < 0 && i > 0) -- if (wtab[--i]) -+ if (wtab[--i] && WTAB_GROUP_MATCHES(i)) - { - old = i; - delta++; -@@ -1186,14 +1214,15 @@ - } - - void --display_wlist(onblank, order) -+display_wlist(onblank, order, group) - int onblank; - int order; -+struct win *group; - { - struct win *p; - struct wlistdata *wlistdata; - -- if (flayer->l_width < 10 || flayer->l_height < 5) -+ if (flayer->l_width < 10 || flayer->l_height < 6) - { - LMsg(0, "Window size too small for window list page"); - return; -@@ -1207,17 +1236,26 @@ - return; - } - p = D_fore; -- SetForeWindow((struct win *)0); -- Activate(0); -- if (flayer->l_width < 10 || flayer->l_height < 5) -+ if (p) -+ { -+ SetForeWindow((struct win *)0); -+ if (p->w_group) -+ { -+ D_fore = p->w_group; -+ flayer->l_data = (char *)p->w_group; -+ } -+ Activate(0); -+ } -+ if (flayer->l_width < 10 || flayer->l_height < 6) - { - LMsg(0, "Window size too small for window list page"); - return; - } -- debug3("flayer %x %d %x\n", flayer, flayer->l_width, flayer->l_height); - } - else - p = Layer2Window(flayer); -+ if (!group && p) -+ group = p->w_group; - if (InitOverlayPage(sizeof(*wlistdata), &WListLf, 0)) - return; - wlistdata = (struct wlistdata *)flayer->l_data; -@@ -1225,9 +1263,10 @@ - flayer->l_y = flayer->l_height - 1; - wlistdata->start = onblank && p ? p->w_number : -1; - wlistdata->order = order; -+ wlistdata->group = group; - wlistdata->pos = p ? p->w_number : WListNext(wlistdata, -1, 0); - wlistdata->ypos = wlistdata->npos = 0; -- wlistdata->numwin= flayer->l_height - 3; -+ wlistdata->numwin= flayer->l_height - (group ? 4 : 3); - wlistpage(); - } - -@@ -1237,35 +1276,49 @@ - struct wlistdata *wlistdata; - char *str; - int pos; -+ struct win *group; - - wlistdata = (struct wlistdata *)flayer->l_data; -+ group = wlistdata->group; - - LClearAll(flayer, 0); - if (wlistdata->start >= 0 && wtab[wlistdata->start] == 0) - wlistdata->start = -2; - - pos = wlistdata->pos; -- if (wtab[pos] == 0) -+ if (pos == MAXWIN || !wtab[pos] || !WTAB_GROUP_MATCHES(pos)) - { - if (wlistdata->order == WLIST_MRU) - pos = WListNext(wlistdata, -1, wlistdata->npos); - else - { - /* find new position */ -- while(++pos < MAXWIN) -- if (wtab[pos]) -- break; -+ if (pos < MAXWIN) -+ while(++pos < MAXWIN) -+ if (wtab[pos] && WTAB_GROUP_MATCHES(pos)) -+ break; - if (pos == MAXWIN) -- while (--pos > 0) -- if (wtab[pos]) -+ while (--pos >= 0) -+ if (wtab[pos] && WTAB_GROUP_MATCHES(pos)) - break; -+ if (pos == -1) -+ pos == MAXWIN; - } - } - wlistdata->pos = pos; - - display = 0; - str = MakeWinMsgEv(wlisttit, (struct win *)0, '%', flayer->l_width, (struct event *)0, 0); -- LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 0); -+ if (wlistdata->group) -+ { -+ LPutWinMsg(flayer, "Group: ", 7, &mchar_blank, 0, 0); -+ LPutWinMsg(flayer, wlistdata->group->w_title, strlen(wlistdata->group->w_title), &mchar_blank, 7, 0); -+ LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 1); -+ } -+ else -+ { -+ LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 0); -+ } - WListNormalize(); - WListLines(wlistdata->numwin, -1); - LaySetCursor(); -@@ -1320,7 +1373,7 @@ - for (display = displays; display; display = display->d_next) - for (cv = D_cvlist; cv; cv = cv->c_next) - { -- if (cv->c_layer->l_layfn != &WListLf) -+ if (!cv->c_layer || cv->c_layer->l_layfn != &WListLf) - continue; - wlistdata = (struct wlistdata *)cv->c_layer->l_data; - if (wlistdata->order != WLIST_MRU) -@@ -1347,8 +1400,6 @@ - */ - - #ifdef MAPKEYS -- --extern struct term term[]; - extern struct kmap_ext *kmap_exts; - extern int kmap_extn; - extern struct action dmtab[]; -diff -Naur screen-4.0.3.orig/image.h screen-4.0.3/image.h ---- screen-4.0.3.orig/image.h 2003-12-05 14:45:41.000000000 +0100 -+++ screen-4.0.3/image.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: image.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU -+ * $Id: image.h,v 1.17 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - -diff -Naur screen-4.0.3.orig/input.c screen-4.0.3/input.c ---- screen-4.0.3.orig/input.c 2003-09-08 16:25:37.000000000 +0200 -+++ screen-4.0.3/input.c 2008-06-01 23:39:31.000000000 +0200 -@@ -55,6 +55,7 @@ - int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */ - void (*inpfinfunc) __P((char *buf, int len, char *priv)); - char *priv; /* private data for finfunc */ -+ int privdata; /* private data space */ - }; - - static struct LayFuncs InpLf = -@@ -93,6 +94,8 @@ - inpdata->inp.pos = inpdata->inp.len = strlen(inpdata->inp.buf); - } - InpRedisplayLine(INPUTLINE, 0, flayer->l_width - 1, 0); -+ flayer->l_x = inpdata->inpstringlen + (inpdata->inpmode & INP_NOECHO ? 0 : inpdata->inp.pos); -+ flayer->l_y = INPUTLINE; - } - - /* -@@ -106,12 +109,13 @@ - * INP_EVERY == digraph mode. - */ - void --Input(istr, len, mode, finfunc, data) -+Input(istr, len, mode, finfunc, priv, data) - char *istr; - int len; - int mode; --void (*finfunc) __P((char *buf, int len, char *data)); --char *data; -+void (*finfunc) __P((char *buf, int len, char *priv)); -+char *priv; -+int data; - { - int maxlen; - struct inpdata *inpdata; -@@ -136,10 +140,14 @@ - inpdata->inpfinfunc = finfunc; - inpdata->inp.pos = inpdata->inp.len = 0; - inpdata->inpmode = mode; -- inpdata->priv = data; -- inp_setprompt(istr, (char *)NULL); -- flayer->l_x = inpdata->inpstringlen; -- flayer->l_y = INPUTLINE; -+ inpdata->privdata = data; -+ if (!priv) -+ priv = &inpdata->privdata; -+ inpdata->priv = priv; -+ inpdata->inpstringlen = 0; -+ inpdata->inpstring = NULL; -+ if (istr) -+ inp_setprompt(istr, (char *)NULL); - } - - static void -@@ -174,10 +182,12 @@ - if (inpdata->inpmode & INP_EVERY) - { - inpdata->inp.buf[inpdata->inp.len] = ch; -- inpdata->inp.buf[inpdata->inp.len + 1] = ch; /* gross */ -- display = inpdisplay; -- (*inpdata->inpfinfunc)(inpdata->inp.buf, inpdata->inp.len, inpdata->priv); -- ch = inpdata->inp.buf[inpdata->inp.len]; -+ if (ch) -+ { -+ display = inpdisplay; -+ (*inpdata->inpfinfunc)(inpdata->inp.buf, inpdata->inp.len, inpdata->priv); -+ ch = inpdata->inp.buf[inpdata->inp.len]; -+ } - } - else if (inpdata->inpmode & INP_RAW) - { -@@ -313,7 +323,7 @@ - if (inpdata->inp.len && inpdata->inpmode == 0) - inphist = inpdata->inp; /* structure copy */ - -- flayer->l_data = 0; -+ flayer->l_data = 0; /* so inpdata does not get freed */ - InpAbort(); /* redisplays... */ - *ppbuf = pbuf; - *plen = len; -diff -Naur screen-4.0.3.orig/layer.c screen-4.0.3/layer.c ---- screen-4.0.3.orig/layer.c 2003-09-08 16:25:46.000000000 +0200 -+++ screen-4.0.3/layer.c 2008-06-01 23:39:31.000000000 +0200 -@@ -436,17 +436,8 @@ - len2 = xe2 - (x + vp->v_xoff) + 1; - if (len2 > len) - len2 = len; -- if (!PutWinMsg(s, xs2 - x - vp->v_xoff, len2)) -- { -- s2 = s + xs2 - x - vp->v_xoff; -- while (len2-- > 0) -- { -- PUTCHARLP(*s2++); -- xs2++; -- } -- } -- else -- xs2 = x + vp->v_xoff + len2; -+ PutWinMsg(s, xs2 - x - vp->v_xoff, len2); -+ xs2 = x + vp->v_xoff + len2; - if (xs2 < vp->v_xs) - xs2 = vp->v_xs; - or = D_rend; -@@ -849,9 +840,6 @@ - } - } - -- --/*******************************************************************/ -- - void - LClearAll(l, uself) - struct layer *l; -@@ -880,6 +868,53 @@ - flayer = oldflayer; - } - -+void -+/*VARARGS2*/ -+#if defined(USEVARARGS) && defined(__STDC__) -+LMsg(int err, char *fmt, VA_DOTS) -+#else -+LMsg(err, fmt, VA_DOTS) -+int err; -+char *fmt; -+VA_DECL -+#endif -+{ -+ VA_LIST(ap) -+ char buf[MAXPATHLEN*2]; -+ char *p = buf; -+ struct canvas *cv; -+ -+ VA_START(ap, fmt); -+ fmt = DoNLS(fmt); -+ (void)vsnprintf(p, sizeof(buf) - 100, fmt, VA_ARGS(ap)); -+ VA_END(ap); -+ if (err) -+ { -+ p += strlen(p); -+ *p++ = ':'; -+ *p++ = ' '; -+ strncpy(p, strerror(err), buf + sizeof(buf) - p - 1); -+ buf[sizeof(buf) - 1] = 0; -+ } -+ debug2("LMsg('%s') (%#x);\n", buf, (unsigned int)flayer); -+ for (display = displays; display; display = display->d_next) -+ { -+ for (cv = D_cvlist; cv; cv = cv->c_next) -+ if (cv->c_layer == flayer) -+ break; -+ if (cv == 0) -+ continue; -+ MakeStatus(buf); -+ } -+} -+ -+ -+/*******************************************************************/ -+/*******************************************************************/ -+ -+/* -+ * Layer creation / removal -+ */ - - void - KillLayerChain(lay) -@@ -911,12 +946,6 @@ - } - - --/*******************************************************************/ --/*******************************************************************/ -- --/* -- * Layer creation / removal -- */ - - int - InitOverlayPage(datasize, lf, block) -@@ -1009,6 +1038,8 @@ - return 0; - } - -+extern struct layout *layouts; -+ - void - ExitOverlayPage() - { -@@ -1016,6 +1047,7 @@ - struct win *p; - int doredisplay = 0; - struct canvas *cv, *ocv; -+ struct layout *lay; - - ASSERT(flayer); - debug1("Exiting layer %#x\n", (unsigned int)flayer); -@@ -1050,6 +1082,11 @@ - p->w_paster.pa_pastelayer = 0; - #endif - -+ for (lay = layouts; lay; lay = lay->lay_next) -+ for (cv = lay->lay_cvlist; cv; cv = cv->c_next) -+ if (cv->c_layer == oldlay) -+ cv->c_layer = flayer; -+ - /* add all canvases back into next layer's canvas list */ - for (ocv = 0, cv = oldlay->l_cvlist; cv; cv = cv->c_lnext) - { -@@ -1071,44 +1108,3 @@ - LayRestore(); - LaySetCursor(); - } -- --void --/*VARARGS2*/ --#if defined(USEVARARGS) && defined(__STDC__) --LMsg(int err, char *fmt, VA_DOTS) --#else --LMsg(err, fmt, VA_DOTS) --int err; --char *fmt; --VA_DECL --#endif --{ -- VA_LIST(ap) -- char buf[MAXPATHLEN*2]; -- char *p = buf; -- struct canvas *cv; -- -- VA_START(ap, fmt); -- fmt = DoNLS(fmt); -- (void)vsnprintf(p, sizeof(buf) - 100, fmt, VA_ARGS(ap)); -- VA_END(ap); -- if (err) -- { -- p += strlen(p); -- *p++ = ':'; -- *p++ = ' '; -- strncpy(p, strerror(err), buf + sizeof(buf) - p - 1); -- buf[sizeof(buf) - 1] = 0; -- } -- debug2("LMsg('%s') (%#x);\n", buf, (unsigned int)flayer); -- for (display = displays; display; display = display->d_next) -- { -- for (cv = D_cvlist; cv; cv = cv->c_next) -- if (cv->c_layer == flayer) -- break; -- if (cv == 0) -- continue; -- MakeStatus(buf); -- } --} -- -diff -Naur screen-4.0.3.orig/layer.h screen-4.0.3/layer.h ---- screen-4.0.3.orig/layer.h 2002-01-08 16:42:25.000000000 +0100 -+++ screen-4.0.3/layer.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: overlay.h,v 1.3 1994/05/31 12:32:31 mlschroe Exp $ FAU -+ * $Id: layer.h,v 1.12 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - /* -diff -Naur screen-4.0.3.orig/logfile.h screen-4.0.3/logfile.h ---- screen-4.0.3.orig/logfile.h 2002-01-08 16:42:27.000000000 +0100 -+++ screen-4.0.3/logfile.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: logfile.h,v 1.11 1994/05/31 12:33:27 jnweiger Exp $ FAU -+ * $Id: logfile.h,v 1.12 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - struct logfile -diff -Naur screen-4.0.3.orig/mark.h screen-4.0.3/mark.h ---- screen-4.0.3.orig/mark.h 2002-01-08 16:42:30.000000000 +0100 -+++ screen-4.0.3/mark.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: mark.h,v 1.1.1.1 1993/06/16 23:51:13 jnweiger Exp $ FAU -+ * $Id: mark.h,v 1.21 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - struct markdata -diff -Naur screen-4.0.3.orig/misc.c screen-4.0.3/misc.c ---- screen-4.0.3.orig/misc.c 2003-12-05 14:45:41.000000000 +0100 -+++ screen-4.0.3/misc.c 2008-06-01 23:39:31.000000000 +0200 -@@ -613,7 +613,7 @@ - */ - # endif /* NEEDSETENV */ - #else /* USESETENV */ --# if defined(linux) || defined(__convex__) || (BSD >= 199103) -+# if defined(linux) || defined(__convex__) || (BSD >= 199103) || defined(_AIX) || defined(__GLIBC__) - setenv(var, value, 1); - # else - setenv(var, value); -diff -Naur screen-4.0.3.orig/os.h screen-4.0.3/os.h ---- screen-4.0.3.orig/os.h 2002-01-08 16:42:33.000000000 +0100 -+++ screen-4.0.3/os.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: os.h,v 1.10 1994/05/31 12:32:22 mlschroe Exp $ FAU -+ * $Id: os.h,v 1.22 2005/12/19 16:13:08 jnweiger Exp $ FAU - */ - - #include -@@ -156,12 +156,12 @@ - # endif - #endif - --#ifdef hpux -+#if defined(HAVE_SETRESUID) && !defined(HAVE_SETREUID) - # define setreuid(ruid, euid) setresuid(ruid, euid, -1) - # define setregid(rgid, egid) setresgid(rgid, egid, -1) - #endif - --#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) -+#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID) - # define USE_SETEUID - #endif - -diff -Naur screen-4.0.3.orig/osdef.h.in screen-4.0.3/osdef.h.in ---- screen-4.0.3.orig/osdef.h.in 2001-04-28 15:26:43.000000000 +0200 -+++ screen-4.0.3/osdef.h.in 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: osdef.h.in,v 1.2 1994/05/31 12:32:25 mlschroe Exp $ FAU -+ * $Id: osdef.h.in,v 1.20 2005/12/19 16:13:08 jnweiger Exp $ FAU - */ - - /**************************************************************** -@@ -82,14 +82,13 @@ - - extern int getdtablesize __P((void)); - --#ifdef HAVE_SETREUID --# ifdef hpux -+#ifdef HAVE_SETRESUID - extern int setresuid __P((int, int, int)); - extern int setresgid __P((int, int, int)); --# else -+#endif -+#ifdef HAVE_SETREUID - extern int setreuid __P((int, int)); - extern int setregid __P((int, int)); --# endif - #endif - #ifdef HAVE_SETEUID - extern int seteuid __P((int)); -diff -Naur screen-4.0.3.orig/patchlevel.h screen-4.0.3/patchlevel.h ---- screen-4.0.3.orig/patchlevel.h 2006-10-23 15:04:11.000000000 +0200 -+++ screen-4.0.3/patchlevel.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: patchlevel.h,v 1.17 1994/05/31 12:32:35 mlschroe Exp $ FAU -+ * $Id: patchlevel.h,v 1.34 2006/05/02 12:58:25 mls Exp $ FAU - */ - - /**************************************************************** -@@ -519,14 +519,15 @@ - * 05.12.2003 4.00.02 fixed a bug in the ansi parser. fixed execs - * on ttys. fixed hardstatus line on blanked screen. - * -- DISTRIBUTED -- * 23.10.2006 4.00.03 fixed two bug in combining characters handling -- * (cstone & Rich Felker). -- * -- DISTRIBUTED -+ * 11.10.2004, 4.00.03jw handle StartRc errors nonfatal if due to a msg. -+ * 12.10.2004, 4.00.03jw1 let docu of 'split' 'focus' 'remove' and 'only' refer to each other. -+ * 01.11.2004, 4.00.03jw2 zombie command has new option 'onerror' -+ * 2005-12-19, 4.00.03jw3 syntax error. - */ - - #define ORIGIN "FAU" - #define REV 4 - #define VERS 0 - #define PATCHLEVEL 3 --#define DATE "23-Oct-06" --#define STATE "" -+#define DATE "2-May-06" -+#define STATE "jw4" -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2003-09-18 14:53:54.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:39:31.000000000 +0200 -@@ -59,6 +59,7 @@ - extern char SockPath[], *SockName; - extern int TtyMode, auto_detach, use_altscreen; - extern int iflag, maxwin; -+extern int focusminwidth, focusminheight; - extern int use_hardstatus, visual_bell; - #ifdef COLOR - extern int attr2color[][4]; -@@ -71,6 +72,7 @@ - extern int defnonblock; - extern int ZombieKey_destroy; - extern int ZombieKey_resurrect; -+extern int ZombieKey_onerror; - #ifdef AUTO_NUKE - extern int defautonuke; - #endif -@@ -145,15 +147,19 @@ - static void digraph_fn __P((char *, int, char *)); - static void confirm_fn __P((char *, int, char *)); - static int IsOnDisplay __P((struct win *)); --static void ResizeRegions __P((char*)); -+static void ResizeRegions __P((char *, int)); - static void ResizeFin __P((char *, int, char *)); - static struct action *FindKtab __P((char *, int)); -+static void SelectFin __P((char *, int, char *)); -+static void SelectLayoutFin __P((char *, int, char *)); - - - extern struct layer *flayer; - extern struct display *display, *displays; - extern struct win *fore, *console_window, *windows; - extern struct acluser *users; -+extern struct layout *layouts, *layout_attach, layout_last_marker; -+extern struct layout *laytab[]; - - extern char screenterm[], HostName[], version[]; - extern struct NewWindow nwin_undef, nwin_default; -@@ -197,11 +203,11 @@ - char **blankerprg; - #endif - --struct action ktab[256]; /* command key translation table */ -+struct action ktab[256 + KMAP_KEYS]; /* command key translation table */ - struct kclass { - struct kclass *next; - char *name; -- struct action ktab[256]; -+ struct action ktab[256 + KMAP_KEYS]; - }; - struct kclass *kclasses; - -@@ -390,6 +396,20 @@ - {'"', '~', 223} /* */ - }; - -+#define RESIZE_FLAG_H 1 -+#define RESIZE_FLAG_V 2 -+#define RESIZE_FLAG_L 4 -+ -+static char *resizeprompts[] = { -+ "resize # lines: ", -+ "resize -h # lines: ", -+ "resize -v # lines: ", -+ "resize -b # lines: ", -+ "resize -l # lines: ", -+ "resize -l -h # lines: ", -+ "resize -l -v # lines: ", -+ "resize -l -b # lines: ", -+}; - - char *noargs[1]; - -@@ -552,6 +572,18 @@ - ktab['X'].nr = RC_REMOVE; - ktab['F'].nr = RC_FIT; - ktab['\t'].nr = RC_FOCUS; -+ { -+ char *args[2]; -+ args[0] = "up"; -+ args[1] = 0; -+ SaveAction(ktab + T_BACKTAB - T_CAPS + 256, RC_FOCUS, args, 0); -+ } -+ { -+ char *args[2]; -+ args[0] = "-v"; -+ args[1] = 0; -+ SaveAction(ktab + '|', RC_SPLIT, args, 0); -+ } - /* These come last; they may want overwrite others: */ - if (DefaultEsc >= 0) - { -@@ -1174,9 +1206,9 @@ - if (key >= 0) - { - #ifdef PSEUDOS -- Input(fore->w_pwin ? "Really kill this filter [y/n]" : "Really kill this window [y/n]", 1, INP_RAW, confirm_fn, (char *)RC_KILL); -+ Input(fore->w_pwin ? "Really kill this filter [y/n]" : "Really kill this window [y/n]", 1, INP_RAW, confirm_fn, NULL, RC_KILL); - #else -- Input("Really kill this window [y/n]", 1, INP_RAW, confirm_fn, (char *)RC_KILL); -+ Input("Really kill this window [y/n]", 1, INP_RAW, confirm_fn, NULL, RC_KILL); - #endif - break; - } -@@ -1199,7 +1231,7 @@ - case RC_QUIT: - if (key >= 0) - { -- Input("Really quit and kill all your windows [y/n]", 1, INP_RAW, confirm_fn, (char *)RC_QUIT); -+ Input("Really quit and kill all your windows [y/n]", 1, INP_RAW, confirm_fn, NULL, RC_QUIT); - break; - } - Finit(0); -@@ -1218,7 +1250,7 @@ - static char buf[2]; - - buf[0] = key; -- Input(buf, 1, INP_RAW, pow_detach_fn, NULL); -+ Input(buf, 1, INP_RAW, pow_detach_fn, NULL, 0); - } - else - Detach(D_POWER); /* detach and kill Attacher's parent */ -@@ -1307,6 +1339,17 @@ - Msg(0, "%s:zombie: one or two characters expected.", rc_name); - break; - } -+ if (args[1]) -+ { -+ if (!strcmp(args[1], "onerror")) -+ { -+ ZombieKey_onerror = 1; -+ } else { -+ Msg(0, "usage: zombie [keys [onerror]]"); -+ break; -+ } -+ } else -+ ZombieKey_onerror = 0; - ZombieKey_destroy = args[0][0]; - ZombieKey_resurrect = *argl == 2 ? args[0][1] : 0; - } -@@ -1504,7 +1547,7 @@ - */ - if ((s = *args) == NULL) - { -- Input("Copy to register:", 1, INP_RAW, copy_reg_fn, NULL); -+ Input("Copy to register:", 1, INP_RAW, copy_reg_fn, NULL, 0); - break; - } - if (*argl != 1) -@@ -1602,7 +1645,7 @@ - case RC_PROCESS: - if ((s = *args) == NULL) - { -- Input("Process register:", 1, INP_RAW, process_fn, NULL); -+ Input("Process register:", 1, INP_RAW, process_fn, NULL, 0); - break; - } - if (*argl != 1) -@@ -1891,7 +1934,7 @@ - ChangeAKA(fore, *args, strlen(*args)); - break; - case RC_COLON: -- Input(":", 100, INP_COOKED, Colonfin, NULL); -+ Input(":", 100, INP_COOKED, Colonfin, NULL, 0); - if (*args && **args) - { - s = *args; -@@ -2027,15 +2070,15 @@ - #endif - case RC_WINDOWLIST: - if (!*args) -- display_wlist(0, WLIST_NUM); -+ display_wlist(0, WLIST_NUM, (char *)0); - else if (!strcmp(*args, "-m") && !args[1]) -- display_wlist(0, WLIST_MRU); -+ display_wlist(0, WLIST_MRU, (char *)0); - else if (!strcmp(*args, "-b") && !args[1]) -- display_wlist(1, WLIST_NUM); -+ display_wlist(1, WLIST_NUM, (char *)0); - else if (!strcmp(*args, "-b") && !strcmp(args[1], "-m") && !args[2]) -- display_wlist(1, WLIST_MRU); -+ display_wlist(1, WLIST_MRU, (char *)0); - else if (!strcmp(*args, "-m") && !strcmp(args[1], "-b") && !args[2]) -- display_wlist(1, WLIST_MRU); -+ display_wlist(1, WLIST_MRU, (char *)0); - else if (!strcmp(*args, "string")) - { - if (args[1]) -@@ -2118,7 +2161,7 @@ - */ - if ((s = *args) == NULL) - { -- Input("Paste from register:", 1, INP_RAW, ins_reg_fn, NULL); -+ Input("Paste from register:", 1, INP_RAW, ins_reg_fn, NULL, 0); - break; - } - if (args[1] == 0 && !fore) /* no window? */ -@@ -3004,28 +3047,59 @@ - Msg(0, "%s: password: window required", rc_name); - break; - } -- Input("New screen password:", 100, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users); -+ Input("New screen password:", 100, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users, 0); - } - break; - #endif /* PASSWORD */ - case RC_BIND: - { - struct action *ktabp = ktab; -+ int kflag = 0; - -- if (argc > 2 && !strcmp(*args, "-c")) -+ for (;;) - { -- ktabp = FindKtab(args[1], 1); -- if (ktabp == 0) -- break; -- args += 2; -- argl += 2; -+ if (argc > 2 && !strcmp(*args, "-c")) -+ { -+ ktabp = FindKtab(args[1], 1); -+ if (ktabp == 0) -+ break; -+ args += 2; -+ argl += 2; -+ argc -= 2; -+ } -+ else if (argc > 1 && !strcmp(*args, "-k")) -+ { -+ kflag = 1; -+ args++; -+ argl++; -+ argc--; -+ } -+ else -+ break; -+ } -+#ifdef MAPKEYS -+ if (kflag) -+ { -+ for (n = 0; n < KMAP_KEYS; n++) -+ if (strcmp(term[n + T_CAPS].tcname, *args) == 0) -+ break; -+ if (n == KMAP_KEYS) -+ { -+ Msg(0, "%s: bind: unknown key '%s'", rc_name, *args); -+ break; -+ } -+ n += 256; - } -+ else -+#endif - if (*argl != 1) - { - Msg(0, "%s: bind: character, ^x, or (octal) \\032 expected.", rc_name); - break; - } -- n = (unsigned char)args[0][0]; -+ else -+ n = (unsigned char)args[0][0]; -+ - if (args[1]) - { - if ((i = FindCommnr(args[1])) == RC_ILLEGAL) -@@ -3496,7 +3570,7 @@ - break; - - case RC_DIGRAPH: -- Input("Enter digraph: ", 10, INP_EVERY, digraph_fn, NULL); -+ Input("Enter digraph: ", 10, INP_EVERY, digraph_fn, NULL, 0); - if (*args && **args) - { - s = *args; -@@ -3649,7 +3723,11 @@ - break; - #endif /* MULTIUSER */ - case RC_SPLIT: -- AddCanvas(); -+ s = args[0]; -+ if (s && !strcmp(s, "-v")) -+ AddCanvas(SLICE_HORI); -+ else -+ AddCanvas(SLICE_VERT); - Activate(-1); - break; - case RC_REMOVE: -@@ -3692,6 +3770,14 @@ - Msg(0, "%s: usage: focus [up|down|top|bottom]", rc_name); - break; - } -+ if ((focusminwidth && (focusminwidth < 0 || D_forecv->c_xe - D_forecv->c_xs + 1 < focusminwidth)) || -+ (focusminheight && (focusminheight < 0 || D_forecv->c_ye - D_forecv->c_ys + 1 < focusminheight))) -+ { -+ ResizeCanvas(&D_canvas); -+ RecreateCanvasChain(); -+ RethinkDisplayViewports(); -+ ResizeLayersToCanvases(); /* redisplays */ -+ } - fore = D_fore = Layer2Window(D_forecv->c_layer); - flayer = D_forecv->c_layer; - #ifdef RXVT_OSC -@@ -3710,22 +3796,49 @@ - WindowChanged(0, 'F'); - break; - case RC_RESIZE: -+ i = 0; -+ if (D_forecv->c_slorient == SLICE_UNKN) -+ { -+ Msg(0, "resize: need more than one region"); -+ break; -+ } -+ for (; *args; args++) -+ { -+ if (!strcmp(*args, "-h")) -+ i |= RESIZE_FLAG_H; -+ else if (!strcmp(*args, "-v")) -+ i |= RESIZE_FLAG_V; -+ else if (!strcmp(*args, "-b")) -+ i |= RESIZE_FLAG_H | RESIZE_FLAG_V; -+ else if (!strcmp(*args, "-p")) -+ i |= D_forecv->c_slorient == SLICE_VERT ? RESIZE_FLAG_H : RESIZE_FLAG_V; -+ else if (!strcmp(*args, "-l")) -+ i |= RESIZE_FLAG_L; -+ else -+ break; -+ } -+ if (*args && args[1]) -+ { -+ Msg(0, "%s: usage: resize [-h] [-v] [-l] [num]\n", rc_name); -+ break; -+ } - if (*args) -- ResizeRegions(*args); -+ ResizeRegions(*args, 0); - else -- Input("resize # lines: ", 20, INP_COOKED, ResizeFin, (char*)0); -+ Input(resizeprompts[i], 20, INP_EVERY, ResizeFin, (char*)0, i); - break; - case RC_SETSID: - (void)ParseSwitch(act, &separate_sids); - break; - case RC_EVAL: -- for (; *args; args++) -+ args = SaveArgs(args); -+ for (i = 0; args[i]; i++) - { -- char *ss = SaveStr(*args); -- if (*ss) -- Colonfin(ss, strlen(ss), (char *)0); -- free(ss); -+ if (args[i][0]) -+ Colonfin(args[i], strlen(args[i]), (char *)0); -+ free(args[i]); - } -+ free(args); - break; - case RC_ALTSCREEN: - (void)ParseSwitch(act, &use_altscreen); -@@ -3821,6 +3934,223 @@ - Msg(0, "idle off"); - } - break; -+ case RC_FOCUSMINSIZE: -+ for (i = 0; i < 2 && args[i]; i++) -+ { -+ if (!strcmp(args[i], "max") || !strcmp(args[i], "_")) -+ n = -1; -+ else -+ n = atoi(args[i]); -+ if (i == 0) -+ focusminwidth = n; -+ else -+ focusminheight = n; -+ } -+ if (msgok) -+ { -+ char b[2][20]; -+ for (i = 0; i < 2; i++) -+ { -+ n = i == 0 ? focusminwidth : focusminheight; -+ if (n == -1) -+ strcpy(b[i], "max"); -+ else -+ sprintf(b[i], "%d", n); -+ } -+ Msg(0, "focus min size is %s %s\n", b[0], b[1]); -+ } -+ break; -+ case RC_GROUP: -+ if (*args) -+ { -+ fore->w_group = 0; -+ if (args[0][0]) -+ { -+ fore->w_group = WindowByName(*args); -+ if (fore->w_group && fore->w_group != W_TYPE_GROUP) -+ fore->w_group = 0; -+ } -+ } -+ if (msgok) -+ { -+ if (fore->w_group) -+ Msg(0, "window group is %d (%s)\n", fore->w_group->w_number, fore->w_group->w_title); -+ else -+ Msg(0, "window belongs to no group"); -+ } -+ break; -+ case RC_LAYOUT: -+ if (!strcmp(args[0], "title")) -+ { -+ if (!D_layout) -+ { -+ Msg(0, "not on a layout"); -+ break; -+ } -+ if (!args[1]) -+ { -+ Msg(0, "current layout is %d (%s)", D_layout->lay_number, D_layout->lay_title); -+ break; -+ } -+ free(D_layout->lay_title); -+ D_layout->lay_title= SaveStr(args[1]); -+ } -+ else if (!strcmp(args[0], "number")) -+ { -+ int old; -+ struct layout *lay; -+ if (!args[1]) -+ { -+ Msg(0, "This is layout %d (%s).\n", D_layout->lay_number, D_layout->lay_title); -+ break; -+ } -+ old = D_layout->lay_number; -+ n = atoi(args[1]); -+ if (n < 0 || n >= MAXLAY) -+ break; -+ lay = laytab[n]; -+ laytab[n] = D_layout; -+ D_layout->lay_number = n; -+ laytab[old] = lay; -+ if (lay) -+ lay->lay_number = old; -+ break; -+ } -+ else if (!strcmp(args[0], "autosave")) -+ { -+ if (!D_layout) -+ { -+ Msg(0, "not on a layout"); -+ break; -+ } -+ if (args[1]) -+ { -+ if (!strcmp(args[1], "on")) -+ D_layout->lay_autosave = 1; -+ else if (!strcmp(args[1], "off")) -+ D_layout->lay_autosave = 0; -+ else -+ { -+ Msg(0, "invalid argument. Give 'on' or 'off"); -+ break; -+ } -+ } -+ if (msgok) -+ Msg(0, "autosave is %s", D_layout->lay_autosave ? "on" : "off"); -+ } -+ else if (!strcmp(args[0], "new")) -+ { -+ char *t = args[1]; -+ n = 0; -+ if (t) -+ { -+ while (*t >= '0' && *t <= '9') -+ t++; -+ if (t != args[1] && (!*t || *t == ':')) -+ { -+ n = atoi(args[1]); -+ if (*t) -+ t++; -+ } -+ else -+ t = args[1]; -+ } -+ if (!t || !*t) -+ t = "layout"; -+ NewLayout(t, n); -+ Activate(-1); -+ } -+ else if (!strcmp(args[0], "save")) -+ { -+ if (!args[1]) -+ { -+ Msg(0, "usage: layout save "); -+ break; -+ } -+ SaveLayout(args[1], &D_canvas); -+ } -+ else if (!strcmp(args[0], "select")) -+ { -+ struct layout *lay; -+ if (!args[1]) -+ { -+ Input("Switch to layout: ", 20, INP_COOKED, SelectLayoutFin, NULL, 0); -+ break; -+ } -+ SelectLayoutFin(args[1], strlen(args[1]), (char *)0); -+ } -+ else if (!strcmp(args[0], "next")) -+ { -+ struct layout *lay = D_layout; -+ if (lay) -+ lay = lay->lay_next ? lay->lay_next : layouts; -+ else -+ lay = layouts; -+ if (!lay) -+ { -+ Msg(0, "no layout defined"); -+ break; -+ } -+ if (lay == D_layout) -+ break; -+ LoadLayout(lay, &D_canvas); -+ Activate(-1); -+ } -+ else if (!strcmp(args[0], "prev")) -+ { -+ struct layout *lay = D_layout; -+ if (lay) -+ { -+ for (lay = layouts; lay->lay_next && lay->lay_next != D_layout; lay = lay->lay_next) -+ ; -+ } -+ else -+ lay = layouts; -+ if (!lay) -+ { -+ Msg(0, "no layout defined"); -+ break; -+ } -+ if (lay == D_layout) -+ break; -+ LoadLayout(lay, &D_canvas); -+ Activate(-1); -+ } -+ else if (!strcmp(args[0], "attach")) -+ { -+ if (!args[1]) -+ { -+ if (!layout_attach) -+ Msg(0, "no attach layout set"); -+ else if (layout_attach == &layout_last_marker) -+ Msg(0, "will attach to last layout"); -+ else -+ Msg(0, "will attach to layout %d (%s)", layout_attach->lay_number, layout_attach->lay_title); -+ break; -+ } -+ if (!strcmp(args[1], ":last")) -+ layout_attach = &layout_last_marker; -+ else if (!args[1][0]) -+ layout_attach = 0; -+ else -+ { -+ struct layout *lay; -+ lay = FindLayout(args[1]); -+ if (!lay) -+ { -+ Msg(0, "unknown layout '%s'", args[1]); -+ break; -+ } -+ layout_attach = lay; -+ } -+ } -+ else if (!strcmp(args[0], "show")) -+ { -+ ShowLayouts(-1); -+ } -+ else -+ Msg(0, "unknown layout subcommand"); -+ break; - default: - #ifdef HAVE_BRAILLE - /* key == -2: input from braille keybord, msgok always 0 */ -@@ -4480,16 +4810,23 @@ - } - - /* find right layer to display on canvas */ -- if (wi) -+ if (wi && wi->w_type != W_TYPE_GROUP) - { - l = &wi->w_layer; - if (wi->w_savelayer && (wi->w_blocked || wi->w_savelayer->l_cvlist == 0)) - l = wi->w_savelayer; - } - else -- l = &cv->c_blank; -+ { -+ l = &cv->c_blank; -+ if (wi) -+ l->l_data = (char *)wi; -+ else -+ l->l_data = 0; -+ } - - /* add our canvas to the layer's canvaslist */ -+ ASSERT(l->l_cvlist != cv); - cv->c_lnext = l->l_cvlist; - l->l_cvlist = cv; - cv->c_layer = l; -@@ -4500,6 +4837,17 @@ - if (flayer == 0) - flayer = l; - -+ if (wi && wi->w_type == W_TYPE_GROUP) -+ { -+ /* auto-start windowlist on groups */ -+ struct display *d = display; -+ struct layer *oldflayer = flayer; -+ flayer = l; -+ display_wlist(0, 0, wi); -+ flayer = oldflayer; -+ display = d; -+ } -+ - if (wi && D_other == wi) - D_other = wi->w_next; /* Might be 0, but that's OK. */ - if (cv == D_forecv) -@@ -4603,15 +4951,21 @@ - NextWindow() - { - register struct win **pp; -- int n = fore ? fore->w_number : -1; -+ int n = fore ? fore->w_number : MAXWIN; -+ char *group = fore ? fore->w_group : 0; - -- for (pp = wtab + n + 1; pp != wtab + n; pp++) -+ for (pp = fore ? wtab + n + 1 : wtab; pp != wtab + n; pp++) - { - if (pp == wtab + MAXWIN) - pp = wtab; - if (*pp) -- break; -+ { -+ if (!fore || group == (*pp)->w_group) -+ break; -+ } - } -+ if (pp == wtab + n) -+ return -1; - return pp - wtab; - } - -@@ -4619,15 +4973,21 @@ - PreviousWindow() - { - register struct win **pp; -- int n = fore ? fore->w_number : MAXWIN - 1; -+ int n = fore ? fore->w_number : -1; -+ char *group = fore ? fore->w_group : 0; - - for (pp = wtab + n - 1; pp != wtab + n; pp--) - { -- if (pp < wtab) -+ if (pp == wtab - 1) - pp = wtab + MAXWIN - 1; - if (*pp) -- break; -+ { -+ if (!fore || group == (*pp)->w_group) -+ break; -+ } - } -+ if (pp == wtab + n) -+ return -1; - return pp - wtab; - } - -@@ -4756,6 +5116,8 @@ - continue; - if ((flags & 1) && display && p == D_fore) - continue; -+ if (D_fore && D_fore->w_group != p->w_group) -+ continue; - - cmd = p->w_title; - l = strlen(cmd); -@@ -4821,7 +5183,7 @@ - strcpy(s, "(L)"); - s += 3; - } -- if (p->w_ptyfd < 0) -+ if (p->w_ptyfd < 0 && p->w_type != W_TYPE_GROUP) - *s++ = 'Z'; - *s = 0; - return s; -@@ -4841,7 +5203,7 @@ - s = buf; - for (display = displays; display; display = display->d_next) - { -- if (D_user == olddisplay->d_user) -+ if (olddisplay && D_user == olddisplay->d_user) - continue; - for (cv = D_cvlist; cv; cv = cv->c_next) - if (Layer2Window(cv->c_layer) == p) -@@ -5062,7 +5424,7 @@ - { - char *s, *ss; - int n; -- Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL); -+ Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL, 0); - s = fore->w_title; - if (!s) - return; -@@ -5116,11 +5478,41 @@ - return; - SwitchWindow(n); - } -+ -+static void -+SelectLayoutFin(buf, len, data) -+char *buf; -+int len; -+char *data; /* dummy */ -+{ -+ int n; -+ struct layout *lay; -+ -+ if (!len || !display) -+ return; -+ if (len == 1 && *buf == '-') -+ { -+ LoadLayout((struct layout *)0); -+ Activate(0); -+ return; -+ } -+ lay = FindLayout(buf); -+ if (!lay) -+ Msg(0, "No such layout\n"); -+ else if (lay == D_layout) -+ Msg(0, "This IS layout %d (%s).\n", lay->lay_number, lay->lay_title); -+ else -+ { -+ LoadLayout(lay, &D_canvas); -+ Activate(0); -+ } -+} -+ - - static void - InputSelect() - { -- Input("Switch to window: ", 20, INP_COOKED, SelectFin, NULL); -+ Input("Switch to window: ", 20, INP_COOKED, SelectFin, NULL, 0); - } - - static char setenv_var[31]; -@@ -5160,10 +5552,10 @@ - { - strncpy(setenv_var, arg, sizeof(setenv_var) - 1); - sprintf(setenv_buf, "Enter value for %s: ", setenv_var); -- Input(setenv_buf, 30, INP_COOKED, SetenvFin2, NULL); -+ Input(setenv_buf, 30, INP_COOKED, SetenvFin2, NULL, 0); - } - else -- Input("Setenv: Enter variable name: ", 30, INP_COOKED, SetenvFin1, NULL); -+ Input("Setenv: Enter variable name: ", 30, INP_COOKED, SetenvFin1, NULL, 0); - } - - /* -@@ -5413,16 +5805,15 @@ - { - struct plop *pp = plop_tab + (int)(unsigned char)*buf; - -- -- if (!fore) -- return; /* Input() should not call us w/o fore, but you never know... */ -- if (*buf == '.') -- Msg(0, "ins_reg_fn: Warning: pasting real register '.'!"); - if (len) - { - *buf = 0; - return; - } -+ if (!fore) -+ return; /* Input() should not call us w/o fore, but you never know... */ -+ if (*buf == '.') -+ Msg(0, "ins_reg_fn: Warning: pasting real register '.'!"); - if (pp->buf) - { - MakePaster(&fore->w_paster, pp->buf, pp->len, 0); -@@ -5457,7 +5848,7 @@ - confirm_fn(buf, len, data) - char *buf; - int len; --char *data; /* dummy */ -+char *data; - { - struct action act; - -@@ -5466,7 +5857,7 @@ - *buf = 0; - return; - } -- act.nr = (int)data; -+ act.nr = *(int *)data; - act.args = noargs; - act.argl = 0; - DoAction(&act, -1); -@@ -5500,11 +5891,11 @@ - if (buf && len) - strncpy(p, buf, 1 + (l < len) ? l : len); - if (!*i->name) -- Input("Screen User: ", sizeof(i->name) - 1, INP_COOKED, su_fin, (char *)i); -+ Input("Screen User: ", sizeof(i->name) - 1, INP_COOKED, su_fin, (char *)i, 0); - else if (!*i->pw1) -- Input("User's UNIX Password: ", sizeof(i->pw1)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i); -+ Input("User's UNIX Password: ", sizeof(i->pw1)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i, 0); - else if (!*i->pw2) -- Input("User's Screen Password: ", sizeof(i->pw2)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i); -+ Input("User's Screen Password: ", sizeof(i->pw2)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i, 0); - else - { - if ((p = DoSu(i->up, i->name, i->pw2, i->pw1))) -@@ -5550,7 +5941,7 @@ - free((char *)u->u_password); - u->u_password = SaveStr(buf); - bzero(buf, strlen(buf)); -- Input("Retype new password:", 100, INP_NOECHO, pass2, data); -+ Input("Retype new password:", 100, INP_NOECHO, pass2, data, 0); - } - - static void -@@ -5623,6 +6014,7 @@ - ch = buf[len]; - if (ch) - { -+ buf[len + 1] = ch; /* so we can restore it later */ - if (ch < ' ' || ch == '\177') - return; - if (len >= 1 && ((*buf == 'U' && buf[1] == '+') || (*buf == '0' && (buf[1] == 'x' || buf[1] == 'X')))) -@@ -5653,8 +6045,13 @@ - buf[len] = '\n'; - return; - } -- buf[len] = buf[len + 1]; /* gross */ -- len++; -+ if (len < 1) -+ return; -+ if (buf[len + 1]) -+ { -+ buf[len] = buf[len + 1]; /* stored above */ -+ len++; -+ } - if (len < 2) - return; - if (len >= 1 && ((*buf == 'U' && buf[1] == '+') || (*buf == '0' && (buf[1] == 'x' || buf[1] == 'X')))) -@@ -5711,12 +6108,26 @@ - int i; - { - struct action *act; -+ int discard = 0; - - debug1("StuffKey #%d", i); - #ifdef DEBUG - if (i < KMAP_KEYS) - debug1(" - %s", term[i + T_CAPS].tcname); - #endif -+ -+ if (i < KMAP_KEYS && D_ESCseen) -+ { -+ struct action *act = &D_ESCseen[i + 256]; -+ if (act->nr != RC_ILLEGAL) -+ { -+ D_ESCseen = 0; -+ DoAction(act, i + 256); -+ return 0; -+ } -+ discard = 1; -+ } -+ - if (i >= T_CURSOR - T_CAPS && i < T_KEYPAD - T_CAPS && D_cursorkeys) - i += T_OCAPS - T_CURSOR; - else if (i >= T_KEYPAD - T_CAPS && i < T_OCAPS - T_CAPS && D_keypad) -@@ -5731,9 +6142,16 @@ - #endif - if ((!act || act->nr == RC_ILLEGAL) && !D_mapdefault) - act = i < KMAP_KEYS+KMAP_AKEYS ? &umtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].um; -- D_mapdefault = 0; - if (!act || act->nr == RC_ILLEGAL) - act = i < KMAP_KEYS+KMAP_AKEYS ? &dmtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].dm; -+ -+ if (discard && (!act || act->nr != RC_COMMAND)) -+ { -+ D_ESCseen = 0; -+ return 0; -+ } -+ D_mapdefault = 0; -+ - if (act == 0 || act->nr == RC_ILLEGAL) - return -1; - DoAction(act, 0); -@@ -5873,53 +6291,243 @@ - - #endif - -+static int -+CalcSlicePercent(cv, percent) -+struct canvas *cv; -+int percent; -+{ -+ int w, wsum, up; -+ if (!cv || !cv->c_slback) -+ return percent; -+ up = CalcSlicePercent(cv->c_slback->c_slback, percent); -+ w = cv->c_slweight; -+ for (cv = cv->c_slback->c_slperp, wsum = 0; cv; cv = cv->c_slnext) -+ wsum += cv->c_slweight; -+ if (wsum == 0) -+ return 0; -+ return (up * w) / wsum; -+} -+ -+static int -+ChangeCanvasSize(fcv, abs, diff, gflag, percent) -+struct canvas *fcv; /* make this canvas bigger */ -+int abs; /* mode: 0:rel 1:abs 2:max */ -+int diff; /* change this much */ -+int gflag; /* go up if neccessary */ -+int percent; -+{ -+ struct canvas *cv; -+ int done, have, m, dir; -+ -+ debug3("ChangeCanvasSize abs %d diff %d percent=%d\n", abs, diff, percent); -+ if (abs == 0 && diff == 0) -+ return 0; -+ if (abs == 2) -+ { -+ if (diff == 0) -+ fcv->c_slweight = 0; -+ else -+ { -+ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) -+ cv->c_slweight = 0; -+ fcv->c_slweight = 1; -+ cv = fcv->c_slback->c_slback; -+ if (gflag && cv && cv->c_slback) -+ ChangeCanvasSize(cv, abs, diff, gflag, percent); -+ } -+ return diff; -+ } -+ if (abs) -+ { -+ if (diff < 0) -+ diff = 0; -+ if (percent && diff > percent) -+ diff = percent; -+ } -+ if (percent) -+ { -+ int wsum, up; -+ for (cv = fcv->c_slback->c_slperp, wsum = 0; cv; cv = cv->c_slnext) -+ wsum += cv->c_slweight; -+ if (wsum) -+ { -+ up = gflag ? CalcSlicePercent(fcv->c_slback->c_slback, percent) : percent; -+ debug3("up=%d, wsum=%d percent=%d\n", up, wsum, percent); -+ if (wsum < 1000) -+ { -+ int scale = wsum < 10 ? 1000 : 100; -+ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) -+ cv->c_slweight *= scale; -+ wsum *= scale; -+ debug1("scaled wsum to %d\n", wsum); -+ } -+ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) -+ { -+ if (cv->c_slweight) -+ { -+ cv->c_slweight = (cv->c_slweight * up) / percent; -+ if (cv->c_slweight == 0) -+ cv->c_slweight = 1; -+ } -+ debug1(" - weight %d\n", cv->c_slweight); -+ } -+ diff = (diff * wsum) / percent; -+ percent = wsum; -+ } -+ } -+ else -+ { -+ if (abs && diff == (fcv->c_slorient == SLICE_VERT ? fcv->c_ye - fcv->c_ys + 2 : fcv->c_xe - fcv->c_xs + 2)) -+ return 0; -+ /* fix weights to real size (can't be helped, sorry) */ -+ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) -+ { -+ cv->c_slweight = cv->c_slorient == SLICE_VERT ? cv->c_ye - cv->c_ys + 2 : cv->c_xe - cv->c_xs + 2; -+ debug1(" - weight %d\n", cv->c_slweight); -+ } -+ } -+ if (abs) -+ diff = diff - fcv->c_slweight; -+ debug1("diff = %d\n", diff); -+ if (diff == 0) -+ return 0; -+ if (diff < 0) -+ { -+ cv = fcv->c_slnext ? fcv->c_slnext : fcv->c_slprev; -+ fcv->c_slweight += diff; -+ cv->c_slweight -= diff; -+ return diff; -+ } -+ done = 0; -+ dir = 1; -+ for (cv = fcv->c_slnext; diff > 0; cv = dir > 0 ? cv->c_slnext : cv->c_slprev) -+ { -+ if (!cv) -+ { -+ debug1("reached end, dir is %d\n", dir); -+ if (dir == -1) -+ break; -+ dir = -1; -+ cv = fcv; -+ continue; -+ } -+ if (percent) -+ m = 1; -+ else -+ m = cv->c_slperp ? CountCanvasPerp(cv) * 2 : 2; -+ debug2("min is %d, have %d\n", m, cv->c_slweight); -+ if (cv->c_slweight > m) -+ { -+ have = cv->c_slweight - m; -+ if (have > diff) -+ have = diff; -+ debug1("subtract %d\n", have); -+ cv->c_slweight -= have; -+ done += have; -+ diff -= have; -+ } -+ } -+ if (diff && gflag) -+ { -+ /* need more room! */ -+ cv = fcv->c_slback->c_slback; -+ if (cv && cv->c_slback) -+ done += ChangeCanvasSize(fcv->c_slback->c_slback, 0, diff, gflag, percent); -+ } -+ fcv->c_slweight += done; -+ debug1("ChangeCanvasSize returns %d\n", done); -+ return done; -+} -+ - static void --ResizeRegions(arg) -+ResizeRegions(arg, flags) - char *arg; -+int flags; - { - struct canvas *cv; -- int nreg, dsize, diff, siz; -+ int nreg, dsize, diff, siz, nsiz, l, done; -+ int gflag = 0, abs = 0, percent = 0; -+ int orient = 0; - - ASSERT(display); -- for (nreg = 0, cv = D_cvlist; cv; cv = cv->c_next) -- nreg++; -- if (nreg < 2) -+ if (D_forecv->c_slorient == SLICE_UNKN) - { - Msg(0, "resize: need more than one region"); - return; - } -- dsize = D_height - (D_has_hstatus == HSTATUS_LASTLINE); -+ gflag = flags & RESIZE_FLAG_L ? 0 : 1; -+ orient |= flags & RESIZE_FLAG_H ? SLICE_HORI : 0; -+ orient |= flags & RESIZE_FLAG_V ? SLICE_VERT : 0; -+ if (orient == 0) -+ orient = D_forecv->c_slorient; -+ l = strlen(arg); - if (*arg == '=') - { - /* make all regions the same height */ -- int h = dsize; -- int hh, i = 0; -- for (cv = D_cvlist; cv; cv = cv->c_next) -- { -- hh = h / nreg-- - 1; -- cv->c_ys = i; -- cv->c_ye = i + hh - 1; -- cv->c_yoff = i; -- i += hh + 1; -- h -= hh + 1; -+ struct canvas *cv = gflag ? &D_canvas : D_forecv->c_slback; -+ if (cv->c_slperp->c_slorient & orient) -+ EqualizeCanvas(cv->c_slperp, gflag); -+ /* can't use cv->c_slorient directly as it can be D_canvas */ -+ if ((cv->c_slperp->c_slorient ^ (SLICE_HORI ^ SLICE_VERT)) & orient) -+ { -+ if (cv->c_slback) -+ { -+ cv = cv->c_slback; -+ EqualizeCanvas(cv->c_slperp, gflag); -+ } -+ else -+ EqualizeCanvas(cv, gflag); - } -+ ResizeCanvas(cv); -+ RecreateCanvasChain(); - RethinkDisplayViewports(); - ResizeLayersToCanvases(); - return; - } -- siz = D_forecv->c_ye - D_forecv->c_ys + 1; -- if (*arg == '+') -- diff = atoi(arg + 1); -- else if (*arg == '-') -- diff = -atoi(arg + 1); -- else if (!strcmp(arg, "min")) -- diff = 1 - siz; -- else if (!strcmp(arg, "max")) -- diff = dsize - (nreg - 1) * 2 - 1 - siz; -+ if (!strcmp(arg, "min") || !strcmp(arg, "0")) -+ { -+ abs = 2; -+ diff = 0; -+ } -+ else if (!strcmp(arg, "max") || !strcmp(arg, "_")) -+ { -+ abs = 2; -+ diff = 1; -+ } - else -- diff = atoi(arg) - siz; -- if (diff == 0) -+ { -+ if (l > 0 && arg[l - 1] == '%') -+ percent = 1000; -+ if (*arg == '+') -+ diff = atoi(arg + 1); -+ else if (*arg == '-') -+ diff = -atoi(arg + 1); -+ else -+ { -+ diff = atoi(arg); /* +1 because of caption line */ -+ if (diff < 0) -+ diff = 0; -+ abs = diff == 0 ? 2 : 1; -+ } -+ } -+ if (!abs && !diff) - return; -+ if (percent) -+ diff = diff * percent / 100; -+ cv = D_forecv; -+ if (cv->c_slorient & orient) -+ ChangeCanvasSize(cv, abs, diff, gflag, percent); -+ if (cv->c_slback->c_slorient & orient) -+ ChangeCanvasSize(cv->c_slback, abs, diff, gflag, percent); -+ -+ ResizeCanvas(&D_canvas); -+ RecreateCanvasChain(); -+ RethinkDisplayViewports(); -+ ResizeLayersToCanvases(); -+ return; -+ -+#if 0 -+ - if (siz + diff < 1) - diff = 1 - siz; - if (siz + diff > dsize - (nreg - 1) * 2 - 1) -@@ -5977,6 +6585,7 @@ - } - RethinkDisplayViewports(); - ResizeLayersToCanvases(); -+#endif - } - - static void -@@ -5985,7 +6594,29 @@ - int len; - char *data; - { -- ResizeRegions(buf); -+ int ch; -+ int flags = *(int *)data; -+ ch = ((unsigned char *)buf)[len]; -+ if (ch == 0) -+ { -+ ResizeRegions(buf, flags); -+ return; -+ } -+ if (ch == 'h') -+ flags ^= RESIZE_FLAG_H; -+ else if (ch == 'v') -+ flags ^= RESIZE_FLAG_V; -+ else if (ch == 'b') -+ flags |= RESIZE_FLAG_H|RESIZE_FLAG_V; -+ else if (ch == 'p') -+ flags ^= D_forecv->c_slorient == SLICE_VERT ? RESIZE_FLAG_H : RESIZE_FLAG_V; -+ else if (ch == 'l') -+ flags ^= RESIZE_FLAG_L; -+ else -+ return; -+ inp_setprompt(resizeprompts[flags], NULL); -+ *(int *)data = flags; -+ buf[len] = '\034'; - } - - #ifdef RXVT_OSC -diff -Naur screen-4.0.3.orig/resize.c screen-4.0.3/resize.c ---- screen-4.0.3.orig/resize.c 2003-09-08 16:26:31.000000000 +0200 -+++ screen-4.0.3/resize.c 2008-06-01 23:39:31.000000000 +0200 -@@ -148,58 +148,20 @@ - struct win *p; - struct canvas *cv, **cvpp; - int wwi; -- int y, h, hn; -+ int y, h, hn, xe, ye; - - debug2("ChangeScreenSize from (%d,%d) ", D_width, D_height); - debug3("to (%d,%d) (change_fore: %d)\n",wi, he, change_fore); - -- /* -- * STRATEGY: keep the ratios. -- * if canvas doesn't fit anymore, throw it off. -- * (ATTENTION: cvlist must be sorted!) -- */ -- y = 0; -- h = he; -- if (D_has_hstatus == HSTATUS_LASTLINE) -- { -- if (h > 1) -- h--; -- else -- D_has_hstatus = 0; /* sorry */ -- } -- for (cvpp = &D_cvlist; (cv = *cvpp); ) -- { -- if (h < 2 && cvpp != &D_cvlist) -- { -- /* kill canvas */ -- SetCanvasWindow(cv, 0); -- *cvpp = cv->c_next; -- free(cv); -- if (D_forecv == cv) -- D_forecv = 0; -- continue; -- } -- hn = (cv->c_ye - cv->c_ys + 1) * he / D_height; -- if (hn == 0) -- hn = 1; -- if (hn + 2 >= h || cv->c_next == 0) -- hn = h - 1; -- if ((!captionalways && cv == D_cvlist && h - hn < 2) || hn == 0) -- hn = h; -- ASSERT(hn > 0); -- cv->c_xs = 0; -- cv->c_xe = wi - 1; -- cv->c_ys = y; -- cv->c_ye = y + hn - 1; -- -- cv->c_xoff = cv->c_xs; -- cv->c_yoff = cv->c_ys; -- -- y += hn + 1; -- h -= hn + 1; -- cvpp = &cv->c_next; -+ cv = &D_canvas; -+ cv->c_xe = wi - 1; -+ cv->c_ye = he - 1 - ((cv->c_slperp && cv->c_slperp->c_slnext) || captionalways) - (D_has_hstatus == HSTATUS_LASTLINE); -+ if (cv->c_slperp) -+ { -+ ResizeCanvas(cv); -+ RecreateCanvasChain(); -+ RethinkDisplayViewports(); - } -- RethinkDisplayViewports(); - if (D_forecv == 0) - D_forecv = D_cvlist; - if (D_forecv) -@@ -682,6 +644,8 @@ - if (wi == 0) - he = hi = 0; - -+ if (p->w_type == W_TYPE_GROUP) -+ return 0; - if (p->w_width == wi && p->w_height == he && p->w_histheight == hi) - { - debug("ChangeWindowSize: No change.\n"); -@@ -1044,8 +1008,11 @@ - int i; - - if (p->w_alt_mlines) -- for (i = 0; i < p->w_alt_height; i++) -- FreeMline(p->w_alt_mlines + i); -+ { -+ for (i = 0; i < p->w_alt_height; i++) -+ FreeMline(p->w_alt_mlines + i); -+ free(p->w_alt_mlines); -+ } - p->w_alt_mlines = 0; - p->w_alt_width = 0; - p->w_alt_height = 0; -@@ -1053,8 +1020,11 @@ - p->w_alt_y = 0; - #ifdef COPY_PASTE - if (p->w_alt_hlines) -- for (i = 0; i < p->w_alt_histheight; i++) -- FreeMline(p->w_alt_hlines + i); -+ { -+ for (i = 0; i < p->w_alt_histheight; i++) -+ FreeMline(p->w_alt_hlines + i); -+ free(p->w_alt_hlines); -+ } - p->w_alt_hlines = 0; - p->w_alt_histidx = 0; - #endif -diff -Naur screen-4.0.3.orig/sched.h screen-4.0.3/sched.h ---- screen-4.0.3.orig/sched.h 2002-01-08 16:42:43.000000000 +0100 -+++ screen-4.0.3/sched.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: sched.h,v 1.1.1.1 1993/06/16 23:51:13 jnweiger Exp $ FAU -+ * $Id: sched.h,v 1.11 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - struct event -diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2003-09-08 16:26:41.000000000 +0200 -+++ screen-4.0.3/screen.c 2008-06-01 23:39:31.000000000 +0200 -@@ -124,6 +124,7 @@ - extern char *zmodem_sendcmd; - extern char *zmodem_recvcmd; - #endif -+extern struct layout *layout_last; - - - char *ShellProg; -@@ -158,6 +159,7 @@ - /* the attacher */ - struct passwd *ppp; - char *attach_tty; -+int attach_fd = -1; - char *attach_term; - char *LoginName; - struct mode attach_Mode; -@@ -211,10 +213,10 @@ - #endif - - char HostName[MAXSTR]; --int MasterPid; -+int MasterPid, PanicPid; - int real_uid, real_gid, eff_uid, eff_gid; - int default_startup; --int ZombieKey_destroy, ZombieKey_resurrect; -+int ZombieKey_destroy, ZombieKey_resurrect, ZombieKey_onerror; - char *preselect = NULL; /* only used in Attach() */ - - #ifdef UTF8 -@@ -889,6 +891,10 @@ - attach_tty = ""; - if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && !xflag)) - { -+#ifndef NAMEDPIPE -+ int fl; -+#endif -+ - /* ttyname implies isatty */ - if (!(attach_tty = ttyname(0))) - Panic(0, "Must be connected to a terminal."); -@@ -899,10 +905,20 @@ - #ifdef MULTIUSER - tty_mode = (int)st.st_mode & 0777; - #endif -- if ((n = secopen(attach_tty, O_RDWR | O_NONBLOCK, 0)) < 0) -- Panic(0, "Cannot open your terminal '%s' - please check.", attach_tty); -- close(n); -- debug1("attach_tty is %s\n", attach_tty); -+ -+#ifndef NAMEDPIPE -+ fl = fcntl(0, F_GETFL, 0); -+ if (fl != -1 && (fl & (O_RDWR|O_RDONLY|O_WRONLY)) == O_RDWR) -+ attach_fd = 0; -+#endif -+ if (attach_fd == -1) -+ { -+ if ((n = secopen(attach_tty, O_RDWR | O_NONBLOCK, 0)) < 0) -+ Panic(0, "Cannot open your terminal '%s' - please check.", attach_tty); -+ close(n); -+ } -+ debug2("attach_tty is %s, attach_fd is %d\n", attach_tty, attach_fd); -+ - if ((attach_term = getenv("TERM")) == 0 || *attach_term == 0) - Panic(0, "Please set a terminal type."); - if (strlen(attach_term) > sizeof(D_termname) - 1) -@@ -1163,6 +1179,9 @@ - /* NOTREACHED */ - } - -+ if (!detached) -+ PanicPid = getppid(); -+ - if (DefaultEsc == -1) - DefaultEsc = Ctrl('a'); - if (DefaultMetaEsc == -1) -@@ -1196,9 +1215,13 @@ - #endif - if (!detached) - { -- /* reopen tty. must do this, because fd 0 may be RDONLY */ -- if ((n = secopen(attach_tty, O_RDWR, 0)) < 0) -- Panic(0, "Cannot reopen '%s' - please check.", attach_tty); -+ if (attach_fd == -1) -+ { -+ if ((n = secopen(attach_tty, O_RDWR, 0)) < 0) -+ Panic(0, "Cannot reopen '%s' - please check.", attach_tty); -+ } -+ else -+ n = dup(attach_fd); - } - else - n = -1; -@@ -1222,6 +1245,7 @@ - { - if (MakeDisplay(LoginName, attach_tty, attach_term, n, getppid(), &attach_Mode) == 0) - Panic(0, "Could not alloc display"); -+ PanicPid = 0; - #ifdef ENCODINGS - D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; - debug1("D_encoding = %d\n", D_encoding); -@@ -1255,12 +1279,12 @@ - #ifdef ETCSCREENRC - # ifdef ALLOW_SYSSCREENRC - if ((ap = getenv("SYSSCREENRC"))) -- StartRc(ap); -+ (void)StartRc(ap, 0); - else - # endif -- StartRc(ETCSCREENRC); -+ (void)StartRc(ETCSCREENRC, 0); - #endif -- StartRc(RcFileName); -+ (void)StartRc(RcFileName, 0); - # ifdef UTMPOK - # ifndef UTNOKEEP - InitUtmp(); -@@ -1340,7 +1364,7 @@ - if (display && default_startup) - display_copyright(); - signal(SIGINT, SigInt); -- if (rflag && (rflag & 1) == 0) -+ if (rflag && (rflag & 1) == 0 && !quietflag) - { - Msg(0, "New screen..."); - rflag = 0; -@@ -1365,14 +1389,38 @@ - } - - void --WindowDied(p) -+WindowDied(p, wstat, wstat_valid) - struct win *p; -+int wstat; -+int wstat_valid; - { -- if (ZombieKey_destroy) -+ int killit = 0; -+ -+ if (ZombieKey_destroy && ZombieKey_onerror && wstat_valid && -+ WIFEXITED(wstat) && WEXITSTATUS(wstat) == 0) -+ killit = 1; -+ -+ if (ZombieKey_destroy && !killit) - { -- char buf[100], *s; -+ char buf[100], *s, reason[100]; - time_t now; - -+ if (wstat_valid) { -+ if (WIFEXITED(wstat)) -+ if (WEXITSTATUS(wstat)) -+ sprintf(reason, "terminated with exit status %d", WEXITSTATUS(wstat)); -+ else -+ sprintf(reason, "terminated normally"); -+ else if (WIFSIGNALED(wstat)) -+ sprintf(reason, "terminated with signal %d%s", WTERMSIG(wstat), -+#ifdef WCOREDUMP -+ WCOREDUMP(wstat) ? " (core file generated)" : ""); -+#else -+ ""); -+#endif -+ } else -+ sprintf(reason, "detached from window"); -+ - (void) time(&now); - s = ctime(&now); - if (s && *s) -@@ -1388,11 +1436,12 @@ - #endif - CloseDevice(p); - -+ p->w_deadpid = p->w_pid; - p->w_pid = 0; - ResetWindow(p); - /* p->w_y = p->w_bot; */ - p->w_y = MFindUsedLine(p, p->w_bot, 1); -- sprintf(buf, "\n\r=== Window terminated (%s) ===", s ? s : "?"); -+ sprintf(buf, "\n\r=== Command %s (%s) ===", reason, s ? s : "?"); - WriteString(p, buf, strlen(buf)); - WindowChanged(p, 'f'); - } -@@ -1555,12 +1604,16 @@ - for (p = windows; p; p = next) - { - next = p->w_next; -- if (pid == p->w_pid) -+ if ( (p->w_pid && pid == p->w_pid) || -+ (p->w_deadpid && pid == p->w_deadpid) ) - { -+ /* child has ceased to exist */ -+ p->w_pid = 0; -+ - #ifdef BSDJOBS - if (WIFSTOPPED(wstat)) - { -- debug3("Window %d pid %d: WIFSTOPPED (sig %d)\n", p->w_number, p->w_pid, WSTOPSIG(wstat)); -+ debug3("Window %d pid %d: WIFSTOPPED (sig %d)\n", p->w_number, pid, WSTOPSIG(wstat)); - #ifdef SIGTTIN - if (WSTOPSIG(wstat) == SIGTTIN) - { -@@ -1577,13 +1630,13 @@ - #endif - /* Try to restart process */ - Msg(0, "Child has been stopped, restarting."); -- if (killpg(p->w_pid, SIGCONT)) -- kill(p->w_pid, SIGCONT); -+ if (killpg(pid, SIGCONT)) -+ kill(pid, SIGCONT); - } - else - #endif - { -- WindowDied(p); -+ WindowDied(p, wstat, 1); - } - break; - } -@@ -1812,6 +1865,8 @@ - D_user->u_detachwin = D_fore->w_number; - D_user->u_detachotherwin = D_other ? D_other->w_number : -1; - } -+ AutosaveLayout(D_layout); -+ layout_last = D_layout; - for (cv = D_cvlist; cv; cv = cv->c_next) - { - p = Layer2Window(cv->c_layer); -@@ -1965,7 +2020,11 @@ - } - debug3("Panic('%s'); display=%x displays=%x\n", buf, display, displays); - if (displays == 0 && display == 0) -- printf("%s\r\n", buf); -+ { -+ printf("%s\r\n", buf); -+ if (PanicPid) -+ Kill(PanicPid, SIG_BYE); -+ } - else if (displays == 0) - { - /* no displays but a display - must have forked. -@@ -2605,6 +2664,8 @@ - p--; - /* small hack */ - if (display && ((ev && ev == &D_forecv->c_captev) || (!ev && win && win == D_fore))) -+ minusflg = !minusflg; -+ if (minusflg) - qmflag = 1; - break; - case '>': -@@ -2785,7 +2846,7 @@ - return MakeWinMsgEv(s, win, esc, 0, (struct event *)0, 0); - } - --int -+void - PutWinMsg(s, start, max) - char *s; - int start, max; -@@ -2796,7 +2857,18 @@ - int rendstackn = 0; - - if (s != winmsg_buf) -- return 0; -+ { -+ /* sorry, no fancy coloring available */ -+ debug1("PutWinMsg %s plain\n", s); -+ l = strlen(s); -+ if (l > max) -+ l = max; -+ l -= start; -+ s += start; -+ while (l-- > 0) -+ PUTCHARLP(*s++); -+ return; -+ } - rend = D_rend; - p = 0; - l = strlen(s); -@@ -2846,7 +2918,6 @@ - PUTCHARLP(*s++); - } - } -- return 1; - } - - -diff -Naur screen-4.0.3.orig/screen.h screen-4.0.3/screen.h ---- screen-4.0.3.orig/screen.h 2003-08-22 14:28:43.000000000 +0200 -+++ screen-4.0.3/screen.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: screen.h,v 1.12 1994/05/31 12:32:54 mlschroe Exp $ FAU -+ * $Id: screen.h,v 1.35 2005/12/16 18:51:07 jnweiger Exp $ FAU - */ - - #include "os.h" -diff -Naur screen-4.0.3.orig/search.c screen-4.0.3/search.c ---- screen-4.0.3.orig/search.c 2003-09-08 16:26:45.000000000 +0200 -+++ screen-4.0.3/search.c 2008-06-01 23:39:31.000000000 +0200 -@@ -62,7 +62,7 @@ - } - else - Input((dir > 0 ? "/" : "?"), sizeof(markdata->isstr)-1, INP_COOKED, -- (dir > 0 ? searchend : backsearchend), NULL); -+ (dir > 0 ? searchend : backsearchend), NULL, 0); - } - - static void -@@ -364,7 +364,7 @@ - if (W2D(markdata->cy) == INPUTLINE) - revto_line(markdata->cx, markdata->cy, INPUTLINE > 0 ? INPUTLINE - 1 : 1); - Input(isprompts[dir + 1], sizeof(markdata->isstr) - 1, INP_RAW, -- is_process, NULL); -+ is_process, NULL, 0); - LGotoPos(flayer, markdata->cx, W2D(markdata->cy)); - flayer->l_x = markdata->cx; - flayer->l_y = W2D(markdata->cy); -diff -Naur screen-4.0.3.orig/socket.c screen-4.0.3/socket.c ---- screen-4.0.3.orig/socket.c 2003-09-08 16:26:50.000000000 +0200 -+++ screen-4.0.3/socket.c 2008-06-01 23:39:31.000000000 +0200 -@@ -63,6 +63,7 @@ - extern struct display *display, *displays; - extern struct win *fore, *wtab[], *console_window, *windows; - extern struct layer *flayer; -+extern struct layout *layout_attach, *layout_last, layout_last_marker; - extern struct NewWindow nwin_undef; - #ifdef MULTIUSER - extern char *multi; -@@ -789,25 +790,77 @@ - struct display *next; - #endif - struct display *olddisplays = displays; -+ int recvfd = -1; - - #ifdef NAMEDPIPE - debug("Ha, there was someone knocking on my fifo??\n"); - if (fcntl(ServerSocket, F_SETFL, 0) == -1) - Panic(errno, "BLOCK fcntl"); -+ p = (char *) &m; -+ left = sizeof(m); - #else - struct sockaddr_un a; -+ struct msghdr msg; -+ struct iovec iov; -+ char control[1024]; - - len = sizeof(a); - debug("Ha, there was someone knocking on my socket??\n"); -- if ((ns = accept(ns, (struct sockaddr *) &a, &len)) < 0) -+ if ((ns = accept(ns, (struct sockaddr *) &a, (void *)&len)) < 0) - { - Msg(errno, "accept"); - return; - } --#endif /* NAMEDPIPE */ - - p = (char *) &m; - left = sizeof(m); -+ bzero(&msg, sizeof(msg)); -+ iov.iov_base = &m; -+ iov.iov_len = left; -+ msg.msg_iov = &iov; -+ msg.msg_iovlen = 1; -+ msg.msg_controllen = sizeof(control); -+ msg.msg_control = &control; -+ while (left > 0) -+ { -+ len = recvmsg(ns, &msg, 0); -+ if (len < 0 && errno == EINTR) -+ continue; -+ if (len < 0) -+ { -+ close(ns); -+ Msg(errno, "read"); -+ return; -+ } -+ if (msg.msg_controllen) -+ { -+ struct cmsghdr *cmsg; -+ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) -+ { -+ int cl; -+ char *cp; -+ if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) -+ continue; -+ cp = (char *)CMSG_DATA(cmsg); -+ cl = cmsg->cmsg_len; -+ while(cl >= CMSG_LEN(sizeof(int))) -+ { -+ int passedfd; -+ bcopy(cp, &passedfd, sizeof(int)); -+ if (recvfd >= 0 && passedfd != recv) -+ close(recvfd); -+ recvfd = passedfd; -+ cl -= CMSG_LEN(sizeof(int)); -+ } -+ } -+ } -+ p += len; -+ left -= len; -+ break; -+ } -+ -+#endif -+ - while (left > 0) - { - len = read(ns, p, left); -@@ -836,6 +889,8 @@ - if (len < 0) - { - Msg(errno, "read"); -+ if (recvfd != -1) -+ close(recvfd); - return; - } - if (left > 0) -@@ -848,11 +903,19 @@ - } - if (m.protocol_revision != MSG_REVISION) - { -+ if (recvfd != -1) -+ close(recvfd); - Msg(0, "Invalid message (magic 0x%08x).", m.protocol_revision); - return; - } - - debug2("*** RecMsg: type %d tty %s\n", m.type, m.m_tty); -+ if (m.type != MSG_ATTACH && recvfd != -1) -+ { -+ close(recvfd); -+ recvfd = -1; -+ } -+ - for (display = displays; display; display = display->d_next) - if (TTYCMP(D_usertty, m.m_tty) == 0) - break; -@@ -876,7 +939,11 @@ - RemoveStatus(); - - if (display && !D_tcinited && m.type != MSG_HANGUP) -- return; /* ignore messages for bad displays */ -+ { -+ if (recvfd != -1) -+ close(recvfd); -+ return; /* ignore messages for bad displays */ -+ } - - switch (m.type) - { -@@ -908,7 +975,21 @@ - Msg(0, "Attach attempt with bad pid(%d)!", m.m.attach.apid); - break; - } -- if ((i = secopen(m.m_tty, O_RDWR | O_NONBLOCK, 0)) < 0) -+ if (recvfd != -1) -+ { -+ char *myttyname; -+ i = recvfd; -+ recvfd = -1; -+ myttyname = ttyname(i); -+ if (myttyname == 0 || strcmp(myttyname, m.m_tty)) -+ { -+ Msg(errno, "Attach: passed fd does not match tty: %s - %s!", m.m_tty, myttyname ? myttyname : "NULL"); -+ close(i); -+ Kill(m.m.attach.apid, SIG_BYE); -+ break; -+ } -+ } -+ else if ((i = secopen(m.m_tty, O_RDWR | O_NONBLOCK, 0)) < 0) - { - Msg(errno, "Attach: Could not open %s!", m.m_tty); - Kill(m.m.attach.apid, SIG_BYE); -@@ -1112,6 +1193,7 @@ - char *p; - int pid; - int noshowwin; -+ int r = 0; - struct win *wi; - - ASSERT(display); -@@ -1143,12 +1225,12 @@ - #ifdef ETCSCREENRC - # ifdef ALLOW_SYSSCREENRC - if ((p = getenv("SYSSCREENRC"))) -- StartRc(p); -+ StartRc(p, 1); - else - # endif -- StartRc(ETCSCREENRC); -+ StartRc(ETCSCREENRC, 1); - #endif -- StartRc(RcFileName); -+ StartRc(RcFileName, 1); - if (InitTermcap(m->m.attach.columns, m->m.attach.lines)) - { - FreeDisplay(); -@@ -1180,6 +1262,17 @@ - #endif - - D_fore = NULL; -+ if (layout_attach) -+ { -+ struct layout *lay = layout_attach; -+ if (lay == &layout_last_marker) -+ lay = layout_last; -+ if (lay) -+ { -+ LoadLayout(lay, &D_canvas); -+ SetCanvasWindow(D_forecv, 0); -+ } -+ } - /* - * there may be a window that we remember from last detach: - */ -@@ -1203,6 +1296,14 @@ - fore = 0; - noshowwin = 1; - } -+ else if (!strcmp(m->m.attach.preselect, "+")) -+ { -+ struct action newscreen; -+ char *na = 0; -+ newscreen.nr = RC_SCREEN; -+ newscreen.args = &na; -+ DoAction(&newscreen, -1); -+ } - else - fore = FindNiceWindow(fore, m->m.attach.preselect); - } -@@ -1217,7 +1318,7 @@ - #endif - { - flayer = D_forecv->c_layer; -- display_wlist(1, WLIST_NUM); -+ display_wlist(1, WLIST_NUM, (char *)0); - noshowwin = 1; - } - } -@@ -1424,3 +1525,45 @@ - EffectiveAclUser = 0; - #endif - } -+ -+#ifndef NAMEDPIPE -+ -+int -+SendAttachMsg(s, m, fd) -+int s; -+struct msg *m; -+int fd; -+{ -+ int r; -+ struct msghdr msg; -+ struct iovec iov; -+ char buf[CMSG_SPACE(sizeof(int))]; -+ struct cmsghdr *cmsg; -+ -+ iov.iov_base = (char *)m; -+ iov.iov_len = sizeof(*m); -+ bzero(&msg, sizeof(msg)); -+ msg.msg_name = 0; -+ msg.msg_namelen = 0; -+ msg.msg_iov = &iov; -+ msg.msg_iovlen = 1; -+ msg.msg_control = buf; -+ msg.msg_controllen = sizeof(buf); -+ cmsg = CMSG_FIRSTHDR(&msg); -+ cmsg->cmsg_level = SOL_SOCKET; -+ cmsg->cmsg_type = SCM_RIGHTS; -+ cmsg->cmsg_len = CMSG_LEN(sizeof(int)); -+ bcopy(&fd, CMSG_DATA(cmsg), sizeof(int)); -+ msg.msg_controllen = cmsg->cmsg_len; -+ while(1) -+ { -+ r = sendmsg(s, &msg, 0); -+ if (r == -1 && errno == EINTR) -+ continue; -+ if (r == -1) -+ return -1; -+ return 0; -+ } -+} -+ -+#endif -diff -Naur screen-4.0.3.orig/teln.c screen-4.0.3/teln.c ---- screen-4.0.3.orig/teln.c 2003-09-08 16:26:56.000000000 +0200 -+++ screen-4.0.3/teln.c 2008-06-01 23:39:31.000000000 +0200 -@@ -64,6 +64,7 @@ - #define TO_NAWS 31 - #define TO_TSPEED 32 - #define TO_LFLOW 33 -+#define TO_LINEMODE 34 - #define TO_XDISPLOC 35 - #define TO_NEWENV 39 - -@@ -90,7 +91,7 @@ - strncpy(buf + 1, strerror(errno), sizeof(buf) - 2); - buf[sizeof(buf) - 1] = 0; - WriteString(p, buf, strlen(buf)); -- WindowDied(p); -+ WindowDied(p, 0, 0); - return; - } - WriteString(p, "connected.\r\n", 12); -@@ -406,13 +407,13 @@ - int repl = 0; - - if (cmd == TC_WONT) -- debug2("[WONT %c %d]\n", TO_S[opt], opt); -+ debug2("[<-WONT %c %d]\n", TO_S[opt], opt); - if (cmd == TC_WILL) -- debug2("[WILL %c %d]\n", TO_S[opt], opt); -+ debug2("[<-WILL %c %d]\n", TO_S[opt], opt); - if (cmd == TC_DONT) -- debug2("[DONT %c %d]\n", TO_S[opt], opt); -+ debug2("[<-DONT %c %d]\n", TO_S[opt], opt); - if (cmd == TC_DO) -- debug2("[DO %c %d]\n", TO_S[opt], opt); -+ debug2("[<-DO %c %d]\n", TO_S[opt], opt); - - switch(cmd) - { -@@ -458,6 +459,16 @@ - b[0] = TC_IAC; - b[1] = repl; - b[2] = opt; -+ -+ if (repl == TC_WONT) -+ debug2("[->WONT %c %d]\n", TO_S[opt], opt); -+ if (repl == TC_WILL) -+ debug2("[->WILL %c %d]\n", TO_S[opt], opt); -+ if (repl == TC_DONT) -+ debug2("[->DONT %c %d]\n", TO_S[opt], opt); -+ if (repl == TC_DO) -+ debug2("[->DO %c %d]\n", TO_S[opt], opt); -+ - TelReply(p, (char *)b, 3); - if (cmd == TC_DO && opt == TO_NAWS) - TelWindowSize(p); -diff -Naur screen-4.0.3.orig/termcap.c screen-4.0.3/termcap.c ---- screen-4.0.3.orig/termcap.c 2003-09-08 16:45:36.000000000 +0200 -+++ screen-4.0.3/termcap.c 2008-06-01 23:39:31.000000000 +0200 -@@ -39,6 +39,7 @@ - extern struct action umtab[]; - extern struct action mmtab[]; - extern struct action dmtab[]; -+extern struct action ktab[]; - extern struct kmap_ext *kmap_exts; - extern int kmap_extn; - extern int DefaultEsc; -@@ -547,7 +548,8 @@ - else - break; - } -- -+ if (n < KMAP_KEYS) -+ domap = 1; - if (map == 0 && domap) - return 0; - if (map && !domap) -diff -Naur screen-4.0.3.orig/tty.sh screen-4.0.3/tty.sh ---- screen-4.0.3.orig/tty.sh 2003-09-08 16:24:25.000000000 +0200 -+++ screen-4.0.3/tty.sh 2008-06-01 23:39:31.000000000 +0200 -@@ -622,6 +622,10 @@ - D_NewMode.tio.c_iflag &= ~IXON; - } - # ifdef POSIX -+# ifdef TCOON -+ if (!on) -+ tcflow(D_userfd, TCOON); -+# endif - if (tcsetattr(D_userfd, TCSANOW, &D_NewMode.tio)) - # else - if (ioctl(D_userfd, TCSETAW, (char *)&D_NewMode.tio) != 0) -diff -Naur screen-4.0.3.orig/utmp.c screen-4.0.3/utmp.c ---- screen-4.0.3.orig/utmp.c 2003-09-08 16:27:17.000000000 +0200 -+++ screen-4.0.3/utmp.c 2008-06-01 23:39:31.000000000 +0200 -@@ -604,6 +604,7 @@ - char *line, *user; - int pid; - { -+ time_t now; - u->ut_type = USER_PROCESS; - strncpy(u->ut_user, user, sizeof(u->ut_user)); - /* Now the tricky part... guess ut_id */ -@@ -618,7 +619,10 @@ - #endif /* sgi */ - strncpy(u->ut_line, line, sizeof(u->ut_line)); - u->ut_pid = pid; -- (void)time((time_t *)&u->ut_time); -+ /* must use temp variable because of NetBSD/sparc64, where -+ * ut_xtime is long(64) but time_t is int(32) */ -+ (void)time(&now); -+ u->ut_time = now; - } - - static slot_t -@@ -726,9 +730,11 @@ - char *line, *user; - int pid; - { -+ time_t now; - strncpy(u->ut_line, line, sizeof(u->ut_line)); - strncpy(u->ut_name, user, sizeof(u->ut_name)); -- (void)time((time_t *)&u->ut_time); -+ (void)time(&now); -+ u->ut_time = now; - } - - static slot_t -diff -Naur screen-4.0.3.orig/window.c screen-4.0.3/window.c ---- screen-4.0.3.orig/window.c 2003-12-05 14:45:41.000000000 +0100 -+++ screen-4.0.3/window.c 2008-06-01 23:39:31.000000000 +0200 -@@ -50,7 +50,7 @@ - extern int visual_bell, maxwin; - extern struct event logflushev; - extern int log_flush, logtstamp_after; --extern int ZombieKey_destroy, ZombieKey_resurrect; -+extern int ZombieKey_destroy, ZombieKey_resurrect, ZombieKey_onerror; - extern struct layer *flayer; - extern int maxusercount; - extern int pty_preopen; -@@ -244,6 +244,12 @@ - debug1("WinProcess: %d bytes\n", *lenp); - fore = (struct win *)flayer->l_data; - -+ if (fore->w_type == W_TYPE_GROUP) -+ { -+ *bufpp += *lenp; -+ *lenp = 0; -+ return; -+ } - if (fore->w_ptyfd < 0) /* zombie? */ - { - ZombieProcess(bufpp, lenp); -@@ -466,7 +472,7 @@ - { - struct canvas *cv; - fore = (struct win *)flayer->l_data; -- debug1("WinRestore: win %x\n", fore); -+ debug1("WinRestore: win %p\n", fore); - for (cv = flayer->l_cvlist; cv; cv = cv->c_next) - { - display = cv->c_display; -@@ -584,6 +590,8 @@ - - if ((f = OpenDevice(nwin.args, nwin.lflag, &type, &TtyName)) < 0) - return -1; -+ if (type == W_TYPE_GROUP) -+ f = -1; - - if ((p = (struct win *)malloc(sizeof(struct win))) == 0) - { -@@ -610,6 +618,11 @@ - p->w_term = SaveStr(nwin.term); - - p->w_number = n; -+ p->w_group = 0; -+ if (p->w_type != W_TYPE_GROUP && fore && fore->w_type == W_TYPE_GROUP) -+ p->w_group = fore; -+ else if (p->w_type != W_TYPE_GROUP && fore && fore->w_group) -+ p->w_group = fore->w_group; - #ifdef MULTIUSER - /* - * This is dangerous: without a display we use creators umask -@@ -712,7 +725,7 @@ - SetCharsets(p, nwin.charset); - #endif - -- if (VerboseCreate) -+ if (VerboseCreate && type != W_TYPE_GROUP) - { - struct display *d = display; /* WriteString zaps display */ - -@@ -728,6 +741,7 @@ - display = d; - } - -+ p->w_deadpid = 0; - p->w_pid = 0; - #ifdef PSEUDOS - p->w_pwin = 0; -@@ -762,6 +776,17 @@ - *pp = p; - p->w_next = windows; - windows = p; -+ -+ if (type == W_TYPE_GROUP) -+ { -+ SetForeWindow(p); -+ Activate(p->w_norefresh); -+ WindowChanged((struct win*)0, 'w'); -+ WindowChanged((struct win*)0, 'W'); -+ WindowChanged((struct win*)0, 0); -+ return n; -+ } -+ - p->w_lflag = nwin.lflag; - #ifdef UTMPOK - p->w_slot = (slot_t)-1; -@@ -860,6 +885,7 @@ - display = d; - } - -+ p->w_deadpid = 0; - p->w_pid = 0; - #ifdef BUILTIN_TELNET - if (p->w_type == W_TYPE_TELNET) -@@ -1007,6 +1033,12 @@ - - if (!arg) - return -1; -+ if (strcmp(arg, "//group") == 0) -+ { -+ *typep = W_TYPE_GROUP; -+ *namep = "telnet"; -+ return 0; -+ } - #ifdef BUILTIN_TELNET - if (strcmp(arg, "//telnet") == 0) - { -@@ -1117,7 +1149,7 @@ - { - int pid; - char tebuf[25]; -- char ebuf[10]; -+ char ebuf[20]; - char shellbuf[7 + MAXPATHLEN]; - char *proc; - #ifndef TIOCSWINSZ -@@ -1807,13 +1839,13 @@ - return; - #endif - debug2("Window %d: read error (errno %d) - killing window\n", p->w_number, errno); -- WindowDied(p); -+ WindowDied(p, 0, 0); - return; - } - if (len == 0) - { - debug1("Window %d: EOF - killing window\n", p->w_number); -- WindowDied(p); -+ WindowDied(p, 0, 0); - return; - } - debug1(" -> %d bytes\n", len); -@@ -2139,7 +2171,7 @@ - return; - } - flayer = &p->w_layer; -- Input(":", 100, INP_COOKED, zmodem_fin, NULL); -+ Input(":", 100, INP_COOKED, zmodem_fin, NULL, 0); - s = send ? zmodem_sendcmd : zmodem_recvcmd; - n = strlen(s); - LayProcess(&s, &n); -diff -Naur screen-4.0.3.orig/window.h screen-4.0.3/window.h ---- screen-4.0.3.orig/window.h 2003-08-21 16:57:30.000000000 +0200 -+++ screen-4.0.3/window.h 2008-06-01 23:39:31.000000000 +0200 -@@ -19,7 +19,7 @@ - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - **************************************************************** -- * $Id: window.h,v 1.11 1994/05/31 12:33:27 mlschroe Exp $ FAU -+ * $Id: window.h,v 1.23 2007/02/06 20:44:37 mls Exp $ FAU - */ - - -@@ -150,6 +150,7 @@ - char *w_akachange; /* autoaka hack */ - char w_akabuf[MAXSTR]; /* aka buffer */ - int w_autoaka; /* autoaka hack */ -+ struct win *w_group; /* window group we belong to */ - int w_intermediate; /* char used while parsing ESC-seq */ - int w_args[MAXARGS]; /* emulator args */ - int w_NumArgs; -@@ -236,6 +237,7 @@ - int w_histheight; /* always 0 */ - #endif - int w_pid; /* process at the other end of ptyfd */ -+ int w_deadpid; /* saved w_pid of a process that closed the ptyfd to us */ - - char *w_cmdargs[MAXARGS]; /* command line argument vector */ - char *w_dir; /* directory for chdir */ -@@ -286,6 +288,7 @@ - #define W_TYPE_PTY 0 - #define W_TYPE_PLAIN 1 - #define W_TYPE_TELNET 2 -+#define W_TYPE_GROUP 3 - - - /* diff -Nru screen-4.0.3/debian/patches/01configure_fix_alpha_vsprintf.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/01configure_fix_alpha_vsprintf.dpatch --- screen-4.0.3/debian/patches/01configure_fix_alpha_vsprintf.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/01configure_fix_alpha_vsprintf.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 01configure_fix_alpha_vsprintf.dpatch by -## -## DP: Enhance the vsprintf() test to also succeed on Alpha. -## DP: Cf. #213842. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in ---- screen-4.0.3.orig/configure.in 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/configure.in 2008-06-01 23:39:51.000000000 +0200 -@@ -1210,7 +1210,7 @@ - rm -f /tmp/conftest* - - AC_MSG_CHECKING(for vsprintf) --AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) -+AC_TRY_LINK([#include ],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) - - AC_HEADER_DIRENT - diff -Nru screen-4.0.3/debian/patches/01configure_fix_alpha_vsprintf.patch screen-4.1.0~20120320gitdb59704/debian/patches/01configure_fix_alpha_vsprintf.patch --- screen-4.0.3/debian/patches/01configure_fix_alpha_vsprintf.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/01configure_fix_alpha_vsprintf.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,16 @@ +Author: +Description: Enhance the vsprintf() test to also succeed on Alpha. +Cf. #213842. +Index: screen/configure.in +=================================================================== +--- screen.orig/configure.in 2012-03-20 22:34:28.000000000 +0100 ++++ screen/configure.in 2012-03-20 22:34:53.000000000 +0100 +@@ -1212,7 +1212,7 @@ + AC_SYS_LONG_FILE_NAMES + + AC_MSG_CHECKING(for vsprintf) +-AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) ++AC_TRY_LINK([#include ],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) + + AC_HEADER_DIRENT + diff -Nru screen-4.0.3/debian/patches/02configure_use_ncursesw.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/02configure_use_ncursesw.dpatch --- screen-4.0.3/debian/patches/02configure_use_ncursesw.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/02configure_use_ncursesw.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 02configure_use_ncursesw.dpatch by -## -## DP: Add libncursesw support to configure.in. -## DP: (And rerun autoconf afterwards, because adding autoconf as build-dependency -## DP: is more of a hassle than running it manually from time to time.) - -@DPATCH@ -diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in ---- screen-4.0.3.orig/configure.in 2008-06-01 23:39:57.000000000 +0200 -+++ screen-4.0.3/configure.in 2008-06-01 23:39:59.000000000 +0200 -@@ -647,6 +647,12 @@ - AC_CHECKING(for tgetent) - AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, - olibs="$LIBS" -+LIBS="-lncursesw $olibs" -+AC_CHECKING(libncursesw) -+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, -+LIBS="-lncurses $olibs" -+AC_CHECKING(libncurses) -+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, - LIBS="-lcurses $olibs" - AC_CHECKING(libcurses) - AC_TRY_LINK(,[ -@@ -662,10 +668,7 @@ - LIBS="-ltermlib $olibs" - AC_CHECKING(libtermlib) - AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, --LIBS="-lncurses $olibs" --AC_CHECKING(libncurses) --AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, --AC_MSG_ERROR(!!! no tgetent - no screen)))))) -+AC_MSG_ERROR(!!! no tgetent - no screen))))))) - - AC_TRY_RUN([ - main() diff -Nru screen-4.0.3/debian/patches/03-fix-terminal-handling-on-kfreebsd.patch screen-4.1.0~20120320gitdb59704/debian/patches/03-fix-terminal-handling-on-kfreebsd.patch --- screen-4.0.3/debian/patches/03-fix-terminal-handling-on-kfreebsd.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/03-fix-terminal-handling-on-kfreebsd.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,27 @@ +Description: Add some missing defined(__GLIBC__) to get linux-ish terminal handling. +Author: Axel Beckert +Thanks: Jan Christoph Nordholz +Closes: #660567 + +Index: screen-4.1.0~20120320gitdb59704/pty.c +=================================================================== +--- screen-4.1.0~20120320gitdb59704.orig/pty.c 2011-10-05 00:32:21.000000000 +0200 ++++ screen-4.1.0~20120320gitdb59704/pty.c 2012-06-03 21:42:56.000000000 +0200 +@@ -136,7 +136,7 @@ + { + if (f < 0) + return; +-#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX) ++#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__GLIBC__) && !defined(__osf__) && !defined(M_UNIX) + if (ioctl(f, I_PUSH, "ptem")) + Panic(errno, "InitPTY: cannot I_PUSH ptem"); + if (ioctl(f, I_PUSH, "ldterm")) +@@ -260,7 +260,7 @@ + sigret_t (*sigcld)__P(SIGPROTOARG); + + strcpy(PtyName, "/dev/ptmx"); +-#if defined(HAVE_GETPT) && defined(linux) ++#if defined(HAVE_GETPT) && (defined(linux) || defined(__GLIBC__)) + if ((f = getpt()) == -1) + #else + if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1) diff -Nru screen-4.0.3/debian/patches/03fully_expand_screenencodings.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/03fully_expand_screenencodings.dpatch --- screen-4.0.3/debian/patches/03fully_expand_screenencodings.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/03fully_expand_screenencodings.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 03fully_expand_screenencodings.dpatch by -## -## DP: SCREENENCODINGS contains ${prefix} from $datadir, which needs -## DP: an extra expansion step. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in ---- screen-4.0.3.orig/configure.in 2008-06-01 23:40:01.000000000 +0200 -+++ screen-4.0.3/configure.in 2008-06-01 23:40:03.000000000 +0200 -@@ -1287,7 +1287,7 @@ - SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" - if test -n "$datadir"; then - eval SCREENENCODINGS="$datadir/screen/utf8encodings" --SCREENENCODINGS="\"$SCREENENCODINGS\"" -+eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\"" - fi - AC_MSG_CHECKING(for the utf8-encodings location) - AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS) diff -Nru screen-4.0.3/debian/patches/04AUTOCONF.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/04AUTOCONF.dpatch --- screen-4.0.3/debian/patches/04AUTOCONF.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/04AUTOCONF.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,11090 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 04AUTOCONF.dpatch by -## -## DP: Rerun autoconf. Adding it as a build-dep is likely to cause surprises -## DP: when versions change, so I'd rather take the burden to run it manually -## DP: and check its output. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/configure screen-4.0.3/configure ---- screen-4.0.3.orig/configure 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/configure 2008-06-01 23:40:07.000000000 +0200 -@@ -1,37 +1,101 @@ - #! /bin/sh --# From configure.in Revision: 1.18 . -+# From configure.in Revision: 1.27 . - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.57. -+# Generated by GNU Autoconf 2.61. - # --# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 --# Free Software Foundation, Inc. -+# 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 Bourne compatible -+# 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+"$@"}'='"$@"' --elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then -- set -o posix -+ 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 (FOO=FOO; unset FOO) >/dev/null 2>&1; then -+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. --$as_unset ENV MAIL MAILPATH -+for as_var in ENV MAIL MAILPATH -+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+done - PS1='$ ' - PS2='> ' - PS4='+ ' -@@ -42,21 +106,22 @@ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME - do -- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ 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 -+ ($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; then -+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 -+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename - else - as_basename=false -@@ -64,206 +129,447 @@ - - - # Name of the executable. --as_me=`$as_basename "$0" || -+as_me=`$as_basename -- "$0" || - $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)$' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$0" : 'X\(/\)' \| . 2>/dev/null || - echo X/"$0" | -- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } -- /^X\/\(\/\/\)$/{ s//\1/; q; } -- /^X\/\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` - -+# CDPATH. -+$as_unset CDPATH - --# PATH needs CR, and LINENO needs CR and PATH. --# 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 -+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 - -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x$as_lineno_3" = "x$as_lineno_2" || { -- # Find who we are. Look in the path if we contain no path at all -- # relative or not. -- 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 -+if as_func_ret_success; then -+ : -+else -+ exitcode=1 -+ echo as_func_ret_success failed. -+fi - -- ;; -- 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_me: error: cannot find myself; rerun with an absolute path" >&2 -- { (exit 1); exit 1; }; } -- fi -- case $CONFIG_SHELL in -- '') -+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=. -- for as_base in sh bash ksh sh5; do -- case $as_dir in -+ case $as_dir in - /*) -- if ("$as_dir/$as_base" -c ' -+ 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 -- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then -- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } -- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } -- CONFIG_SHELL=$as_dir/$as_base -- export CONFIG_SHELL -- exec "$CONFIG_SHELL" "$0" ${1+"$@"} -- fi;; -- esac -- done --done --;; -- esac -+ 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 before each line; the second 'sed' does the real -- # work. The second script uses 'N' to pair each line-number line -- # with the numbered line, and appends trailing '-' during -- # substitution so that $LINENO is not a special case at line end. -+ # 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 -- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) -- sed '=' <$as_myself | -+ # 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 -- s,$,-, -- : loop -- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, -+ :loop -+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop -- s,-$,, -- s,^['$as_cr_digits']*\n,, -+ s/-\n.*// - ' >$as_me.lineno && -- chmod +x $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 sensible to this). -- . ./$as_me.lineno -+ # original and so on. Autoconf is especially sensitive to this). -+ . "./$as_me.lineno" - # Exit status is that of the last command. - exit - } - - --case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in -- *c*,-n*) ECHO_N= ECHO_C=' --' ECHO_T=' ' ;; -- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; -- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -+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; then -+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 -- # We could just check for DJGPP; but this test a) works b) is more generic -- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). -- if test -f conf$$.exe; then -- # Don't use ln at all; we don't have any links -+ 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' -- else -- as_ln_s='ln -s' -- fi - 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$$.file -+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 - --as_executable_p="test -f" -+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="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -+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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - --# IFS --# We need space, tab and new line, in precisely that order. --as_nl=' --' --IFS=" $as_nl" -- --# CDPATH. --$as_unset CDPATH - -+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` - --exec 6>&1 -- - # - # 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} - --# Maximum number of lines to put in a shell here document. --# This variable seems obsolete. It should probably be removed, and --# only ac_max_sed_lines should be used. --: ${ac_max_here_lines=38} -- - # Identity of this package. - PACKAGE_NAME= - PACKAGE_TARNAME= -@@ -275,42 +581,107 @@ - # Factoring default headers for most tests. - ac_includes_default="\ - #include --#if HAVE_SYS_TYPES_H -+#ifdef HAVE_SYS_TYPES_H - # include - #endif --#if HAVE_SYS_STAT_H -+#ifdef HAVE_SYS_STAT_H - # include - #endif --#if STDC_HEADERS -+#ifdef STDC_HEADERS - # include - # include - #else --# if HAVE_STDLIB_H -+# ifdef HAVE_STDLIB_H - # include - # endif - #endif --#if HAVE_STRING_H --# if !STDC_HEADERS && HAVE_MEMORY_H -+#ifdef HAVE_STRING_H -+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H - # include - # endif - # include - #endif --#if HAVE_STRINGS_H -+#ifdef HAVE_STRINGS_H - # include - #endif --#if HAVE_INTTYPES_H -+#ifdef HAVE_INTTYPES_H - # include --#else --# if HAVE_STDINT_H --# include --# endif - #endif --#if HAVE_UNISTD_H -+#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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS' -+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 -+VERSION -+ac_prefix_program -+CC -+CFLAGS -+LDFLAGS -+CPPFLAGS -+ac_ct_CC -+EXEEXT -+OBJEXT -+CPP -+GREP -+EGREP -+AWK -+INSTALL_PROGRAM -+INSTALL_SCRIPT -+INSTALL_DATA -+WRITEPATH -+XTERMPATH -+LIBOBJS -+LTLIBOBJS' - ac_subst_files='' -+ ac_precious_vars='build_alias -+host_alias -+target_alias -+CC -+CFLAGS -+LDFLAGS -+LIBS -+CPPFLAGS -+CPP' -+ - - # Initialize some variables set by options. - ac_init_help= -@@ -337,34 +708,48 @@ - # 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' --datadir='${prefix}/share' -+datarootdir='${prefix}/share' -+datadir='${datarootdir}' - sysconfdir='${prefix}/etc' - sharedstatedir='${prefix}/com' - localstatedir='${prefix}/var' --libdir='${exec_prefix}/lib' - includedir='${prefix}/include' - oldincludedir='/usr/include' --infodir='${prefix}/info' --mandir='${prefix}/man' -+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" -+ eval $ac_prev=\$ac_option - ac_prev= - continue - fi - -- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` -+ 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_option in -+ case $ac_dashdash$ac_option in -+ --) -+ ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; -@@ -386,33 +771,45 @@ - --config-cache | -C) - cache_file=config.cache ;; - -- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) -+ -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; -- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ -- | --da=*) -+ -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 && -+ 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" ;; -+ 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 && -+ 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'` -- case $ac_option in -- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; -- *) ac_optarg=yes ;; -- esac -- eval "enable_$ac_feature='$ac_optarg'" ;; -+ 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- \ -@@ -439,6 +836,12 @@ - -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 ;; -@@ -463,13 +866,16 @@ - | --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 | --local | --loca | --loc | --lo) -+ | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ -- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ -- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) -+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) -@@ -534,6 +940,16 @@ - | --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 ;; -@@ -586,24 +1002,20 @@ - -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 && -+ 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'` -- case $ac_option in -- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; -- *) ac_optarg=yes ;; -- esac -- eval "with_$ac_package='$ac_optarg'" ;; -+ 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 && -+ 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" ;; -+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` -+ eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. -@@ -634,8 +1046,7 @@ - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } -- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` -- eval "$ac_envvar='$ac_optarg'" -+ eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) -@@ -655,27 +1066,19 @@ - { (exit 1); exit 1; }; } - fi - --# Be sure to have absolute paths. --for ac_var in exec_prefix prefix --do -- eval ac_val=$`echo $ac_var` -- case $ac_val in -- [\\/$]* | ?:[\\/]* | NONE | '' ) ;; -- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -- { (exit 1); exit 1; }; };; -- esac --done -- --# Be sure to have absolute paths. --for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ -- localstatedir libdir includedir oldincludedir infodir mandir -+# 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=$`echo $ac_var` -+ eval ac_val=\$$ac_var - case $ac_val in -- [\\/$]* | ?:[\\/]* ) ;; -- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -- { (exit 1); exit 1; }; };; -+ [\\/$]* | ?:[\\/]* ) 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' -@@ -702,76 +1105,78 @@ - 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 its parent. -- ac_confdir=`(dirname "$0") 2>/dev/null || -+ # 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 || -+ 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'` -+ 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 -+ if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi - else - ac_srcdir_defaulted=no - fi --if test ! -r $srcdir/$ac_unique_file; then -- if test "$ac_srcdir_defaulted" = yes; then -- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 -- { (exit 1); exit 1; }; } -- else -- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -- { (exit 1); exit 1; }; } -- fi --fi --(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || -- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 -- { (exit 1); exit 1; }; } --srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` --ac_env_build_alias_set=${build_alias+set} --ac_env_build_alias_value=$build_alias --ac_cv_env_build_alias_set=${build_alias+set} --ac_cv_env_build_alias_value=$build_alias --ac_env_host_alias_set=${host_alias+set} --ac_env_host_alias_value=$host_alias --ac_cv_env_host_alias_set=${host_alias+set} --ac_cv_env_host_alias_value=$host_alias --ac_env_target_alias_set=${target_alias+set} --ac_env_target_alias_value=$target_alias --ac_cv_env_target_alias_set=${target_alias+set} --ac_cv_env_target_alias_value=$target_alias --ac_env_CC_set=${CC+set} --ac_env_CC_value=$CC --ac_cv_env_CC_set=${CC+set} --ac_cv_env_CC_value=$CC --ac_env_CFLAGS_set=${CFLAGS+set} --ac_env_CFLAGS_value=$CFLAGS --ac_cv_env_CFLAGS_set=${CFLAGS+set} --ac_cv_env_CFLAGS_value=$CFLAGS --ac_env_LDFLAGS_set=${LDFLAGS+set} --ac_env_LDFLAGS_value=$LDFLAGS --ac_cv_env_LDFLAGS_set=${LDFLAGS+set} --ac_cv_env_LDFLAGS_value=$LDFLAGS --ac_env_CPPFLAGS_set=${CPPFLAGS+set} --ac_env_CPPFLAGS_value=$CPPFLAGS --ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} --ac_cv_env_CPPFLAGS_value=$CPPFLAGS --ac_env_CPP_set=${CPP+set} --ac_env_CPP_value=$CPP --ac_cv_env_CPP_set=${CPP+set} --ac_cv_env_CPP_value=$CPP -- --# -+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 -@@ -798,14 +1203,11 @@ - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - --_ACEOF -- -- cat <<_ACEOF - Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX -- [$ac_default_prefix] -+ [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -- [PREFIX] -+ [PREFIX] - - By default, \`make install' will install all the files in - \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -@@ -818,15 +1220,22 @@ - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] -- --datadir=DIR read-only architecture-independent data [PREFIX/share] - --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] -- --infodir=DIR info documentation [PREFIX/info] -- --mandir=DIR man documentation [PREFIX/man] -+ --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 -@@ -860,94 +1269,95 @@ - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory -- CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have -- headers 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 - - 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. -- ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue -- test -d $ac_dir || continue -+ test -d "$ac_dir" || continue - ac_builddir=. - --if test "$ac_dir" != .; then -+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=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` --else -- ac_dir_suffix= ac_top_builddir= --fi -+ # 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 -- .) # No --srcdir option. We are building in place. -+ .) # We are building in place. - ac_srcdir=. -- if test -z "$ac_top_builddir"; then -- ac_top_srcdir=. -- else -- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` -- fi ;; -- [\\/]* | ?:[\\/]* ) # Absolute path. -+ 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 ;; -- *) # Relative path. -- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix -- ac_top_srcdir=$ac_top_builddir$srcdir ;; --esac --# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be --# absolute. --ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` --ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` --ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` --ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` -- -- cd $ac_dir -- # Check for guested configure; otherwise get Cygnus style 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 -- elif test -f $ac_srcdir/configure.ac || -- test -f $ac_srcdir/configure.in; then -- echo -- $ac_configure --help -+ 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 -- cd $ac_popdir -+ fi || ac_status=$? -+ cd "$ac_pwd" || { ac_status=$?; break; } - done - fi - --test -n "$ac_init_help" && exit 0 -+test -n "$ac_init_help" && exit $ac_status - if $ac_init_version; then - cat <<\_ACEOF -+configure -+generated by GNU Autoconf 2.61 - --Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 --Free Software Foundation, Inc. -+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 0 -+ exit - fi --exec 5>config.log --cat >&5 <<_ACEOF -+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.57. Invocation command line was -+generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - - _ACEOF -+exec 5>>config.log - { - cat <<_ASUNAME - ## --------- ## -@@ -966,7 +1376,7 @@ - /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` --hostinfo = `(hostinfo) 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` -@@ -980,6 +1390,7 @@ - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" - done -+IFS=$as_save_IFS - - } >&5 - -@@ -1001,7 +1412,6 @@ - ac_configure_args= - ac_configure_args0= - ac_configure_args1= --ac_sep= - ac_must_keep_next=false - for ac_pass in 1 2 - do -@@ -1012,7 +1422,7 @@ - -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 -@@ -1020,23 +1430,21 @@ - 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. -+ 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 -+ 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_sep'$ac_arg'" -- # Get rid of the leading space. -- ac_sep=" " -+ ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -@@ -1047,8 +1455,8 @@ - # 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: Be sure not to use single quotes in there, as some shells, --# such as our DU 5.0 friend, will then `close' the trap. -+# 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. - { -@@ -1061,20 +1469,34 @@ - _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 `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in -- *ac_space=\ *) -+ 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" -- ;; -+ "s/'\''/'\''\\\\'\'''\''/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" -+ ;; #( - *) -- sed -n \ -- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" -+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; -- esac; --} -+ esac | -+ sort -+) - echo - - cat <<\_ASBOX -@@ -1085,22 +1507,28 @@ - echo - for ac_var in $ac_subst_vars - do -- eval ac_val=$`echo $ac_var` -- echo "$ac_var='"'"'$ac_val'"'"'" -+ 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 --## ------------- ## --## Output files. ## --## ------------- ## -+## ------------------- ## -+## File substitutions. ## -+## ------------------- ## - _ASBOX - echo - for ac_var in $ac_subst_files - do -- eval ac_val=$`echo $ac_var` -- echo "$ac_var='"'"'$ac_val'"'"'" -+ 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 -@@ -1112,26 +1540,24 @@ - ## ----------- ## - _ASBOX - echo -- sed "/^$/d" confdefs.h | sort -+ 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 && -- rm -rf conftest* confdefs* conf$$* $ac_clean_files && -+ rm -f core *.core core.conftest.* && -+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -- ' 0 -+' 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 -rf conftest* confdefs.h --# AIX cpp loses on an empty file, so make sure it contains at least a newline. --echo >confdefs.h -+rm -f -r conftest* confdefs.h - - # Predefined preprocessor variables. - -@@ -1162,14 +1588,17 @@ - - # Let the site file select an alternate cache file if it wants to. - # Prefer explicitly selected file to automatically selected ones. --if test -z "$CONFIG_SITE"; then -- if test "x$prefix" != xNONE; then -- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" -- else -- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -- fi -+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 --for ac_site_file in $CONFIG_SITE; do -+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;} -@@ -1185,8 +1614,8 @@ - { 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;; -+ [\\/]* | ?:[\\/]* ) . "$cache_file";; -+ *) . "./$cache_file";; - esac - fi - else -@@ -1198,12 +1627,11 @@ - # Check that the precious variables saved in the cache have kept the same - # value. - ac_cache_corrupted=false --for ac_var in `(set) 2>&1 | -- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do -+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" -+ 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 -@@ -1216,20 +1644,19 @@ - ,);; - *) - 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:$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:$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:$LINENO: current value: $ac_new_val" >&5 - echo "$as_me: current value: $ac_new_val" >&2;} -- ac_cache_corrupted=: -+ 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=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in -@@ -1246,12 +1673,6 @@ - { (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 -- - - - -@@ -1268,9 +1689,14 @@ - - - -+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_config_headers="$ac_config_headers config.h" -+ac_config_headers="$ac_config_headers config.h" - - - -@@ -1285,8 +1711,8 @@ - echo $ECHO_N "checking for prefix by $ECHO_C" >&6 - # Extract the first word of "screen", so it can be a program name with args. - set dummy screen; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } - if test "${ac_cv_path_ac_prefix_program+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -@@ -1301,52 +1727,75 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_prefix_program="$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 - ac_prefix_program=$ac_cv_path_ac_prefix_program -- - if test -n "$ac_prefix_program"; then -- echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 --echo "${ECHO_T}$ac_prefix_program" >&6 -+ { echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 -+echo "${ECHO_T}$ac_prefix_program" >&6; } - else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -- if test -n $ac_prefix_program; then -- prefix=`(dirname "$ac_prefix_program") 2>/dev/null || -+ -+ if test -n "$ac_prefix_program"; then -+ prefix=`$as_dirname -- "$ac_prefix_program" || - $as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ -- X"$ac_prefix_program" : 'X\(//\)$' \| \ -- X"$ac_prefix_program" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ -+ X"$ac_prefix_program" : 'X\(//\)$' \| \ -+ X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || - echo X"$ac_prefix_program" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -- /^X\(\/\/\)[^/].*/{ s//\1/; q; } -- /^X\(\/\/\)$/{ s//\1/; q; } -- /^X\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -- prefix=`(dirname "$prefix") 2>/dev/null || -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ prefix=`$as_dirname -- "$prefix" || - $as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$prefix" : 'X\(//\)[^/]' \| \ -- X"$prefix" : 'X\(//\)$' \| \ -- X"$prefix" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$prefix" : 'X\(//\)[^/]' \| \ -+ X"$prefix" : 'X\(//\)$' \| \ -+ X"$prefix" : 'X\(/\)' \| . 2>/dev/null || - echo X"$prefix" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -- /^X\(\/\/\)[^/].*/{ s//\1/; q; } -- /^X\(\/\/\)$/{ s//\1/; q; } -- /^X\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` - fi - fi - -@@ -1354,8 +1803,8 @@ - echo $ECHO_N "checking for prefix by $ECHO_C" >&6 - # Extract the first word of "gzip", so it can be a program name with args. - set dummy gzip; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } - if test "${ac_cv_path_ac_prefix_program+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -@@ -1370,52 +1819,75 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_prefix_program="$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 - ac_prefix_program=$ac_cv_path_ac_prefix_program -- - if test -n "$ac_prefix_program"; then -- echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 --echo "${ECHO_T}$ac_prefix_program" >&6 -+ { echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 -+echo "${ECHO_T}$ac_prefix_program" >&6; } - else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -- if test -n $ac_prefix_program; then -- prefix=`(dirname "$ac_prefix_program") 2>/dev/null || -+ -+ if test -n "$ac_prefix_program"; then -+ prefix=`$as_dirname -- "$ac_prefix_program" || - $as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ -- X"$ac_prefix_program" : 'X\(//\)$' \| \ -- X"$ac_prefix_program" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ -+ X"$ac_prefix_program" : 'X\(//\)$' \| \ -+ X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || - echo X"$ac_prefix_program" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -- /^X\(\/\/\)[^/].*/{ s//\1/; q; } -- /^X\(\/\/\)$/{ s//\1/; q; } -- /^X\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -- prefix=`(dirname "$prefix") 2>/dev/null || -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ prefix=`$as_dirname -- "$prefix" || - $as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$prefix" : 'X\(//\)[^/]' \| \ -- X"$prefix" : 'X\(//\)$' \| \ -- X"$prefix" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$prefix" : 'X\(//\)[^/]' \| \ -+ X"$prefix" : 'X\(//\)$' \| \ -+ X"$prefix" : 'X\(/\)' \| . 2>/dev/null || - echo X"$prefix" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -- /^X\(\/\/\)[^/].*/{ s//\1/; q; } -- /^X\(\/\/\)$/{ s//\1/; q; } -- /^X\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` - fi - fi - -@@ -1429,8 +1901,8 @@ - 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 -+{ 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 -@@ -1443,32 +1915,34 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 -+ { 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 -+ { 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 -+{ 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 -@@ -1481,36 +1955,51 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 -+ { 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 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -- CC=$ac_ct_CC -+ 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. -+ 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 -+{ 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 -@@ -1523,74 +2012,34 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 --if test -z "$ac_cv_prog_CC"; then -- ac_ct_CC=$CC -- # 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_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_CC="cc" -- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done --done -- --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 -+ { 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 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -- CC=$ac_ct_CC --else -- CC="$ac_cv_prog_CC" --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 -+{ 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 -@@ -1604,7 +2053,7 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 -@@ -1615,6 +2064,7 @@ - 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. -@@ -1632,22 +2082,23 @@ - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$as_me:$LINENO: result: $CC" >&5 --echo "${ECHO_T}$CC" >&6 -+ { 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 -+ { 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 -+ 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 -+{ 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 -@@ -1660,36 +2111,38 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 -+ { 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 -+ { 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 -+ 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 -+{ 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 -@@ -1702,29 +2155,45 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 -+ { 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 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -+ - test -n "$ac_ct_CC" && break - done - -- CC=$ac_ct_CC -+ 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 -@@ -1737,27 +2206,40 @@ - { (exit 1); exit 1; }; } - - # Provide some information about the compiler. --echo "$as_me:$LINENO:" \ -- "checking for C compiler version" >&5 -+echo "$as_me:$LINENO: checking for C compiler version" >&5 - ac_compiler=`set X $ac_compile; echo $2` --{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 -- (eval $ac_compiler --version &5) 2>&5 -+{ (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); } --{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 -- (eval $ac_compiler -v &5) 2>&5 -+{ (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); } --{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 -- (eval $ac_compiler -V &5) 2>&5 -+{ (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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -1777,47 +2259,77 @@ - # 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" >&5 --echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 -+{ 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[^ ]*//'` --if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 -- (eval $ac_link_default) 2>&5 -+# -+# 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 -- # Find the output, starting from the most likely. This scheme is --# not robust to junk in `.', hence go to wildcards (a.*) only as a last --# resort. -- --# Be careful to initialize this variable, since it used to be cached. --# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. --ac_cv_exeext= --# b.out is created by i960 compilers. --for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -+ # 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 | *.o | *.obj ) -- ;; -- conftest.$ac_ext ) -- # This is the source file. -- ;; -+ *.$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;; -+ # We found the default executable, but exeext='' is most -+ # certainly right. -+ break;; - *.* ) -- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -- # FIXME: I believe we export ac_cv_exeext for Libtool, -- # but it would be cool to find out if it's true. Does anybody -- # maintain Libtool? --akim. -- export ac_cv_exeext -- 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;; -+ 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 - -@@ -1829,19 +2341,21 @@ - fi - - ac_exeext=$ac_cv_exeext --echo "$as_me:$LINENO: result: $ac_file" >&5 --echo "${ECHO_T}$ac_file" >&6 - --# Check the compiler produces executables we can run. If not, either -+# 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 -+{ 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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -1860,22 +2374,27 @@ - fi - fi - fi --echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -+{ 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 the compiler produces executables we can run. If not, either -+# 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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+{ 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 -@@ -1886,10 +2405,9 @@ - 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 | *.o | *.obj ) ;; -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -- export ac_cv_exeext -- break;; -+ break;; - * ) break;; - esac - done -@@ -1902,19 +2420,18 @@ - fi - - rm -f conftest$ac_cv_exeext --echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 --echo "${ECHO_T}$ac_cv_exeext" >&6 -+{ 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 -+{ 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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -1930,14 +2447,20 @@ - } - _ACEOF - rm -f conftest.o conftest.obj --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+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 `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do -+ 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 ) ;; -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -@@ -1955,17 +2478,16 @@ - - 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 -+{ 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 -+{ 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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -1984,41 +2506,87 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 -+ ac_compiler_gnu=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+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 -+{ 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 --CFLAGS="-g" --echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 --echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -+{ 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 -- cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" -+ 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 -@@ -2034,28 +2602,80 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -- (eval $ac_compile) 2>&5 -+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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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); }; }; then -+ (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 - --ac_cv_prog_cc_g=no -+ - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+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 -+{ 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 -@@ -2071,15 +2691,14 @@ - CFLAGS= - fi - fi --echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 --echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 --if test "${ac_cv_prog_cc_stdc+set}" = set; then -+{ 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_stdc=no -+ ac_cv_prog_cc_c89=no - ac_save_CC=$CC - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2107,6 +2726,21 @@ - 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);}; -@@ -2121,232 +2755,119 @@ - return 0; - } - _ACEOF --# Don't try gcc -ansi; that turns off useful extensions and --# breaks some systems' header files. --# AIX -qlanglvl=ansi --# Ultrix and OSF/1 -std1 --# HP-UX 10.20 and later -Ae --# HP-UX older versions -Aa -D_HPUX_SOURCE --# SVR4 -Xc -D__EXTENSIONS__ --for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -+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 { (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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- ac_cv_prog_cc_stdc=$ac_arg --break -+ (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 conftest.$ac_objext -+ -+rm -f core conftest.err conftest.$ac_objext -+ test "x$ac_cv_prog_cc_c89" != "xno" && break - done --rm -f conftest.$ac_ext conftest.$ac_objext -+rm -f conftest.$ac_ext - CC=$ac_save_CC - - fi -- --case "x$ac_cv_prog_cc_stdc" in -- x|xno) -- echo "$as_me:$LINENO: result: none needed" >&5 --echo "${ECHO_T}none needed" >&6 ;; -+# 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; } ;; - *) -- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 --echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 -- CC="$CC $ac_cv_prog_cc_stdc" ;; -+ 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 - --# Some people use a C++ compiler to compile C. Since we use `exit', --# in C++ we need to declare it. In case someone uses the same compiler --# for both compiling C and C++ we need to have the C++ compiler decide --# the declaration of exit, since it's the most demanding environment. --cat >conftest.$ac_ext <<_ACEOF --#ifndef __cplusplus -- choke me --#endif --_ACEOF --rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- for ac_declaration in \ -- ''\ -- '#include ' \ -- 'extern "C" void std::exit (int) throw (); using std::exit;' \ -- 'extern "C" void std::exit (int); using std::exit;' \ -- 'extern "C" void exit (int) throw ();' \ -- 'extern "C" void exit (int);' \ -- 'void exit (int);' -+ -+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_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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include --$ac_declaration --int --main () --{ --exit (42); -- ; -- return 0; --} -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ Syntax error - _ACEOF --rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- : --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --continue --fi --rm -f conftest.$ac_objext conftest.$ac_ext -- cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ --$ac_declaration --int --main () --{ --exit (42); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- break --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.$ac_objext conftest.$ac_ext --done --rm -f conftest* --if test -n "$ac_declaration"; then -- echo '#ifdef __cplusplus' >>confdefs.h -- echo $ac_declaration >>confdefs.h -- echo '#endif' >>confdefs.h --fi -- --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --fi --rm -f conftest.$ac_objext 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 -- --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 --#line $LINENO "configure" --/* 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -2355,12 +2876,12 @@ - # Broken: fails on valid input. - continue - fi -+ - rm -f conftest.err conftest.$ac_ext - -- # OK, works on sane cases. Now check whether non-existent headers -+ # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2368,23 +2889,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -2395,6 +2915,7 @@ - ac_preproc_ok=: - break - fi -+ - rm -f conftest.err conftest.$ac_ext - - done -@@ -2412,8 +2933,8 @@ - else - ac_cv_prog_CPP=$CPP - fi --echo "$as_me:$LINENO: result: $CPP" >&5 --echo "${ECHO_T}$CPP" >&6 -+{ 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 -@@ -2424,7 +2945,6 @@ - # 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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2435,25 +2955,24 @@ - #else - # include - #endif -- Syntax error -+ Syntax error - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -2462,12 +2981,12 @@ - # Broken: fails on valid input. - continue - fi -+ - rm -f conftest.err conftest.$ac_ext - -- # OK, works on sane cases. Now check whether non-existent headers -+ # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2475,23 +2994,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -2502,6 +3020,7 @@ - ac_preproc_ok=: - break - fi -+ - rm -f conftest.err conftest.$ac_ext - - done -@@ -2525,30 +3044,176 @@ - - - --echo "$as_me:$LINENO: checking for egrep" >&5 --echo $ECHO_N "checking for egrep... $ECHO_C" >&6 --if test "${ac_cv_prog_egrep+set}" = set; then -+{ 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 -- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 -- then ac_cv_prog_egrep='grep -E' -- else ac_cv_prog_egrep='egrep' -+ 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_prog_egrep" >&5 --echo "${ECHO_T}$ac_cv_prog_egrep" >&6 -- EGREP=$ac_cv_prog_egrep -+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } -+ EGREP="$ac_cv_path_EGREP" - - - if test $ac_cv_c_compiler_gnu = yes; then -- echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 --echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } - if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2568,7 +3233,6 @@ - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2585,116 +3249,93 @@ - - fi - fi --echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 --echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi - fi - --echo "$as_me:$LINENO: checking for library containing strerror" >&5 --echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for library containing strerror" >&5 -+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; } - if test "${ac_cv_search_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_strerror=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ -+/* 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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - char strerror (); - int - main () - { --strerror (); -+return strerror (); - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+for ac_lib in '' cposix; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ 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); }; }; then -- ac_cv_search_strerror="none required" -+ (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_search_strerror=$ac_res - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_strerror" = no; then -- for ac_lib in cposix; do -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" -- cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char strerror (); --int --main () --{ --strerror (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_search_strerror="-l$ac_lib" --break --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 -+ if test "${ac_cv_search_strerror+set}" = set; then -+ break - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- done -+done -+if test "${ac_cv_search_strerror+set}" = set; then -+ : -+else -+ ac_cv_search_strerror=no - fi -+rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 --echo "${ECHO_T}$ac_cv_search_strerror" >&6 --if test "$ac_cv_search_strerror" != no; then -- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" -+{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 -+echo "${ECHO_T}$ac_cv_search_strerror" >&6; } -+ac_res=$ac_cv_search_strerror -+if test "$ac_res" != no; then -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - fi - -@@ -2707,7 +3348,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2716,13 +3356,22 @@ - main(){exit(0);} - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -2745,9 +3394,11 @@ - fi - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ -+ - 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 -@@ -2756,7 +3407,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2765,13 +3415,22 @@ - main(){exit(0);} - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -2792,9 +3451,11 @@ - echo "$as_me: error: Can't run the compiler - sorry" >&2;} - { (exit 1); exit 1; }; } - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ -+ - 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 -@@ -2803,7 +3464,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -2818,13 +3478,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -2837,15 +3506,17 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - 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 -+{ 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 -@@ -2858,53 +3529,61 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ 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 -+ { 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 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -+ - test -n "$AWK" && break - done - - - ac_aux_dir= --for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do -- if test -f $ac_dir/install-sh; then -+for ac_dir in "$srcdir" "$srcdir/.." "$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 -+ 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 -+ 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 $srcdir/.. $srcdir/../.." >&5 --echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} -+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } - fi --ac_config_guess="$SHELL $ac_aux_dir/config.guess" --ac_config_sub="$SHELL $ac_aux_dir/config.sub" --ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -+ -+# These three variables are undocumented and unsupported, -+# and are intended to be withdrawn in a future Autoconf release. -+# They can cause serious problems if a builder's source tree is in a directory -+# whose full name contains unusual characters. -+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -+ - - # Find a good install program. We prefer a C program (faster), - # so one script is as good as another. But avoid the broken or -@@ -2917,9 +3596,10 @@ - # 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 -+{ 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 -@@ -2933,6 +3613,7 @@ - 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. -@@ -2940,40 +3621,41 @@ - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$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 -+ 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. We don't cache a -- # path for INSTALL within a source directory, because that will -+ # 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 path is relative. -+ # 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 -+{ 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. -@@ -2992,37 +3674,42 @@ - - - --echo "$as_me:$LINENO: checking if a system-wide socket dir should be used" >&5 --echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6 --# Check whether --enable-socket-dir or --disable-socket-dir was given. -+{ echo "$as_me:$LINENO: checking if a system-wide socket dir should be used" >&5 -+echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6; } -+# Check whether --enable-socket-dir was given. - if test "${enable_socket_dir+set}" = set; then -- enableval="$enable_socket_dir" -- -- echo "$as_me:$LINENO: result: no. ~/.screen will be used instead." >&5 --echo "${ECHO_T}no. ~/.screen will be used instead." >&6 -+ enableval=$enable_socket_dir; -+ { echo "$as_me:$LINENO: result: no. ~/.screen will be used instead." >&5 -+echo "${ECHO_T}no. ~/.screen will be used instead." >&6; } - - else - -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -- echo "$as_me:$LINENO: checking for the socket dir" >&5 --echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; } -+ { echo "$as_me:$LINENO: checking for the socket dir" >&5 -+echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6; } - SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")" - --# Check whether --with-socket-dir or --without-socket-dir was given. -+# Check whether --with-socket-dir was given. - if test "${with_socket_dir+set}" = set; then -- withval="$with_socket_dir" -- SOCKDIR="\"${withval}\"" --fi; -- echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5 --echo "${ECHO_T}${SOCKDIR}" >&6 -+ withval=$with_socket_dir; -+ case "${withval}" in -+ *\"*) SOCKDIR="${withval}" ;; -+ *) SOCKDIR="\"${withval}\"" ;; -+ esac -+ -+fi -+ -+ { echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5 -+echo "${ECHO_T}${SOCKDIR}" >&6; } - cat >>confdefs.h <<_ACEOF - #define SOCKDIR $SOCKDIR - _ACEOF - - - --fi; -+fi -+ - - - if test -n "$ISC"; then -@@ -3048,7 +3735,6 @@ - { echo "$as_me:$LINENO: checking mld library..." >&5 - echo "$as_me: checking mld library..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3064,25 +3750,33 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$oldlibs" -+ LIBS="$oldlibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - if test -r /dev/ptc; then - cat >>confdefs.h <<\_ACEOF - #define MIPS 1 -@@ -3091,7 +3785,6 @@ - { echo "$as_me:$LINENO: checking wait3..." >&5 - echo "$as_me: checking wait3..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3107,26 +3800,31 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ echo "$as_me:$LINENO: checking wait2..." >&5 -+ { echo "$as_me:$LINENO: checking wait2..." >&5 - echo "$as_me: checking wait2..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3142,17 +3840,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define USE_WAIT2 1 - _ACEOF -@@ -3162,10 +3866,15 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi - fi - -@@ -3173,7 +3882,6 @@ - { echo "$as_me:$LINENO: checking for Ultrix..." >&5 - echo "$as_me: checking for Ultrix..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3197,7 +3905,6 @@ - { echo "$as_me:$LINENO: checking Pyramid OSX..." >&5 - echo "$as_me: checking Pyramid OSX..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3213,17 +3920,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define OSX 1 - _ACEOF -@@ -3232,15 +3945,16 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$oldlibs" -+ LIBS="$oldlibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi - - { echo "$as_me:$LINENO: checking for butterfly..." >&5 - echo "$as_me: checking for butterfly..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3265,7 +3979,6 @@ - { echo "$as_me:$LINENO: checking for POSIX.1..." >&5 - echo "$as_me: checking for POSIX.1..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3294,7 +4007,6 @@ - { echo "$as_me:$LINENO: checking for System V..." >&5 - echo "$as_me: checking for System V..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3312,33 +4024,38 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - --cat >>confdefs.h <<\_ACEOF -+ cat >>confdefs.h <<\_ACEOF - #define SYSV 1 - _ACEOF - - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for sequent/ptx..." >&5 - echo "$as_me: checking for sequent/ptx..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3360,13 +4077,12 @@ - LIBS="$LIBS -lelf" - { echo "$as_me:$LINENO: checking SVR4..." >&5 - echo "$as_me: checking SVR4..." >&6;} --echo "$as_me:$LINENO: checking for ANSI C header files" >&5 --echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -+{ 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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3386,30 +4102,35 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 -+ ac_cv_header_stdc=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3431,7 +4152,6 @@ - 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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3456,21 +4176,21 @@ - : - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* 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')) -+ (('a' <= (c) && (c) <= 'i') \ -+ || ('j' <= (c) && (c) <= 'r') \ -+ || ('s' <= (c) && (c) <= 'z')) - # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) - #endif - -@@ -3481,19 +4201,28 @@ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) -- || toupper (i) != TOUPPER (i)) -- exit(2); -- exit (0); -+ || toupper (i) != TOUPPER (i)) -+ return 2; -+ return 0; - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -3506,12 +4235,14 @@ - ( exit $ac_status ) - ac_cv_header_stdc=no - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+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 -+{ 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 -@@ -3531,16 +4262,15 @@ - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.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 eval "test \"\${$as_ac_Header+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 - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3551,28 +4281,35 @@ - #include <$ac_header> - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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" -+ eval "$as_ac_Header=no" - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+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 -@@ -3584,7 +4321,6 @@ - - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3601,31 +4337,36 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - if test "${ac_cv_header_dwarf_h+set}" = set; then -- echo "$as_me:$LINENO: checking for dwarf.h" >&5 --echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for dwarf.h" >&5 -+echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6; } - if test "${ac_cv_header_dwarf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi --echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 --echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 -+echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6; } - else - # Is the header compilable? --echo "$as_me:$LINENO: checking dwarf.h usability" >&5 --echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking dwarf.h usability" >&5 -+echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3635,33 +4376,38 @@ - #include - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 -+ ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+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 dwarf.h presence" >&5 --echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking dwarf.h presence" >&5 -+echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3669,23 +4415,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -3693,52 +4438,45 @@ - - 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 -+{ 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 in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: dwarf.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: dwarf.h: present but cannot be compiled" >&5 - echo "$as_me: WARNING: dwarf.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: dwarf.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: dwarf.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: dwarf.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: dwarf.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: dwarf.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: dwarf.h: in the future, the compiler will take precedence" >&2;} -+ - ;; - esac --echo "$as_me:$LINENO: checking for dwarf.h" >&5 --echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for dwarf.h" >&5 -+echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6; } - if test "${ac_cv_header_dwarf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_cv_header_dwarf_h=$ac_header_preproc - fi --echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 --echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 -+echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6; } - - fi - if test $ac_cv_header_dwarf_h = yes; then -@@ -3751,19 +4489,18 @@ - - else - if test "${ac_cv_header_elf_h+set}" = set; then -- echo "$as_me:$LINENO: checking for elf.h" >&5 --echo $ECHO_N "checking for elf.h... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for elf.h" >&5 -+echo $ECHO_N "checking for elf.h... $ECHO_C" >&6; } - if test "${ac_cv_header_elf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi --echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 --echo "${ECHO_T}$ac_cv_header_elf_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 -+echo "${ECHO_T}$ac_cv_header_elf_h" >&6; } - else - # Is the header compilable? --echo "$as_me:$LINENO: checking elf.h usability" >&5 --echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking elf.h usability" >&5 -+echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3773,33 +4510,38 @@ - #include - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 -+ ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+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 elf.h presence" >&5 --echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking elf.h presence" >&5 -+echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3807,23 +4549,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -3831,52 +4572,45 @@ - - 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 -+{ 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 in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: elf.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: elf.h: present but cannot be compiled" >&5 - echo "$as_me: WARNING: elf.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: elf.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: elf.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: elf.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: elf.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: elf.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: elf.h: in the future, the compiler will take precedence" >&2;} -+ - ;; - esac --echo "$as_me:$LINENO: checking for elf.h" >&5 --echo $ECHO_N "checking for elf.h... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for elf.h" >&5 -+echo $ECHO_N "checking for elf.h... $ECHO_C" >&6; } - if test "${ac_cv_header_elf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_cv_header_elf_h=$ac_header_preproc - fi --echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 --echo "${ECHO_T}$ac_cv_header_elf_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 -+echo "${ECHO_T}$ac_cv_header_elf_h" >&6; } - - fi - if test $ac_cv_header_elf_h = yes; then -@@ -3898,20 +4632,21 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$oldlibs" -+ LIBS="$oldlibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for Solaris 2.x..." >&5 - echo "$as_me: checking for Solaris 2.x..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#if defined(__SVR4) && defined(__sun) -+#if defined(SVR4) && defined(sun) - yes - #endif - -@@ -3928,7 +4663,6 @@ - { echo "$as_me:$LINENO: checking BSD job jontrol..." >&5 - echo "$as_me: checking BSD job jontrol..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3957,17 +4691,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 "- you have jobcontrol" 1>&6 - cat >>confdefs.h <<\_ACEOF - #define BSDJOBS 1 -@@ -3977,15 +4717,16 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --echo "- you don't have jobcontrol" 1>&6 -+ echo "- you don't have jobcontrol" 1>&6 - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - --{ echo "$as_me:$LINENO: checking setreuid..." >&5 --echo "$as_me: checking setreuid..." >&6;} -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+ -+{ echo "$as_me:$LINENO: checking setresuid..." >&5 -+echo "$as_me: checking setresuid..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -3996,28 +4737,80 @@ - main () - { - --#ifdef __hpux - setresuid(0, 0, 0); --#else --setreuid(0, 0); --#endif - - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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 -+ cat >>confdefs.h <<\_ACEOF -+#define HAVE_SETRESUID 1 -+_ACEOF -+ -+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 -+{ echo "$as_me:$LINENO: checking setreuid..." >&5 -+echo "$as_me: checking setreuid..." >&6;} -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+setreuid(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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define HAVE_SETREUID 1 - _ACEOF -@@ -4026,12 +4819,14 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: checking seteuid..." >&5 - echo "$as_me: checking seteuid..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4042,7 +4837,7 @@ - main () - { - --#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(__sun) && defined(__SVR4)) || defined(ISC) || defined(sony_news) -+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) - seteuid_is_broken(0); - #else - seteuid(0); -@@ -4053,17 +4848,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define HAVE_SETEUID 1 - _ACEOF -@@ -4072,14 +4873,16 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - - { echo "$as_me:$LINENO: checking select..." >&5 - echo "$as_me: checking select..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4095,27 +4898,32 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$LIBS -lnet -lnsl" -+ LIBS="$LIBS -lnet -lnsl" - { echo "$as_me:$LINENO: checking select with $LIBS..." >&5 - echo "$as_me: checking select with $LIBS..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4131,30 +4939,40 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 -+ { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 - echo "$as_me: error: !!! no select - no screen" >&2;} - { (exit 1); exit 1; }; } - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking fifos..." >&5 - echo "$as_me: checking fifos..." >&6;} -@@ -4166,7 +4984,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4239,13 +5056,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -4260,8 +5086,10 @@ - echo "- your fifos are not usable" 1>&6 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - rm -f /tmp/conftest* - - if test -n "$fifo"; then -@@ -4275,7 +5103,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4328,13 +5155,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -4352,8 +5188,10 @@ - _ACEOF - fifobr=1 - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - rm -f /tmp/conftest* - fi - -@@ -4368,7 +5206,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4427,13 +5264,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -4448,8 +5294,10 @@ - echo "- your sockets are not usable" 1>&6 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - rm -f /tmp/conftest* - - if test -n "$sock"; then -@@ -4463,7 +5311,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4497,13 +5344,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -4522,8 +5378,10 @@ - _ACEOF - socknofs=1 - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - rm -f /tmp/conftest* - fi - -@@ -4541,11 +5399,7 @@ - echo "- as your fifos are broken lets use the sockets." 1>&6 - - else -- echo "- both sockets and fifos usable. let's take fifos." 1>&6 -- -- cat >>confdefs.h <<\_ACEOF --#define NAMEDPIPE 1 --_ACEOF -+ echo "- both sockets and fifos usable. let's take sockets." 1>&6 - - fi - else -@@ -4576,7 +5430,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4683,13 +5536,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -4707,13 +5569,14 @@ - _ACEOF - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ -+ - { echo "$as_me:$LINENO: checking for tgetent..." >&5 - echo "$as_me: checking for tgetent..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4729,28 +5592,33 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --olibs="$LIBS" --LIBS="-lcurses $olibs" --{ echo "$as_me:$LINENO: checking libcurses..." >&5 --echo "$as_me: checking libcurses..." >&6;} -+ olibs="$LIBS" -+LIBS="-lncursesw $olibs" -+{ echo "$as_me:$LINENO: checking libncursesw..." >&5 -+echo "$as_me: checking libncursesw..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4760,39 +5628,38 @@ - int - main () - { -- --#ifdef __hpux --__sorry_hpux_libcurses_is_totally_broken_in_10_10(); --#else - tgetent((char *)0, (char *)0); --#endif -- - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="-ltermcap $olibs" --{ echo "$as_me:$LINENO: checking libtermcap..." >&5 --echo "$as_me: checking libtermcap..." >&6;} -+ LIBS="-lncurses $olibs" -+{ echo "$as_me:$LINENO: checking libncurses..." >&5 -+echo "$as_me: checking libncurses..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4808,27 +5675,32 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="-ltermlib $olibs" --{ echo "$as_me:$LINENO: checking libtermlib..." >&5 --echo "$as_me: checking libtermlib..." >&6;} -+ LIBS="-lcurses $olibs" -+{ echo "$as_me:$LINENO: checking libcurses..." >&5 -+echo "$as_me: checking libcurses..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4838,33 +5710,44 @@ - int - main () - { -+ -+#ifdef __hpux -+__sorry_hpux_libcurses_is_totally_broken_in_10_10(); -+#else - tgetent((char *)0, (char *)0); -+#endif -+ - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="-lncurses $olibs" --{ echo "$as_me:$LINENO: checking libncurses..." >&5 --echo "$as_me: checking libncurses..." >&6;} -+ LIBS="-ltermcap $olibs" -+{ echo "$as_me:$LINENO: checking libtermcap..." >&5 -+echo "$as_me: checking libtermcap..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4880,35 +5763,96 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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 -+ : -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ LIBS="-ltermlib $olibs" -+{ echo "$as_me:$LINENO: checking libtermlib..." >&5 -+echo "$as_me: checking libtermlib..." >&6;} -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+tgetent((char *)0, (char *)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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 -+ { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 - echo "$as_me: error: !!! no tgetent - no screen" >&2;} - { (exit 1); exit 1; }; } - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+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 --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -@@ -4918,7 +5862,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4931,13 +5874,22 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -4955,12 +5907,13 @@ - _ACEOF - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - { echo "$as_me:$LINENO: checking ospeed..." >&5 - echo "$as_me: checking ospeed..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -4976,28 +5929,36 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --cat >>confdefs.h <<\_ACEOF -+ cat >>confdefs.h <<\_ACEOF - #define NEED_OSPEED 1 - _ACEOF - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for /dev/ptc..." >&5 - echo "$as_me: checking for /dev/ptc..." >&6;} -@@ -5013,7 +5974,6 @@ - sysvr4ptys= - if test -c /dev/ptmx ; then - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5029,17 +5989,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define HAVE_SVR4_PTYS 1 - _ACEOF -@@ -5049,86 +6015,99 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi - - - for ac_func in getpt - 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 eval "test \"\${$as_ac_var+set}\" = set"; then -+{ 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 --#line $LINENO "configure" - /* 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 --/* Override any gcc2 internal prototype to avoid an error. */ -+ -+#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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - 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) -+#if defined __stub_$ac_func || defined __stub___$ac_func - choke me --#else --char (*f) () = $ac_func; --#endif --#ifdef __cplusplus --} - #endif - - int - main () - { --return f != $ac_func; -+return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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" -+ eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -+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 -@@ -5143,138 +6122,155 @@ - for ac_func in openpty - 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 eval "test \"\${$as_ac_var+set}\" = set"; then -+{ 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 --#line $LINENO "configure" - /* 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 --/* Override any gcc2 internal prototype to avoid an error. */ -+ -+#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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - 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) -+#if defined __stub_$ac_func || defined __stub___$ac_func - choke me --#else --char (*f) () = $ac_func; --#endif --#ifdef __cplusplus --} - #endif - - int - main () - { --return f != $ac_func; -+return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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" -+ eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -+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 -- echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 --echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 -+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; } - if test "${ac_cv_lib_util_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lutil $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ -+/* 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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - char openpty (); - int - main () - { --openpty (); -+return openpty (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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_util_openpty=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --ac_cv_lib_util_openpty=no -+ ac_cv_lib_util_openpty=no - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+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_util_openpty" >&5 --echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 -+echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; } - if test $ac_cv_lib_util_openpty = yes; then - cat >>confdefs.h <<\_ACEOF - #define HAVE_OPENPTY 1 -@@ -5295,7 +6291,6 @@ - pdir='/dev' - fi - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5328,17 +6323,17 @@ - fi - - --# Check whether --with-pty-mode or --without-pty-mode was given. -+# Check whether --with-pty-mode was given. - if test "${with_pty_mode+set}" = set; then -- withval="$with_pty_mode" -- ptymode="${withval}" --fi; -+ withval=$with_pty_mode; ptymode="${withval}" -+fi - --# Check whether --with-pty-group or --without-pty-group was given. -+ -+# Check whether --with-pty-group was given. - if test "${with_pty_group+set}" = set; then -- withval="$with_pty_group" -- ptygrp="${withval}" --fi; -+ withval=$with_pty_group; ptygrp="${withval}" -+fi -+ - test -n "$ptymode" || ptymode=0620 - if test -n "$ptygrp" ; then - cat >>confdefs.h <<_ACEOF -@@ -5362,7 +6357,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5399,13 +6393,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -5438,8 +6441,8 @@ - XTERMPATH='' - # Extract the first word of "write", so it can be a program name with args. - set dummy write; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } - if test "${ac_cv_path_WRITEPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -@@ -5454,31 +6457,32 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_WRITEPATH="$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 - WRITEPATH=$ac_cv_path_WRITEPATH -- - if test -n "$WRITEPATH"; then -- echo "$as_me:$LINENO: result: $WRITEPATH" >&5 --echo "${ECHO_T}$WRITEPATH" >&6 -+ { echo "$as_me:$LINENO: result: $WRITEPATH" >&5 -+echo "${ECHO_T}$WRITEPATH" >&6; } - else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -+ - # Extract the first word of "xterm", so it can be a program name with args. - set dummy xterm; ac_word=$2 --echo "$as_me:$LINENO: checking for $ac_word" >&5 --echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } - if test "${ac_cv_path_XTERMPATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -@@ -5493,27 +6497,28 @@ - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do -- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XTERMPATH="$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 - XTERMPATH=$ac_cv_path_XTERMPATH -- - if test -n "$XTERMPATH"; then -- echo "$as_me:$LINENO: result: $XTERMPATH" >&5 --echo "${ECHO_T}$XTERMPATH" >&6 -+ { echo "$as_me:$LINENO: result: $XTERMPATH" >&5 -+echo "${ECHO_T}$XTERMPATH" >&6; } - else -- echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi - -+ - found= - if test -n "$WRITEPATH$XTERMPATH"; then - findfollow= -@@ -5555,15 +6560,16 @@ - - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - rm -f conftest_grp - fi - - { echo "$as_me:$LINENO: checking getutent..." >&5 - echo "$as_me: checking getutent..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5572,7 +6578,7 @@ - - #include /* to get time_t on SCO */ - #include --#if defined(__SVR4) && !defined(DGUX) -+#if defined(SVR4) && !defined(DGUX) - #include - #define utmp utmpx - #else -@@ -5591,17 +6597,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define GETUTENT 1 - _ACEOF -@@ -5610,12 +6622,11 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --olibs="$LIBS" -+ olibs="$LIBS" - LIBS="$LIBS -lgen" - { echo "$as_me:$LINENO: checking getutent with -lgen..." >&5 - echo "$as_me: checking getutent with -lgen..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5624,7 +6635,7 @@ - - #include - #include --#if defined(__SVR4) && !defined(DGUX) -+#if defined(SVR4) && !defined(DGUX) - #include - #define utmp utmpx - #else -@@ -5643,17 +6654,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define GETUTENT 1 - _ACEOF -@@ -5662,16 +6679,19 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$olibs" -+ LIBS="$olibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: checking ut_host..." >&5 - echo "$as_me: checking ut_host..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5680,7 +6700,7 @@ - - #include - #include --#if defined(__SVR4) && !defined(DGUX) -+#if defined(SVR4) && !defined(DGUX) - #include - #define utmp utmpx - #else -@@ -5696,17 +6716,22 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - cat >>confdefs.h <<\_ACEOF - #define UTHOST 1 - _ACEOF -@@ -5715,22 +6740,23 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "${ac_cv_header_utempter_h+set}" = set; then -- echo "$as_me:$LINENO: checking for utempter.h" >&5 --echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for utempter.h" >&5 -+echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6; } - if test "${ac_cv_header_utempter_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi --echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 --echo "${ECHO_T}$ac_cv_header_utempter_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 -+echo "${ECHO_T}$ac_cv_header_utempter_h" >&6; } - else - # Is the header compilable? --echo "$as_me:$LINENO: checking utempter.h usability" >&5 --echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking utempter.h usability" >&5 -+echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5740,33 +6766,38 @@ - #include - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 -+ ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+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 utempter.h presence" >&5 --echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking utempter.h presence" >&5 -+echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5774,23 +6805,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -5798,52 +6828,45 @@ - - 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 -+{ 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 in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: utempter.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: utempter.h: present but cannot be compiled" >&5 - echo "$as_me: WARNING: utempter.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: utempter.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: utempter.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: utempter.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: utempter.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: utempter.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: utempter.h: in the future, the compiler will take precedence" >&2;} -+ - ;; - esac --echo "$as_me:$LINENO: checking for utempter.h" >&5 --echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for utempter.h" >&5 -+echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6; } - if test "${ac_cv_header_utempter_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_cv_header_utempter_h=$ac_header_preproc - fi --echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 --echo "${ECHO_T}$ac_cv_header_utempter_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 -+echo "${ECHO_T}$ac_cv_header_utempter_h" >&6; } - - fi - if test $ac_cv_header_utempter_h = yes; then -@@ -5869,7 +6892,6 @@ - { echo "$as_me:$LINENO: checking getloadavg..." >&5 - echo "$as_me: checking getloadavg..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5885,17 +6907,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define LOADAV_GETLOADAVG 1 - _ACEOF -@@ -5904,13 +6932,12 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --if test -f /usr/lib/libkvm.a ; then -+ if test -f /usr/lib/libkvm.a ; then - olibs="$LIBS" - LIBS="$LIBS -lkvm" - { echo "$as_me:$LINENO: checking getloadavg with -lkvm..." >&5 - echo "$as_me: checking getloadavg with -lkvm..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5926,17 +6953,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define LOADAV_GETLOADAVG 1 - _ACEOF -@@ -5945,17 +6978,20 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$olibs" -+ LIBS="$olibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - if test -z "$load" ; then - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -5993,19 +7029,18 @@ - _ACEOF - - if test "${ac_cv_header_nlist_h+set}" = set; then -- echo "$as_me:$LINENO: checking for nlist.h" >&5 --echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for nlist.h" >&5 -+echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6; } - if test "${ac_cv_header_nlist_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi --echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 --echo "${ECHO_T}$ac_cv_header_nlist_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 -+echo "${ECHO_T}$ac_cv_header_nlist_h" >&6; } - else - # Is the header compilable? --echo "$as_me:$LINENO: checking nlist.h usability" >&5 --echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking nlist.h usability" >&5 -+echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6015,33 +7050,38 @@ - #include - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 -+ ac_header_compiler=no - fi --rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 --echo "${ECHO_T}$ac_header_compiler" >&6 -+ -+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 nlist.h presence" >&5 --echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking nlist.h presence" >&5 -+echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6049,23 +7089,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (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 -@@ -6073,52 +7112,45 @@ - - 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 -+{ 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 in -- yes:no ) -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) - { echo "$as_me:$LINENO: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: nlist.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes - ;; -- no:yes ) -+ no:yes:* ) - { echo "$as_me:$LINENO: WARNING: nlist.h: present but cannot be compiled" >&5 - echo "$as_me: WARNING: nlist.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: nlist.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: nlist.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: nlist.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: nlist.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;} -- ( -- cat <<\_ASBOX --## ------------------------------------ ## --## Report this to bug-autoconf@gnu.org. ## --## ------------------------------------ ## --_ASBOX -- ) | -- sed "s/^/$as_me: WARNING: /" >&2 -+ { echo "$as_me:$LINENO: WARNING: nlist.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: nlist.h: in the future, the compiler will take precedence" >&2;} -+ - ;; - esac --echo "$as_me:$LINENO: checking for nlist.h" >&5 --echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for nlist.h" >&5 -+echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6; } - if test "${ac_cv_header_nlist_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_cv_header_nlist_h=$ac_header_preproc - fi --echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 --echo "${ECHO_T}$ac_cv_header_nlist_h" >&6 -+{ echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 -+echo "${ECHO_T}$ac_cv_header_nlist_h" >&6; } - - fi - if test $ac_cv_header_nlist_h = yes; then -@@ -6129,7 +7161,6 @@ - { echo "$as_me:$LINENO: checking n_un in struct nlist..." >&5 - echo "$as_me: checking n_un in struct nlist..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6145,17 +7176,22 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - cat >>confdefs.h <<\_ACEOF - #define NLIST_NAME_UNION 1 - _ACEOF -@@ -6164,8 +7200,10 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - -@@ -6173,7 +7211,6 @@ - { echo "$as_me:$LINENO: checking for nlist declaration..." >&5 - echo "$as_me: checking for nlist declaration..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6209,7 +7246,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6246,13 +7282,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -6263,8 +7308,10 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ -+ - if test "$av" = _Loadavg; then - nlist64='#define nlist nlist64' - fi -@@ -6316,7 +7363,7 @@ - - _CUT_HERE_ - --#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(__sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(__SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) -+#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) - loadtype=long - # if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) - loadscale=65536 -@@ -6329,7 +7376,7 @@ - loadtype=int - loadscale=1024 - # else --# if defined(MIPS) || defined(__SVR4) || defined(m88k) -+# if defined(MIPS) || defined(SVR4) || defined(m88k) - loadscale=256 - # else /* not MIPS */ - loadscale=1000 /* our default value */ -@@ -6384,7 +7431,6 @@ - { echo "$as_me:$LINENO: checking return type of signal handlers..." >&5 - echo "$as_me: checking return type of signal handlers..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6405,17 +7451,22 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - cat >>confdefs.h <<\_ACEOF - #define SIGVOID 1 - _ACEOF -@@ -6424,12 +7475,13 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: checking sigset..." >&5 - echo "$as_me: checking sigset..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6454,17 +7506,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define USESIGSET 1 - _ACEOF -@@ -6473,8 +7531,11 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: checking signal implementation..." >&5 - echo "$as_me: checking signal implementation..." >&6;} - if test "$cross_compiling" = yes; then -@@ -6485,7 +7546,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6527,13 +7587,22 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -6549,9 +7618,11 @@ - _ACEOF - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ -+ - fi - - -@@ -6563,7 +7634,6 @@ - { echo "$as_me:$LINENO: checking crypt..." >&5 - echo "$as_me: checking crypt..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6579,25 +7649,33 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$oldlibs" -+ LIBS="$oldlibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" - test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" - oldlibs="$LIBS" -@@ -6605,7 +7683,6 @@ - { echo "$as_me:$LINENO: checking IRIX sun library..." >&5 - echo "$as_me: checking IRIX sun library..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6621,30 +7698,37 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$oldlibs" -+ LIBS="$oldlibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking syslog..." >&5 - echo "$as_me: checking syslog..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6660,28 +7744,33 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - : - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --oldlibs="$LIBS" -+ oldlibs="$LIBS" - LIBS="$LIBS -lbsd" - { echo "$as_me:$LINENO: checking syslog in libbsd.a..." >&5 - echo "$as_me: checking syslog in libbsd.a..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6697,36 +7786,45 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 "- found." 1>&6 - - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --LIBS="$oldlibs" -+ LIBS="$oldlibs" - echo "- bad news: syslog missing." 1>&6 - cat >>confdefs.h <<\_ACEOF - #define NOSYSLOG 1 - _ACEOF - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6747,7 +7845,6 @@ - { echo "$as_me:$LINENO: checking wait union..." >&5 - echo "$as_me: checking wait union..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6771,17 +7868,22 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - cat >>confdefs.h <<\_ACEOF - #define BSDWAIT 1 - _ACEOF -@@ -6790,14 +7892,15 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test -z "$butterfly"; then - { echo "$as_me:$LINENO: checking for termio or termios..." >&5 - echo "$as_me: checking for termio or termios..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6805,23 +7908,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then - cat >>confdefs.h <<\_ACEOF - #define TERMIO 1 - _ACEOF -@@ -6832,7 +7934,6 @@ - - if test -n "$posix"; then - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6840,23 +7941,22 @@ - /* end confdefs.h. */ - #include - _ACEOF --if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 -- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -+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; then -- if test -s conftest.err; then -- ac_cpp_err=$ac_c_preproc_warn_flag -- else -- ac_cpp_err= -- fi --else -- ac_cpp_err=yes --fi --if test -z "$ac_cpp_err"; then -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then - cat >>confdefs.h <<\_ACEOF - #define TERMIO 1 - _ACEOF -@@ -6867,17 +7967,18 @@ - - - fi -+ - rm -f conftest.err conftest.$ac_ext - fi - - fi -+ - rm -f conftest.err conftest.$ac_ext - fi - - { echo "$as_me:$LINENO: checking getspnam..." >&5 - echo "$as_me: checking getspnam..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6893,17 +7994,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define SHADOWPW 1 - _ACEOF -@@ -6912,13 +8019,15 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking getttyent..." >&5 - echo "$as_me: checking getttyent..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6934,17 +8043,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define GETTTYENT 1 - _ACEOF -@@ -6953,13 +8068,15 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking fdwalk..." >&5 - echo "$as_me: checking fdwalk..." >&6;} - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -6975,17 +8092,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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 - cat >>confdefs.h <<\_ACEOF - #define HAVE_FDWALK 1 - _ACEOF -@@ -6994,8 +8117,11 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5 - echo "$as_me: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&6;} -@@ -7007,7 +8133,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7028,13 +8153,22 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -7048,9 +8182,11 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ -+ - 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 -@@ -7059,7 +8195,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7081,13 +8216,22 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -7101,10 +8245,12 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - - -+ -+ - 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 -@@ -7113,7 +8259,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7135,13 +8280,22 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -7155,20 +8309,22 @@ - sed 's/^/| /' conftest.$ac_ext >&5 - - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - --echo "$as_me:$LINENO: checking long file names" >&5 --echo $ECHO_N "checking long file names... $ECHO_C" >&6 -+ -+ -+{ echo "$as_me:$LINENO: checking long file names" >&5 -+echo $ECHO_N "checking long file names... $ECHO_C" >&6; } - (echo 1 > /tmp/conftest9012345) 2>/dev/null - (echo 2 > /tmp/conftest9012346) 2>/dev/null - val=`cat /tmp/conftest9012345 2>/dev/null` - if test -f /tmp/conftest9012345 && test "$val" = 1; then --echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -+{ 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: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - cat >>confdefs.h <<\_ACEOF - #define NAME_MAX 14 - _ACEOF -@@ -7176,38 +8332,43 @@ - fi - rm -f /tmp/conftest* - --echo "$as_me:$LINENO: checking for vsprintf" >&5 --echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for vsprintf" >&5 -+echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -- -+#include - int - main () - { --vsprintf(0,0,0); -+va_list valist; vsprintf(0,0,valist); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -+ (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 "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF - #define USEVARARGS 1 - _ACEOF - -@@ -7215,10 +8376,12 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - - - -@@ -7228,13 +8391,12 @@ - ac_header_dirent=no - for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` --echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 --echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 --if eval "test \"\${$as_ac_Header+set}\" = set"; then -+{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -+echo $ECHO_N "checking for $ac_hdr that defines DIR... $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 --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7253,28 +8415,35 @@ - } - _ACEOF - rm -f conftest.$ac_objext --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); } && -- { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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" -+ eval "$as_ac_Header=no" - fi --rm -f conftest.$ac_objext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -+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_hdr" | $as_tr_cpp` 1 -@@ -7286,226 +8455,179 @@ - done - # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. - if test $ac_header_dirent = dirent.h; then -- echo "$as_me:$LINENO: checking for library containing opendir" >&5 --echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } - if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_opendir=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ -+/* 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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - char opendir (); - int - main () - { --opendir (); -+return opendir (); - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+for ac_lib in '' dir; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ 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); }; }; then -- ac_cv_search_opendir="none required" -+ (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_search_opendir=$ac_res - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_opendir" = no; then -- for ac_lib in dir; do -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" -- cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char opendir (); --int --main () --{ --opendir (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_search_opendir="-l$ac_lib" --break --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 -+ if test "${ac_cv_search_opendir+set}" = set; then -+ break - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- done -+done -+if test "${ac_cv_search_opendir+set}" = set; then -+ : -+else -+ ac_cv_search_opendir=no - fi -+rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 --echo "${ECHO_T}$ac_cv_search_opendir" >&6 --if test "$ac_cv_search_opendir" != no; then -- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" -+{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -+echo "${ECHO_T}$ac_cv_search_opendir" >&6; } -+ac_res=$ac_cv_search_opendir -+if test "$ac_res" != no; then -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - fi - - else -- echo "$as_me:$LINENO: checking for library containing opendir" >&5 --echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } - if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_opendir=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ -+/* 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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - char opendir (); - int - main () - { --opendir (); -+return opendir (); - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+for ac_lib in '' x; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ 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); }; }; then -- ac_cv_search_opendir="none required" -+ (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_search_opendir=$ac_res - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_opendir" = no; then -- for ac_lib in x; do -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" -- cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char opendir (); --int --main () --{ --opendir (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_search_opendir="-l$ac_lib" --break --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 -+ if test "${ac_cv_search_opendir+set}" = set; then -+ break - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- done -+done -+if test "${ac_cv_search_opendir+set}" = set; then -+ : -+else -+ ac_cv_search_opendir=no - fi -+rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 --echo "${ECHO_T}$ac_cv_search_opendir" >&6 --if test "$ac_cv_search_opendir" != no; then -- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" -+{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -+echo "${ECHO_T}$ac_cv_search_opendir" >&6; } -+ac_res=$ac_cv_search_opendir -+if test "$ac_res" != no; then -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - fi - - fi - - --echo "$as_me:$LINENO: checking for setenv" >&5 --echo $ECHO_N "checking for setenv... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for setenv" >&5 -+echo $ECHO_N "checking for setenv... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7521,19 +8643,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -+ (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 "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF - #define USESETENV 1 - _ACEOF - -@@ -7541,12 +8669,11 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 --echo "$as_me:$LINENO: checking for putenv" >&5 --echo $ECHO_N "checking for putenv... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } -+{ echo "$as_me:$LINENO: checking for putenv" >&5 -+echo $ECHO_N "checking for putenv... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7562,37 +8689,46 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6 -+ (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 "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; } - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\_ACEOF -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; };cat >>confdefs.h <<\_ACEOF - #define NEEDPUTENV 1 - _ACEOF - - - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --echo "$as_me:$LINENO: checking for nl_langinfo(CODESET)" >&5 --echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6 -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+{ echo "$as_me:$LINENO: checking for nl_langinfo(CODESET)" >&5 -+echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7610,19 +8746,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -+ (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 "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF - #define HAVE_NL_LANGINFO 1 - _ACEOF - -@@ -7630,114 +8772,93 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6 -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; } - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - --echo "$as_me:$LINENO: checking for library containing gethostname" >&5 --echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6 -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+ -+{ echo "$as_me:$LINENO: checking for library containing gethostname" >&5 -+echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6; } - if test "${ac_cv_search_gethostname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_func_search_save_LIBS=$LIBS --ac_cv_search_gethostname=no - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - --/* Override any gcc2 internal prototype to avoid an error. */ -+/* 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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - char gethostname (); - int - main () - { --gethostname (); -+return gethostname (); - ; - return 0; - } - _ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+for ac_lib in '' nsl; do -+ if test -z "$ac_lib"; then -+ ac_res="none required" -+ else -+ ac_res=-l$ac_lib -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ fi -+ 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); }; }; then -- ac_cv_search_gethostname="none required" -+ (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_search_gethostname=$ac_res - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -+ - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --if test "$ac_cv_search_gethostname" = no; then -- for ac_lib in nsl; do -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" -- cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char gethostname (); --int --main () --{ --gethostname (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_search_gethostname="-l$ac_lib" --break --else -- echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 - -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext -+ if test "${ac_cv_search_gethostname+set}" = set; then -+ break - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- done -+done -+if test "${ac_cv_search_gethostname+set}" = set; then -+ : -+else -+ ac_cv_search_gethostname=no - fi -+rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5 --echo "${ECHO_T}$ac_cv_search_gethostname" >&6 --if test "$ac_cv_search_gethostname" != no; then -- test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS" -+{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5 -+echo "${ECHO_T}$ac_cv_search_gethostname" >&6; } -+ac_res=$ac_cv_search_gethostname -+if test "$ac_res" != no; then -+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - fi - -@@ -7756,78 +8877,88 @@ - for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime - 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 eval "test \"\${$as_ac_var+set}\" = set"; then -+{ 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 --#line $LINENO "configure" - /* 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 --/* Override any gcc2 internal prototype to avoid an error. */ -+ -+#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 --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ - 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) -+#if defined __stub_$ac_func || defined __stub___$ac_func - choke me --#else --char (*f) () = $ac_func; --#endif --#ifdef __cplusplus --} - #endif - - int - main () - { --return f != $ac_func; -+return $ac_func (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -+ (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" -+ eval "$as_ac_var=no" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 --echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -+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 -@@ -7837,18 +8968,17 @@ - done - - --# Check whether --enable-pam or --disable-pam was given. -+# Check whether --enable-pam was given. - if test "${enable_pam+set}" = set; then -- enableval="$enable_pam" -+ enableval=$enable_pam; -+fi - --fi; - if test "$enable_pam" = "yes"; then -- echo "$as_me:$LINENO: checking for PAM support" >&5 --echo $ECHO_N "checking for PAM support... $ECHO_C" >&6 -+ { echo "$as_me:$LINENO: checking for PAM support" >&5 -+echo $ECHO_N "checking for PAM support... $ECHO_C" >&6; } - oldlibs="$LIBS" - LIBS="$LIBS -lpam" - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7868,19 +8998,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --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); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -+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); }; }; then -- echo "$as_me:$LINENO: result: yes" >&5 --echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF -+ (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 "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF - #define USE_PAM 1 - _ACEOF - -@@ -7888,50 +9024,52 @@ - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$as_me:$LINENO: result: no" >&5 --echo "${ECHO_T}no" >&6;LIBS="$oldlibs" -+ { echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6; };LIBS="$oldlibs" - fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi - --# Check whether --enable-use_locale or --disable-use_locale was given. -+# Check whether --enable-use_locale was given. - if test "${enable_use_locale+set}" = set; then -- enableval="$enable_use_locale" -+ enableval=$enable_use_locale; -+fi - --fi; - if test "$enable_use_locale" = "yes"; then - cat >>confdefs.h <<\_ACEOF - #define USE_LOCALE 1 - _ACEOF - - fi --# Check whether --enable-telnet or --disable-telnet was given. -+# Check whether --enable-telnet was given. - if test "${enable_telnet+set}" = set; then -- enableval="$enable_telnet" -+ enableval=$enable_telnet; -+fi - --fi; - if test "$enable_telnet" = "yes"; then - cat >>confdefs.h <<\_ACEOF - #define BUILTIN_TELNET 1 - _ACEOF - - fi --# Check whether --enable-colors256 or --disable-colors256 was given. -+# Check whether --enable-colors256 was given. - if test "${enable_colors256+set}" = set; then -- enableval="$enable_colors256" -+ enableval=$enable_colors256; -+fi - --fi; - if test "$enable_colors256" = "yes"; then - cat >>confdefs.h <<\_ACEOF - #define COLORS256 1 - _ACEOF - - fi --# Check whether --enable-rxvt_osc or --disable-rxvt_osc was given. -+# Check whether --enable-rxvt_osc was given. - if test "${enable_rxvt_osc+set}" = set; then -- enableval="$enable_rxvt_osc" -+ enableval=$enable_rxvt_osc; -+fi - --fi; - if test "$enable_rxvt_osc" = "yes"; then - cat >>confdefs.h <<\_ACEOF - #define RXVT_OSC 1 -@@ -7954,7 +9092,6 @@ - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line $LINENO "configure" - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext -@@ -7963,13 +9100,22 @@ - main(){exit(0);} - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -+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' -- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&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_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -@@ -7984,44 +9130,48 @@ - echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;} - { (exit 1); exit 1; }; } - fi --rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ -+ - ETCSCREENRC="\"/usr/local/etc/screenrc\"" - if test -n "$prefix"; then - ETCSCREENRC="\"$prefix/etc/screenrc\"" - fi --echo "$as_me:$LINENO: checking for the global screenrc file" >&5 --echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for the global screenrc file" >&5 -+echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6; } - --# Check whether --with-sys-screenrc or --without-sys-screenrc was given. -+# Check whether --with-sys-screenrc was given. - if test "${with_sys_screenrc+set}" = set; then -- withval="$with_sys_screenrc" -- ETCSCREENRC="\"${withval}\"" --fi; -+ withval=$with_sys_screenrc; ETCSCREENRC="\"${withval}\"" -+fi -+ - cat >>confdefs.h <<_ACEOF - #define ETCSCREENRC $ETCSCREENRC - _ACEOF - --echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5 --echo "${ECHO_T}$ETCSCREENRC" >&6 -+{ echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5 -+echo "${ECHO_T}$ETCSCREENRC" >&6; } - - SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" - if test -n "$datadir"; then - eval SCREENENCODINGS="$datadir/screen/utf8encodings" --SCREENENCODINGS="\"$SCREENENCODINGS\"" -+eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\"" - fi --echo "$as_me:$LINENO: checking for the utf8-encodings location" >&5 --echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6 -+{ echo "$as_me:$LINENO: checking for the utf8-encodings location" >&5 -+echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6; } - cat >>confdefs.h <<_ACEOF - #define SCREENENCODINGS $SCREENENCODINGS - _ACEOF - --echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5 --echo "${ECHO_T}$SCREENENCODINGS" >&6 -+{ echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5 -+echo "${ECHO_T}$SCREENENCODINGS" >&6; } -+ -+ac_config_files="$ac_config_files Makefile doc/Makefile" -+ -+ac_config_commands="$ac_config_commands default" - -- ac_config_files="$ac_config_files Makefile doc/Makefile" -- ac_config_commands="$ac_config_commands default" - 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 -@@ -8040,39 +9190,58 @@ - - # 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. -+# 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 `(ac_space=' '; set | grep ac_space) 2>&1` in -- *ac_space=\ *) -+ 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" -- ;; -+ "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 \ -- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" -+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; -- esac; --} | -+ esac | -+ sort -+) | - sed ' -+ /^ac_cv_env_/b end - t clear -- : clear -+ :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end -- /^ac_cv_env/!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 "updating cache $cache_file" -+ 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 "not updating unwritable cache $cache_file" -+ { 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 -@@ -8081,32 +9250,18 @@ - # Let make expand exec_prefix. - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - --# 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 -- - 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_i=`echo "$ac_i" | -- sed 's/\$U\././;s/\.o$//;s/\.obj$//'` -- # 2. Add them. -- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" -- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -+ 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 - -@@ -8137,27 +9292,91 @@ - ## M4sh Initialization. ## - ## --------------------- ## - --# Be Bourne compatible -+# 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+"$@"}'='"$@"' --elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then -- set -o posix -+ 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 (FOO=FOO; unset FOO) >/dev/null 2>&1; then -+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. --$as_unset ENV MAIL MAILPATH -+for as_var in ENV MAIL MAILPATH -+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+done - PS1='$ ' - PS2='> ' - PS4='+ ' -@@ -8168,21 +9387,22 @@ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME - do -- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then -+ 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 -+ ($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; then -+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 -+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename - else - as_basename=false -@@ -8190,200 +9410,166 @@ - - - # Name of the executable. --as_me=`$as_basename "$0" || -+as_me=`$as_basename -- "$0" || - $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)$' \| \ -- . : '\(.\)' 2>/dev/null || -+ X"$0" : 'X\(/\)' \| . 2>/dev/null || - echo X/"$0" | -- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } -- /^X\/\(\/\/\)$/{ s//\1/; q; } -- /^X\/\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -- -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` - --# PATH needs CR, and LINENO needs CR and PATH. --# 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 -+# CDPATH. -+$as_unset CDPATH - --# 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 - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO -- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x$as_lineno_3" = "x$as_lineno_2" || { -- # Find who we are. Look in the path if we contain no path at all -- # relative or not. -- 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 -- -- ;; -- 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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 --echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} -- { (exit 1); exit 1; }; } -- fi -- case $CONFIG_SHELL in -- '') -- 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=. -- for as_base in sh bash ksh sh5; do -- case $as_dir in -- /*) -- if ("$as_dir/$as_base" -c ' -- as_lineno_1=$LINENO -- as_lineno_2=$LINENO -- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` -- test "x$as_lineno_1" != "x$as_lineno_2" && -- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then -- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } -- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } -- CONFIG_SHELL=$as_dir/$as_base -- export CONFIG_SHELL -- exec "$CONFIG_SHELL" "$0" ${1+"$@"} -- fi;; -- esac -- done --done --;; -- esac -+ 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 before each line; the second 'sed' does the real -- # work. The second script uses 'N' to pair each line-number line -- # with the numbered line, and appends trailing '-' during -- # substitution so that $LINENO is not a special case at line end. -+ # 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 -- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) -- sed '=' <$as_myself | -+ # 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 -- s,$,-, -- : loop -- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, -+ :loop -+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop -- s,-$,, -- s,^['$as_cr_digits']*\n,, -+ s/-\n.*// - ' >$as_me.lineno && -- chmod +x $as_me.lineno || -- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 --echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} -+ 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 sensible to this). -- . ./$as_me.lineno -+ # original and so on. Autoconf is especially sensitive to this). -+ . "./$as_me.lineno" - # Exit status is that of the last command. - exit - } - - --case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in -- *c*,-n*) ECHO_N= ECHO_C=' --' ECHO_T=' ' ;; -- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; -- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -+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; then -+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 -- # We could just check for DJGPP; but this test a) works b) is more generic -- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). -- if test -f conf$$.exe; then -- # Don't use ln at all; we don't have any links -+ 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' -- else -- as_ln_s='ln -s' -- fi - 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$$.file -+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 - --as_executable_p="test -f" -+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="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -+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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -- -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - --# IFS --# We need space, tab and new line, in precisely that order. --as_nl=' --' --IFS=" $as_nl" -- --# CDPATH. --$as_unset CDPATH - - exec 6>&1 - --# Open the log real soon, to keep \$[0] and so on meaningful, and to -+# 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. Logging --version etc. is OK. --exec 5>>config.log --{ -- echo -- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX --## Running $as_me. ## --_ASBOX --} >&5 --cat >&5 <<_CSEOF -- -+# values after options handling. -+ac_log=" - This file was extended by $as_me, which was --generated by GNU Autoconf 2.57. Invocation command line was -+generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -8391,30 +9577,20 @@ - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - --_CSEOF --echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 --echo >&5 -+on `(hostname || uname -n) 2>/dev/null | sed 1q` -+" -+ - _ACEOF - -+cat >>$CONFIG_STATUS <<_ACEOF - # Files that config.status was made for. --if test -n "$ac_config_files"; then -- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS --fi -- --if test -n "$ac_config_headers"; then -- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS --fi -- --if test -n "$ac_config_links"; then -- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS --fi -+config_files="$ac_config_files" -+config_headers="$ac_config_headers" -+config_commands="$ac_config_commands" - --if test -n "$ac_config_commands"; then -- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS --fi -+_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF -- - ac_cs_usage="\ - \`$as_me' instantiates files from templates according to the - current configuration. -@@ -8422,14 +9598,14 @@ - Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit -- -V, --version print version number, 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 -+ instantiate the configuration file FILE - --header=FILE[:TEMPLATE] -- instantiate the configuration header FILE -+ instantiate the configuration header FILE - - Configuration files: - $config_files -@@ -8441,20 +9617,21 @@ - $config_commands - - Report bugs to ." --_ACEOF - -+_ACEOF - cat >>$CONFIG_STATUS <<_ACEOF - ac_cs_version="\\ - config.status --configured by $0, generated by GNU Autoconf 2.57, -- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -+configured by $0, generated by GNU Autoconf 2.61, -+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - --Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+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." --srcdir=$srcdir --INSTALL="$INSTALL" -+ -+ac_pwd='$ac_pwd' -+srcdir='$srcdir' -+INSTALL='$INSTALL' - _ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF -@@ -8465,39 +9642,24 @@ - do - case $1 in - --*=*) -- ac_option=`expr "x$1" : 'x\([^=]*\)='` -- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` -+ ac_option=`expr "X$1" : 'X\([^=]*\)='` -+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; -- -*) -+ *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; -- *) # This is not an option, so the user has probably given explicit -- # arguments. -- ac_option=$1 -- ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. --_ACEOF --cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; -- --version | --vers* | -V ) -- echo "$ac_cs_version"; exit 0 ;; -- --he | --h) -- # Conflict between --help and --header -- { { echo "$as_me:$LINENO: error: ambiguous option: $1 --Try \`$0 --help' for more information." >&5 --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 0 ;; -- --debug | --d* | -d ) -+ --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 -@@ -8507,18 +9669,24 @@ - $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:$LINENO: error: unrecognized option: $1 --Try \`$0 --help' for more information." >&5 --echo "$as_me: error: unrecognized option: $1 --Try \`$0 --help' for more information." >&2;} -+ -*) { 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_config_targets="$ac_config_targets $1" -+ ac_need_defaults=false ;; - - esac - shift -@@ -8534,31 +9702,45 @@ - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF - if \$ac_cs_recheck; then -- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 -- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -+ 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 -+_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF -+ -+# Handling of arguments. - for ac_config_target in $ac_config_targets - do -- case "$ac_config_target" in -- # Handling of arguments. -- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; -- "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; -- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; -- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; -+ case $ac_config_target in -+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; -+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; -+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; -+ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; -+ - *) { { 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 -@@ -8570,587 +9752,521 @@ - fi - - # Have a temporary directory for convenience. Make it in the build tree --# simply because there is no reason to put it here, and in addition, -+# simply because there is no reason against having it here, and in addition, - # creating and moving files from /tmp can sometimes cause problems. --# Create a temporary directory, and hook for its removal unless debugging. -+# 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 || - { -- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 -+ 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 -q "./confstatXXXXXX") 2>/dev/null` && -+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" - } || - { -- tmp=./confstat$$-$RANDOM -- (umask 077 && mkdir $tmp) -+ tmp=./conf$$-$RANDOM -+ (umask 077 && mkdir "$tmp") - } || - { - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } - } - --_ACEOF -- --cat >>$CONFIG_STATUS <<_ACEOF -- - # --# CONFIG_FILES section. -+# 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 -- # Protect against being on the right side of a sed subst in config.status. -- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; -- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF --s,@SHELL@,$SHELL,;t t --s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t --s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t --s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t --s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t --s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t --s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t --s,@exec_prefix@,$exec_prefix,;t t --s,@prefix@,$prefix,;t t --s,@program_transform_name@,$program_transform_name,;t t --s,@bindir@,$bindir,;t t --s,@sbindir@,$sbindir,;t t --s,@libexecdir@,$libexecdir,;t t --s,@datadir@,$datadir,;t t --s,@sysconfdir@,$sysconfdir,;t t --s,@sharedstatedir@,$sharedstatedir,;t t --s,@localstatedir@,$localstatedir,;t t --s,@libdir@,$libdir,;t t --s,@includedir@,$includedir,;t t --s,@oldincludedir@,$oldincludedir,;t t --s,@infodir@,$infodir,;t t --s,@mandir@,$mandir,;t t --s,@build_alias@,$build_alias,;t t --s,@host_alias@,$host_alias,;t t --s,@target_alias@,$target_alias,;t t --s,@DEFS@,$DEFS,;t t --s,@ECHO_C@,$ECHO_C,;t t --s,@ECHO_N@,$ECHO_N,;t t --s,@ECHO_T@,$ECHO_T,;t t --s,@LIBS@,$LIBS,;t t --s,@VERSION@,$VERSION,;t t --s,@ac_prefix_program@,$ac_prefix_program,;t t --s,@CC@,$CC,;t t --s,@CFLAGS@,$CFLAGS,;t t --s,@LDFLAGS@,$LDFLAGS,;t t --s,@CPPFLAGS@,$CPPFLAGS,;t t --s,@ac_ct_CC@,$ac_ct_CC,;t t --s,@EXEEXT@,$EXEEXT,;t t --s,@OBJEXT@,$OBJEXT,;t t --s,@CPP@,$CPP,;t t --s,@EGREP@,$EGREP,;t t --s,@AWK@,$AWK,;t t --s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t --s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t --s,@INSTALL_DATA@,$INSTALL_DATA,;t t --s,@WRITEPATH@,$WRITEPATH,;t t --s,@XTERMPATH@,$XTERMPATH,;t t --s,@LIBOBJS@,$LIBOBJS,;t t --s,@LTLIBOBJS@,$LTLIBOBJS,;t t --CEOF -- --_ACEOF -- -- cat >>$CONFIG_STATUS <<\_ACEOF -- # Split the substitutions into bite-sized pieces for seds with -- # small command number limits, like on Digital OSF/1 and HP-UX. -- ac_max_sed_lines=48 -- ac_sed_frag=1 # Number of current file. -- ac_beg=1 # First line for current file. -- ac_end=$ac_max_sed_lines # Line after last line for current file. -- ac_more_lines=: -- ac_sed_cmds= -- while $ac_more_lines; do -- if test $ac_beg -gt 1; then -- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag -- else -- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag -- fi -- if test ! -s $tmp/subs.frag; then -- ac_more_lines=false -- else -- # The purpose of the label and of the branching condition is to -- # speed up the sed processing (if there are no `@' at all, there -- # is no need to browse any of the substitutions). -- # These are the two extra sed commands mentioned above. -- (echo ':t -- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed -- if test -z "$ac_sed_cmds"; then -- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" -- else -- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" -- fi -- ac_sed_frag=`expr $ac_sed_frag + 1` -- ac_beg=$ac_end -- ac_end=`expr $ac_end + $ac_max_sed_lines` -- fi -- done -- if test -z "$ac_sed_cmds"; then -- ac_sed_cmds=cat -+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 -+VERSION!$VERSION$ac_delim -+ac_prefix_program!$ac_prefix_program$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 -+CPP!$CPP$ac_delim -+GREP!$GREP$ac_delim -+EGREP!$EGREP$ac_delim -+AWK!$AWK$ac_delim -+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -+INSTALL_DATA!$INSTALL_DATA$ac_delim -+WRITEPATH!$WRITEPATH$ac_delim -+XTERMPATH!$XTERMPATH$ac_delim -+LIBOBJS!$LIBOBJS$ac_delim -+LTLIBOBJS!$LTLIBOBJS$ac_delim -+_ACEOF -+ -+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 57; 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 --fi # test -n "$CONFIG_FILES" -+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 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 --for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue -- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". -- case $ac_file in -- - | *:- | *:-:* ) # input from stdin -- cat >$tmp/stdin -- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -- * ) ac_file_in=$ac_file.in ;; -+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 - -- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. -- ac_dir=`(dirname "$ac_file") 2>/dev/null || -+ 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 || -+ 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'` -- { if $as_mkdir_p; then -- mkdir -p "$ac_dir" -- else -- as_dir="$ac_dir" -+ 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 test ! -d "$as_dir"; do -- as_dirs="$as_dir $as_dirs" -- as_dir=`(dirname "$as_dir") 2>/dev/null || -+ 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 || -+ 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'` -+ 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 ! -n "$as_dirs" || mkdir $as_dirs -- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 --echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -+ 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=. - --if test "$ac_dir" != .; then -+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=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` --else -- ac_dir_suffix= ac_top_builddir= --fi -+ # 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 -- .) # No --srcdir option. We are building in place. -+ .) # We are building in place. - ac_srcdir=. -- if test -z "$ac_top_builddir"; then -- ac_top_srcdir=. -- else -- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` -- fi ;; -- [\\/]* | ?:[\\/]* ) # Absolute path. -+ 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 ;; -- *) # Relative path. -- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix -- ac_top_srcdir=$ac_top_builddir$srcdir ;; --esac --# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be --# absolute. --ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` --ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` --ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` --ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` -+ 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_builddir$INSTALL ;; -+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -+_ACEOF - -- if test x"$ac_file" != x-; then -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -- rm -f "$ac_file" -- fi -- # 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. */ -- if test x"$ac_file" = x-; then -- configure_input= -- else -- configure_input="$ac_file. " -- fi -- configure_input=$configure_input"Generated from `echo $ac_file_in | -- sed 's,.*/,,'` by configure." -- -- # First look for the input files in the build tree, otherwise in the -- # src tree. -- ac_file_inputs=`IFS=: -- for f in $ac_file_in; do -- case $f in -- -) echo $tmp/stdin ;; -- [\\/$]*) -- # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 --echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -- echo $f;; -- *) # Relative -- if test -f "$f"; then -- # Build tree -- echo $f -- elif test -f "$srcdir/$f"; then -- # Source tree -- echo $srcdir/$f -- else -- # /dev/null tree -- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 --echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -- fi;; -- esac -- done` || { (exit 1); exit 1; } -+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,@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,@top_builddir@,$ac_top_builddir,;t t --s,@abs_top_builddir@,$ac_abs_top_builddir,;t t --s,@INSTALL@,$ac_INSTALL,;t t --" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out -- rm -f $tmp/stdin -- if test x"$ac_file" != x-; then -- mv $tmp/out $ac_file -- else -- cat $tmp/out -- rm -f $tmp/out -- fi -- --done --_ACEOF --cat >>$CONFIG_STATUS <<\_ACEOF -- --# --# CONFIG_HEADER section. --# -- --# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where --# NAME is the cpp macro being defined and VALUE is the value it is being given. --# --# ac_d sets the value in "#define NAME VALUE" lines. --ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' --ac_dB='[ ].*$,\1#\2' --ac_dC=' ' --ac_dD=',;t' --# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". --ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' --ac_uB='$,\1#\2define\3' --ac_uC=' ' --ac_uD=',;t' -+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 -+$ac_datarootdir_hack -+" $ac_file_inputs | sed -f "$tmp/subs-1.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;} - --for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue -- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". -+ rm -f "$tmp/stdin" - case $ac_file in -- - | *:- | *:-:* ) # input from stdin -- cat >$tmp/stdin -- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; -- * ) ac_file_in=$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=' ,' - -- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -- -- # First look for the input files in the build tree, otherwise in the -- # src tree. -- ac_file_inputs=`IFS=: -- for f in $ac_file_in; do -- case $f in -- -) echo $tmp/stdin ;; -- [\\/$]*) -- # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 --echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -- echo $f;; -- *) # Relative -- if test -f "$f"; then -- # Build tree -- echo $f -- elif test -f "$srcdir/$f"; then -- # Source tree -- echo $srcdir/$f -- else -- # /dev/null tree -- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 --echo "$as_me: error: cannot find input file: $f" >&2;} -- { (exit 1); exit 1; }; } -- fi;; -- esac -- done` || { (exit 1); exit 1; } -- # Remove the trailing spaces. -- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -- --_ACEOF -- --# Transform confdefs.h into two sed scripts, `conftest.defines' and --# `conftest.undefs', that substitutes the proper values into --# config.h.in to produce config.h. The first handles `#define' --# templates, and the second `#undef' templates. --# And first: Protect against being on the right side of a sed subst in --# config.status. Protect against being in an unquoted here document --# in config.status. --rm -f conftest.defines conftest.undefs --# Using a here document instead of a string reduces the quoting nightmare. --# Putting comments in sed scripts is not portable. --# --# `end' is used to avoid that the second main sed command (meant for --# 0-ary CPP macros) applies to n-ary macro definitions. --# See the Autoconf documentation for `clear'. --cat >confdef2sed.sed <<\_ACEOF --s/[\\&,]/\\&/g --s,[\\$`],\\&,g --t clear --: clear --s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp --t end --s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp --: end --_ACEOF --# If some macros were called several times there might be several times --# the same #defines, which is useless. Nevertheless, we may not want to --# sort them, since we want the *last* AC-DEFINE to be honored. --uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines --sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs --rm -f confdef2sed.sed -+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 - --# This sed command replaces #undef with comments. This is necessary, for -+# 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. --cat >>conftest.undefs <<\_ACEOF --s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, --_ACEOF -+# (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"' - --# Break up conftest.defines because some shells have a limit on the size --# of here documents, and old seds have small limits too (100 cmds). --echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS --echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS --echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS --echo ' :' >>$CONFIG_STATUS --rm -f conftest.tail --while grep . conftest.defines >/dev/null -+while : - do -- # Write a limited-size here document to $tmp/defines.sed. -- echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS -- # Speed up: don't consider the non `#define' lines. -- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS -- # Work around the forget-to-reset-the-flag bug. -- echo 't clr' >>$CONFIG_STATUS -- echo ': clr' >>$CONFIG_STATUS -- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS -+ # 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 $tmp/in >$tmp/out -- rm -f $tmp/in -- mv $tmp/out $tmp/in --' >>$CONFIG_STATUS -- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail -+ 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 --echo ' fi # grep' >>$CONFIG_STATUS --echo >>$CONFIG_STATUS -- --# Break up conftest.undefs because some shells have a limit on the size --# of here documents, and old seds have small limits too (100 cmds). --echo ' # Handle all the #undef templates' >>$CONFIG_STATUS --rm -f conftest.tail --while grep . conftest.undefs >/dev/null --do -- # Write a limited-size here document to $tmp/undefs.sed. -- echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS -- # Speed up: don't consider the non `#undef' -- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS -- # Work around the forget-to-reset-the-flag bug. -- echo 't clr' >>$CONFIG_STATUS -- echo ': clr' >>$CONFIG_STATUS -- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS -- echo 'CEOF -- sed -f $tmp/undefs.sed $tmp/in >$tmp/out -- rm -f $tmp/in -- mv $tmp/out $tmp/in --' >>$CONFIG_STATUS -- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail -- rm -f conftest.undefs -- mv conftest.tail conftest.undefs --done --rm -f conftest.undefs -+rm -f conftest.defines conftest.tail - -+echo "ac_result=$ac_in" >>$CONFIG_STATUS - cat >>$CONFIG_STATUS <<\_ACEOF -- # 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. */ -- if test x"$ac_file" = x-; then -- echo "/* Generated by configure. */" >$tmp/config.h -- else -- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h -- fi -- cat $tmp/in >>$tmp/config.h -- rm -f $tmp/in - if test x"$ac_file" != x-; then -- if diff $ac_file $tmp/config.h >/dev/null 2>&1; 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 -- ac_dir=`(dirname "$ac_file") 2>/dev/null || --$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'` -- { if $as_mkdir_p; then -- mkdir -p "$ac_dir" -- else -- as_dir="$ac_dir" -- as_dirs= -- while test ! -d "$as_dir"; do -- as_dirs="$as_dir $as_dirs" -- as_dir=`(dirname "$as_dir") 2>/dev/null || --$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'` -- done -- test ! -n "$as_dirs" || mkdir $as_dirs -- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 --echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} -- { (exit 1); exit 1; }; }; } -- - rm -f $ac_file -- mv $tmp/config.h $ac_file -+ mv "$tmp/config.h" $ac_file - fi - else -- cat $tmp/config.h -- rm -f $tmp/config.h -+ echo "/* $configure_input */" -+ cat "$ac_result" - fi --done --_ACEOF --cat >>$CONFIG_STATUS <<\_ACEOF -+ rm -f "$tmp/out12" -+ ;; - --# --# CONFIG_COMMANDS section. --# --for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue -- ac_dest=`echo "$ac_file" | sed 's,:.*,,'` -- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` -- ac_dir=`(dirname "$ac_dest") 2>/dev/null || --$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$ac_dest" : 'X\(//\)[^/]' \| \ -- X"$ac_dest" : 'X\(//\)$' \| \ -- X"$ac_dest" : 'X\(/\)' \| \ -- . : '\(.\)' 2>/dev/null || --echo X"$ac_dest" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } -- /^X\(\/\/\)[^/].*/{ s//\1/; q; } -- /^X\(\/\/\)$/{ s//\1/; q; } -- /^X\(\/\).*/{ s//\1/; q; } -- s/.*/./; q'` -- ac_builddir=. -+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -+echo "$as_me: executing $ac_file commands" >&6;} -+ ;; -+ esac - --if test "$ac_dir" != .; then -- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` -- # A "../" for each directory in $ac_dir_suffix. -- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` --else -- ac_dir_suffix= ac_top_builddir= --fi - --case $srcdir in -- .) # No --srcdir option. We are building in place. -- ac_srcdir=. -- if test -z "$ac_top_builddir"; then -- ac_top_srcdir=. -- else -- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` -- fi ;; -- [\\/]* | ?:[\\/]* ) # Absolute path. -- ac_srcdir=$srcdir$ac_dir_suffix; -- ac_top_srcdir=$srcdir ;; -- *) # Relative path. -- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix -- ac_top_srcdir=$ac_top_builddir$srcdir ;; --esac --# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be --# absolute. --ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` --ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` --ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` --ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` -- -- -- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 --echo "$as_me: executing $ac_dest commands" >&6;} -- case $ac_dest in -- default ) -+ case $ac_file$ac_mode in -+ "default":C) - # a hook for preserving undef directive in config.h - mv config.h conftest - sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2 /\*\3@' < conftest > config.h - rm -f conftest - ;; -+ - esac --done --_ACEOF -+done # for ac_tag - --cat >>$CONFIG_STATUS <<\_ACEOF - - { (exit 0); exit 0; } - _ACEOF diff -Nru screen-4.0.3/debian/patches/05fix_osdef_include.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/05fix_osdef_include.dpatch --- screen-4.0.3/debian/patches/05fix_osdef_include.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/05fix_osdef_include.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05fix_osdef_include.dpatch by -## -## DP: Add a missing include to get a few prototypes that caused build -## DP: issues on kfreebsd-amd64. (See #357232) - -@DPATCH@ -diff -Naur screen-4.0.3.orig/osdef.h.in screen-4.0.3/osdef.h.in ---- screen-4.0.3.orig/osdef.h.in 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/osdef.h.in 2008-06-01 23:40:11.000000000 +0200 -@@ -106,6 +106,7 @@ - extern char *tgoto __P((char *, int, int)); - - #ifdef POSIX -+#include - extern int setsid __P((void)); - extern int setpgid __P((int, int)); - extern int tcsetpgrp __P((int, int)); diff -Nru screen-4.0.3/debian/patches/05fix_osdef_include.patch screen-4.1.0~20120320gitdb59704/debian/patches/05fix_osdef_include.patch --- screen-4.0.3/debian/patches/05fix_osdef_include.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/05fix_osdef_include.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,13 @@ +Author: +Description: Add a missing include to get a few prototypes that caused build +issues on kfreebsd-amd64. (See #357232) +--- a/osdef.h.in ++++ b/osdef.h.in +@@ -106,6 +106,7 @@ + extern char *tgoto __P((char *, int, int)); + + #ifdef POSIX ++#include + extern int setsid __P((void)); + extern int setpgid __P((int, int)); + extern int tcsetpgrp __P((int, int)); diff -Nru screen-4.0.3/debian/patches/06-fix-parallel-build.patch screen-4.1.0~20120320gitdb59704/debian/patches/06-fix-parallel-build.patch --- screen-4.0.3/debian/patches/06-fix-parallel-build.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/06-fix-parallel-build.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,18 @@ +screen FTBFS if make uses parallel building (at least with -j8). This +patch adds the missing dependencies to make parallel builds work, too. + +Index: screen-4.1.0~20120320gitdb59704/Makefile.in +=================================================================== +--- screen-4.1.0~20120320gitdb59704.orig/Makefile.in 2012-06-10 17:35:56.616100993 +0200 ++++ screen-4.1.0~20120320gitdb59704/Makefile.in 2012-06-10 17:40:37.784352971 +0200 +@@ -350,7 +350,7 @@ + viewport.o: layout.h viewport.h canvas.h viewport.c config.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h extern.h \ + braille.h +-list_generic.o: list_generic.h list_generic.c layer.h +-list_display.o: list_generic.h list_display.c layer.h +-list_window.o: list_generic.h list_window.c window.h layer.h ++list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h ++list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h ++list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h + diff -Nru screen-4.0.3/debian/patches/09CHERRY_97708d58.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/09CHERRY_97708d58.dpatch --- screen-4.0.3/debian/patches/09CHERRY_97708d58.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/09CHERRY_97708d58.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 09CHERRY_97708d58.dpatch -## -## DP: Cherry-pick commit 97708d5800ac845b4c3a25d96d544f0dafa735d7 -## DP: (documentation for the vertical split feature). - -@DPATCH@ -diff --git a/doc/screen.1 b/doc/screen.1 -index 80c6483..b781e3a 100644 ---- a/doc/screen.1 -+++ b/doc/screen.1 -@@ -509,7 +509,7 @@ automatic margins on and off). - .PD - Send a control-s to the current window. - .IP "\fBC-a S\fP (split)" --Split the current region into two new ones. -+Split the current region horizontally into two new ones. - See also \fIonly, remove, focus\fP. - .IP "\fBC-a t\fP" - .PD 0 -@@ -582,6 +582,8 @@ Shows where - comes from, where it went to and why you can use it. - .IP "\fBC-a _\fP (silence)" - Start/stop monitoring the current window for inactivity. -+.IP "\fBC-a |\fP (split -v)" -+Split the current region vertically into two new ones. - .IP "\fBC-a *\fP (displays)" - Show a listing of all currently attached displays. - -@@ -2729,12 +2731,13 @@ The default is currently \*Q=s dd\*U (standout, default colors). - .sp - .ne 3 - .B split -+.RB [ -v ] - .PP - Split the current region into two new ones. All regions on the - display are resized to make room for the new region. The blank --window is displayed on the new region. Use the \*Qremove\*U or the --\*Qonly\*U command to delete regions. --Use \*Qfocus\*U to toggle between regions. -+window is displayed on the new region. Splits are made horizontally -+unless -v is used. Use the \*Qremove\*U or the \*Qonly\*U command -+to delete regions. Use \*Qfocus\*U to toggle between regions. - .sp - .ne 3 - .B "startup_message on\fP|\fBoff" -diff --git a/doc/screen.texinfo b/doc/screen.texinfo -index 1acabe2..cfcbafe 100644 ---- a/doc/screen.texinfo -+++ b/doc/screen.texinfo -@@ -705,7 +705,7 @@ Send a ^S (ASCII XOFF) to the current window. @xref{XON/XOFF}. - - @item @kbd{C-a S} - (split)@* --Split the current region into two new ones. @xref{Regions}. -+Split the current region horizontally into two new ones. @xref{Regions}. - - @item @kbd{C-a t} - @itemx @kbd{C-a C-t} -@@ -799,6 +799,10 @@ Delete the screen-exchange file. @xref{Screen Exchange}. - (silence)@* - Start/stop monitoring the current window for inactivity. @xref{Silence}, - -+@item @kbd{C-a |} -+(split -v)@* -+Split the current region vertically into two new ones. @xref{Regions}. -+ - @item @kbd{C-a ,} - (license)@* - Show the copyright page. -@@ -1808,11 +1812,20 @@ which can contain different windows. - @node Split, Focus, , Regions - @section Split - @kindex S --@deffn Command split --(@kbd{C-a S})@* -+@kindex | -+@deffn Command split [-v] -+(@kbd{C-a S}, @kbd{C-a |})@* - Split the current region into two new ones. All regions on the - display are resized to make room for the new region. The blank --window is displayed on the new region. -+window is displayed on the new region. The default is to create -+a horizontal split, putting the new regions on the top and -+bottom of each other. Using -v will create a vertical split, -+causing the new regions to appear side by side of each other. -+ -+With this current implementation of @code{screen}, scrolling data -+will appear much slower in a vertically splited region than one -+that is not. This should be taken into consideration if you need -+to use system commands such as @code{cat} or @code{tail -f}. - @end deffn - - @node Focus, Only, Split, Regions diff -Nru screen-4.0.3/debian/patches/09CHERRY_bb04008e.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/09CHERRY_bb04008e.dpatch --- screen-4.0.3/debian/patches/09CHERRY_bb04008e.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/09CHERRY_bb04008e.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 09CHERRY_bb04008e.dpatch -## -## DP: Cherry-pick commit bb04008e82e2820cc2c20ee0668818a5884280d9 -## DP: (report session identifier on detach). - -@DPATCH@ -diff --git a/screen.c b/screen.c -index e1fb3f0..8160a73 100644 ---- a/screen.c -+++ b/screen.c -@@ -1832,6 +1832,17 @@ int mode; - if (display == 0) - return; - -+#define AddStrSock(msg) do { \ -+ if (SockName) \ -+ { \ -+ AddStr("[" msg " from "); \ -+ AddStr(SockName); \ -+ AddStr("]\r\n"); \ -+ } \ -+ else \ -+ AddStr("[" msg "]\r\n"); \ -+ } while (0) -+ - signal(SIGHUP, SIG_IGN); - debug1("Detach(%d)\n", mode); - if (D_status) -@@ -1845,7 +1856,7 @@ int mode; - sign = SIG_BYE; - break; - case D_DETACH: -- AddStr("[detached]\r\n"); -+ AddStrSock("detached"); - sign = SIG_BYE; - break; - #ifdef BSDJOBS -@@ -1855,14 +1866,14 @@ int mode; - #endif - #ifdef REMOTE_DETACH - case D_REMOTE: -- AddStr("[remote detached]\r\n"); -+ AddStrSock("remote detached"); - sign = SIG_BYE; - break; - #endif - #ifdef POW_DETACH - case D_POWER: -- AddStr("[power detached]\r\n"); -- if (PowDetachString) -+ AddStrSock("power detached"); -+ if (PowDetachString) - { - AddStr(PowDetachString); - AddStr("\r\n"); -@@ -1871,8 +1882,8 @@ int mode; - break; - #ifdef REMOTE_DETACH - case D_REMOTE_POWER: -- AddStr("[remote power detached]\r\n"); -- if (PowDetachString) -+ AddStrSock("remote power detached"); -+ if (PowDetachString) - { - AddStr(PowDetachString); - AddStr("\r\n"); -@@ -1948,6 +1959,7 @@ int mode; - debug2("Detach: Signal %d to Attacher(%d)!\n", sign, pid); - debug("Detach returns, we are successfully detached.\n"); - signal(SIGHUP, SigHup); -+#undef AddStrSock - } - - static int diff -Nru screen-4.0.3/debian/patches/09CHERRY_f6b50e17.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/09CHERRY_f6b50e17.dpatch --- screen-4.0.3/debian/patches/09CHERRY_f6b50e17.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/09CHERRY_f6b50e17.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 09CHERRY_f6b50e17.dpatch -## -## DP: Cherry-pick commit f6b50e175bc39763c4660cc88d7f82e5811797de -## DP: (do not enforce the existence of a display, see #466072). - -@DPATCH@ -diff --git a/socket.c b/socket.c -index 09aa73d..4c32ed5 100644 ---- a/socket.c -+++ b/socket.c -@@ -1102,12 +1097,8 @@ ReceiveMsg() - * the window that issued the create message need not be an active - * window. Then we create the window without having a display. - * Resulting in another inactive window. -- * -- * Currently we enforce that at least one display exists. But why? -- * jw. - */ -- if (displays) -- ExecCreate(&m); -+ ExecCreate(&m); - break; - case MSG_CONT: - if (display && D_userpid != 0 && kill(D_userpid, 0) == 0) diff -Nru screen-4.0.3/debian/patches/10norootpassword.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/10norootpassword.dpatch --- screen-4.0.3/debian/patches/10norootpassword.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/10norootpassword.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 10norootpassword.dpatch by Martin Pitt -## -## DP: When locking a root-owned screen, check that root has a -## DP: password set. If not, ask for an unlocking key. -## DP: See https://bugs.launchpad.net/bugs/6760 - -@DPATCH@ -diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c ---- screen-4.0.3.orig/attacher.c 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/attacher.c 2008-06-01 23:40:21.000000000 +0200 -@@ -819,11 +819,15 @@ - #ifdef USE_PAM - pam_handle_t *pamh = 0; - int pam_error; --#else -- char *pass, mypass[16 + 1], salt[3]; - #endif -+ char *pass, mypass[16 + 1], salt[3]; -+ int using_pam = 1; - --#ifndef USE_PAM -+#ifdef USE_PAM -+ if (!ppp->pw_uid) -+ { -+#endif -+ using_pam = 0; - pass = ppp->pw_passwd; - if (pass == 0 || *pass == 0) - { -@@ -856,6 +860,8 @@ - pass = crypt(mypass, salt); - pass = ppp->pw_passwd = SaveStr(pass); - } -+#ifdef USE_PAM -+ } - #endif - - debug("screen_builtin_lck looking in gcos field\n"); -@@ -885,6 +891,8 @@ - AttacherFinit(SIGARG); - /* NOTREACHED */ - } -+ if (using_pam) -+ { - #ifdef USE_PAM - PAM_conversation.appdata_ptr = cp1; - pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); -@@ -895,10 +903,13 @@ - PAM_conversation.appdata_ptr = 0; - if (pam_error == PAM_SUCCESS) - break; --#else -- if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) -- break; - #endif -+ } -+ else -+ { -+ if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) -+ break; -+ } - debug("screen_builtin_lck: NO!!!!!\n"); - bzero(cp1, strlen(cp1)); - } diff -Nru screen-4.0.3/debian/patches/10norootpassword.patch screen-4.1.0~20120320gitdb59704/debian/patches/10norootpassword.patch --- screen-4.0.3/debian/patches/10norootpassword.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/10norootpassword.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,62 @@ +Author: Martin Pitt +Description: When locking a root-owned screen, check that root has a +password set. If not, ask for an unlocking key. +See https://bugs.launchpad.net/bugs/6760 +Index: screen/attacher.c +=================================================================== +--- screen.orig/attacher.c 2011-10-08 19:54:22.000000000 +0200 ++++ screen/attacher.c 2011-10-08 19:58:12.000000000 +0200 +@@ -847,11 +847,15 @@ + #ifdef USE_PAM + pam_handle_t *pamh = 0; + int pam_error; +-#else +- char *pass, mypass[16 + 1], salt[3]; + #endif ++ char *pass, mypass[16 + 1], salt[3]; ++ int using_pam = 1; + +-#ifndef USE_PAM ++#ifdef USE_PAM ++ if (!ppp->pw_uid) ++ { ++#endif ++ using_pam = 0; + pass = ppp->pw_passwd; + if (pass == 0 || *pass == 0) + { +@@ -884,6 +888,8 @@ + pass = crypt(mypass, salt); + pass = ppp->pw_passwd = SaveStr(pass); + } ++#ifdef USE_PAM ++ } + #endif + + debug("screen_builtin_lck looking in gcos field\n"); +@@ -913,6 +919,8 @@ + AttacherFinit(SIGARG); + /* NOTREACHED */ + } ++ if (using_pam) ++ { + #ifdef USE_PAM + PAM_conversation.appdata_ptr = cp1; + pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); +@@ -923,10 +931,13 @@ + PAM_conversation.appdata_ptr = 0; + if (pam_error == PAM_SUCCESS) + break; +-#else +- if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) +- break; + #endif ++ } ++ else ++ { ++ if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) ++ break; ++ } + debug("screen_builtin_lck: NO!!!!!\n"); + bzero(cp1, strlen(cp1)); + } diff -Nru screen-4.0.3/debian/patches/11replace_doc_paths.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/11replace_doc_paths.dpatch --- screen-4.0.3/debian/patches/11replace_doc_paths.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/11replace_doc_paths.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 11replace_doc_paths.dpatch by -## -## DP: Fix the references to configuration and pipe paths to match the -## DP: locations Debian uses. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:40:25.000000000 +0200 -@@ -99,7 +99,7 @@ - The above example would start the emacs editor (editing prog.c) and switch - to its window. - .PP --If \*Q/etc/utmp\*U is writable by -+If \*Q/var/run/utmp\*U is writable by - .IR screen , - an appropriate record will be written to this file for each window, and - removed when the window is terminated. -@@ -228,7 +228,7 @@ - The use of this option is discouraged. - .TP 5 - .BR \-l " and " \-ln --turns login mode on or off (for /etc/utmp updating). -+turns login mode on or off (for /var/run/utmp updating). - This can also be defined through the \*Qdeflogin\*U .screenrc command. - .TP 5 - .BR \-ls " and " \-list -@@ -588,7 +588,7 @@ - - .SH CUSTOMIZATION - The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to --/tmp/screens or preferably to /usr/local/screens chosen at compile-time. If -+/tmp/screens or preferably to /var/run/screen chosen at compile-time. If - .I screen - is installed setuid-root, then the administrator - should compile -@@ -601,7 +601,7 @@ - When - .I screen - is invoked, it executes initialization commands from the files --\*Q/usr/local/etc/screenrc\*U and -+\*Q/etc/screenrc\*U and - \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's - defaults\*U that can be overridden in the following ways: for the - global screenrc file -@@ -1676,7 +1676,7 @@ - The echo command may be used to annoy - .I screen - users with a 'message of the --day'. Typically installed in a global /local/etc/screenrc. -+day'. Typically installed in a global /etc/screenrc. - The option \*Q-n\*U may be used to suppress the line feed. - See also \*Qsleep\*U. - Echo is also useful for online checking of environment variables. -@@ -4429,14 +4429,14 @@ - .I screen - distribution package for private and global initialization files. - .IP $SYSSCREENRC --.IP /usr/local/etc/screenrc -+.IP /etc/screenrc - .I screen - initialization commands - .IP $SCREENRC - .IP $HOME/.screenrc --Read in after /usr/local/etc/screenrc -+Read in after /etc/screenrc - .IP $SCREENDIR/S- --.IP /local/screens/S- -+.IP /var/run/screen/S- - Socket directories (default) - .IP /usr/tmp/screens/S- - Alternate socket directories. -@@ -4455,7 +4455,7 @@ - or - .IP /etc/termcap - Terminal capability databases --.IP /etc/utmp -+.IP /var/run/utmp - Login records - .IP $LOCKPRG - Program that locks a terminal. -@@ -4568,9 +4568,9 @@ - must be installed as set-uid with owner root on most systems in order - to be able to correctly change the owner of the tty device file for - each window. --Special permission may also be required to write the file \*Q/etc/utmp\*U. -+Special permission may also be required to write the file \*Q/var/run/utmp\*U. - .IP \(bu --Entries in \*Q/etc/utmp\*U are not removed when -+Entries in \*Q/var/run/utmp\*U are not removed when - .I screen - is killed with SIGKILL. - This will cause some programs (like "w" or "rwho") -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:40:25.000000000 +0200 -@@ -176,7 +176,7 @@ - variable) who will use it to create the new window. The above example would - start the @code{emacs} editor (editing @file{prog.c}) and switch to its window. - --If @file{/etc/utmp} is writable by @code{screen}, an appropriate record -+If @file{/var/run/utmp} is writable by @code{screen}, an appropriate record - will be written to this file for each window, and removed when the - window is closed. This is useful for working with @code{talk}, - @code{script}, @code{shutdown}, @code{rsend}, @code{sccs} and other -@@ -305,7 +305,7 @@ - - @item -l - @itemx -ln --Turn login mode on or off (for @file{/etc/utmp} updating). This option -+Turn login mode on or off (for @file{/var/run/utmp} updating). This option - is equivalent to the @code{deflogin} command (@pxref{Login}). - - @item -ls [@var{match}] -@@ -450,7 +450,7 @@ - @cindex screenrc - When @code{screen} is invoked, it executes initialization commands from - the files @file{.screenrc} in the user's home directory and --@file{/usr/local/etc/screenrc}. These defaults can be overridden in the -+@file{/etc/screenrc}. These defaults can be overridden in the - following ways: - For the global screenrc file @code{screen} searches for the environment - variable @code{$SYSSCREENRC} (this override feature may be disabled at -@@ -1000,7 +1000,7 @@ - @item logfile @var{filename} - Place where to collect logfiles. @xref{Log}. - @item login [@var{state}] --Log the window in @file{/etc/utmp}. @xref{Login}. -+Log the window in @file{/var/run/utmp}. @xref{Login}. - @item logtstamp [@var{state}] - Configure logfile time-stamps. @xref{Log}. - @item mapdefault -@@ -1903,7 +1903,7 @@ - * Naming Windows:: Control the name of the window - * Console:: See the host's console messages - * Kill:: Destroy an unwanted window --* Login:: Control @file{/etc/utmp} logging -+* Login:: Control @file{/var/run/utmp} logging - * Mode:: Control the file mode of the pty - * Monitor:: Watch for activity in a window - * Windows:: List the active windows -@@ -2112,7 +2112,7 @@ - @kindex L - @deffn Command login [state] - (@kbd{C-a L})@* --Adds or removes the entry in @file{/etc/utmp} for the current window. -+Adds or removes the entry in @file{/var/run/utmp} for the current window. - This controls whether or not the window is @dfn{logged in}. In addition - to this toggle, it is convenient to have ``log in'' and ``log out'' - keys. For instance, @code{bind I login on} and @code{bind O -@@ -4970,17 +4970,17 @@ - global initialization files. - - @item @code{$SYSSCREENRC} --@itemx /local/etc/screenrc -+@itemx /etc/screenrc - @code{screen} initialization commands - - @item @code{$SCREENRC} - @itemx @code{$HOME}/.iscreenrc - @itemx @code{$HOME}/.screenrc --Read in after /local/etc/screenrc -+Read in after /etc/screenrc - - @item @code{$SCREENDIR}/S-@var{login} - --@item /local/screens/S-@var{login} -+@item /var/run/screen/S-@var{login} - Socket directories (default) - - @item /usr/tmp/screens/S-@var{login} -@@ -5003,7 +5003,7 @@ - @itemx /etc/termcap - Terminal capability databases - --@item /etc/utmp -+@item /var/run/utmp - Login records - - @item @code{$LOCKPRG} -@@ -5108,10 +5108,10 @@ - in order to be able to - correctly change the owner of the tty device file for each window. - Special permission may also be required to write the file --@file{/etc/utmp}. -+@file{/var/run/utmp}. - - @item --Entries in @file{/etc/utmp} are not removed when @code{screen} is killed -+Entries in @file{/var/run/utmp} are not removed when @code{screen} is killed - with SIGKILL. This will cause some programs (like "w" or "rwho") to - advertise that a user is logged on who really isn't. - -@@ -5192,7 +5192,7 @@ - @cindex socket directory - - The socket directory defaults either to @file{$HOME/.screen} or simply to --@file{/tmp/screens} or preferably to @file{/usr/local/screens} chosen at -+@file{/tmp/screens} or preferably to @file{/var/run/screen} chosen at - compile-time. If @code{screen} is installed - setuid root, then the administrator should compile screen with an - adequate (not NFS mounted) @code{SOCKDIR}. If @code{screen} is not diff -Nru screen-4.0.3/debian/patches/11replace_doc_paths.patch screen-4.1.0~20120320gitdb59704/debian/patches/11replace_doc_paths.patch --- screen-4.0.3/debian/patches/11replace_doc_paths.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/11replace_doc_paths.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,201 @@ +Author: +Description: Fix the references to configuration and pipe paths to match the +locations Debian uses. +Index: screen/doc/screen.1 +=================================================================== +--- screen.orig/doc/screen.1 2012-03-20 22:34:27.000000000 +0100 ++++ screen/doc/screen.1 2012-03-20 22:35:03.000000000 +0100 +@@ -101,7 +101,7 @@ + the invoking shell to the application (emacs in this case), because it is + forked from the parent screen process, not from the invoking shell. + .PP +-If \*Q/etc/utmp\*U is writable by ++If \*Q/var/run/utmp\*U is writable by + .IR screen , + an appropriate record will be written to this file for each window, and + removed when the window is terminated. +@@ -230,7 +230,7 @@ + The use of this option is discouraged. + .TP 5 + .BR \-l " and " \-ln +-turns login mode on or off (for /etc/utmp updating). ++turns login mode on or off (for /var/run/utmp updating). + This can also be defined through the \*Qdeflogin\*U .screenrc command. + .TP 5 + .BR \-ls " [" \fImatch ] +@@ -620,7 +620,7 @@ + + .SH CUSTOMIZATION + The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to +-/tmp/screens or preferably to /usr/local/screens chosen at compile-time. If ++/tmp/screens or preferably to /var/run/screen chosen at compile-time. If + .I screen + is installed setuid-root, then the administrator + should compile +@@ -633,7 +633,7 @@ + When + .I screen + is invoked, it executes initialization commands from the files +-\*Q/usr/local/etc/screenrc\*U and ++\*Q/etc/screenrc\*U and + \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's + defaults\*U that can be overridden in the following ways: for the + global screenrc file +@@ -1835,7 +1835,7 @@ + The echo command may be used to annoy + .I screen + users with a 'message of the +-day'. Typically installed in a global /local/etc/screenrc. ++day'. Typically installed in a global /etc/screenrc. + The option \*Q-n\*U may be used to suppress the line feed. + See also \*Qsleep\*U. + Echo is also useful for online checking of environment variables. +@@ -4844,14 +4844,14 @@ + .I screen + distribution package for private and global initialization files. + .IP $SYSSCREENRC +-.IP /usr/local/etc/screenrc ++.IP /etc/screenrc + .I screen + initialization commands + .IP $SCREENRC + .IP $HOME/.screenrc +-Read in after /usr/local/etc/screenrc ++Read in after /etc/screenrc + .IP $SCREENDIR/S- +-.IP /local/screens/S- ++.IP /var/run/screen/S- + Socket directories (default) + .IP /usr/tmp/screens/S- + Alternate socket directories. +@@ -4870,7 +4870,7 @@ + or + .IP /etc/termcap + Terminal capability databases +-.IP /etc/utmp ++.IP /var/run/utmp + Login records + .IP $LOCKPRG + Program that locks a terminal. +@@ -4992,9 +4992,9 @@ + must be installed as set-uid with owner root on most systems in order + to be able to correctly change the owner of the tty device file for + each window. +-Special permission may also be required to write the file \*Q/etc/utmp\*U. ++Special permission may also be required to write the file \*Q/var/run/utmp\*U. + .IP \(bu +-Entries in \*Q/etc/utmp\*U are not removed when ++Entries in \*Q/var/run/utmp\*U are not removed when + .I screen + is killed with SIGKILL. + This will cause some programs (like "w" or "rwho") +Index: screen/doc/screen.texinfo +=================================================================== +--- screen.orig/doc/screen.texinfo 2012-03-20 22:34:27.000000000 +0100 ++++ screen/doc/screen.texinfo 2012-03-20 22:35:03.000000000 +0100 +@@ -182,7 +182,7 @@ + the invoking shell to the application (emacs in this case), because it is + forked from the parent screen process, not from the invoking shell. + +-If @file{/etc/utmp} is writable by @code{screen}, an appropriate record ++If @file{/var/run/utmp} is writable by @code{screen}, an appropriate record + will be written to this file for each window, and removed when the + window is closed. This is useful for working with @code{talk}, + @code{script}, @code{shutdown}, @code{rsend}, @code{sccs} and other +@@ -311,7 +311,7 @@ + + @item -l + @itemx -ln +-Turn login mode on or off (for @file{/etc/utmp} updating). This option ++Turn login mode on or off (for @file{/var/run/utmp} updating). This option + is equivalent to the @code{deflogin} command (@pxref{Login}). + + @item -ls [@var{match}] +@@ -485,7 +485,7 @@ + @cindex screenrc + When @code{screen} is invoked, it executes initialization commands from + the files @file{.screenrc} in the user's home directory and +-@file{/usr/local/etc/screenrc}. These defaults can be overridden in the ++@file{/etc/screenrc}. These defaults can be overridden in the + following ways: + For the global screenrc file @code{screen} searches for the environment + variable @code{$SYSSCREENRC} (this override feature may be disabled at +@@ -1069,7 +1069,7 @@ + @item logfile @var{filename} + Place where to collect logfiles. @xref{Log}. + @item login [@var{state}] +-Log the window in @file{/etc/utmp}. @xref{Login}. ++Log the window in @file{/var/run/utmp}. @xref{Login}. + @item logtstamp [@var{state}] + Configure logfile time-stamps. @xref{Log}. + @item mapdefault +@@ -2318,7 +2318,7 @@ + * Naming Windows:: Control the name of the window + * Console:: See the host's console messages + * Kill:: Destroy an unwanted window +-* Login:: Control @file{/etc/utmp} logging ++* Login:: Control @file{/var/run/utmp} logging + * Mode:: Control the file mode of the pty + * Monitor:: Watch for activity or inactivity in a window + * Windows:: List the active windows +@@ -2527,7 +2527,7 @@ + @kindex L + @deffn Command login [state] + (@kbd{C-a L})@* +-Adds or removes the entry in @file{/etc/utmp} for the current window. ++Adds or removes the entry in @file{/var/run/utmp} for the current window. + This controls whether or not the window is @dfn{logged in}. In addition + to this toggle, it is convenient to have ``log in'' and ``log out'' + keys. For instance, @code{bind I login on} and @code{bind O +@@ -5670,17 +5670,17 @@ + global initialization files. + + @item @code{$SYSSCREENRC} +-@itemx /local/etc/screenrc ++@itemx /etc/screenrc + @code{screen} initialization commands + + @item @code{$SCREENRC} + @itemx @code{$HOME}/.iscreenrc + @itemx @code{$HOME}/.screenrc +-Read in after /local/etc/screenrc ++Read in after /etc/screenrc + + @item @code{$SCREENDIR}/S-@var{login} + +-@item /local/screens/S-@var{login} ++@item /var/run/screen/S-@var{login} + Socket directories (default) + + @item /usr/tmp/screens/S-@var{login} +@@ -5703,7 +5703,7 @@ + @itemx /etc/termcap + Terminal capability databases + +-@item /etc/utmp ++@item /var/run/utmp + Login records + + @item @code{$LOCKPRG} +@@ -5809,10 +5809,10 @@ + in order to be able to + correctly change the owner of the tty device file for each window. + Special permission may also be required to write the file +-@file{/etc/utmp}. ++@file{/var/run/utmp}. + + @item +-Entries in @file{/etc/utmp} are not removed when @code{screen} is killed ++Entries in @file{/var/run/utmp} are not removed when @code{screen} is killed + with SIGKILL. This will cause some programs (like "w" or "rwho") to + advertise that a user is logged on who really isn't. + +@@ -5893,7 +5893,7 @@ + @cindex socket directory + + The socket directory defaults either to @file{$HOME/.screen} or simply to +-@file{/tmp/screens} or preferably to @file{/usr/local/screens} chosen at ++@file{/tmp/screens} or preferably to @file{/var/run/screen} chosen at + compile-time. If @code{screen} is installed + setuid root, then the administrator should compile screen with an + adequate (not NFS mounted) @code{SOCKDIR}. If @code{screen} is not diff -Nru screen-4.0.3/debian/patches/12kfreebsd_ctty.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/12kfreebsd_ctty.dpatch --- screen-4.0.3/debian/patches/12kfreebsd_ctty.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/12kfreebsd_ctty.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12kfreebsd_ctty.dpatch by -## -## DP: See inline documentation. - -@DPATCH@ ---- screen-4.0.3.orig/tty.sh 2009-04-10 18:15:51.923805915 +0200 -+++ screen-4.0.3/tty.sh 2009-04-10 18:17:56.043804602 +0200 -@@ -801,18 +801,11 @@ - - mypid = getpid(); - -- /* The next lines should be obsolete. Can anybody check if they -- * are really needed on the BSD platforms? -- * -- * this is to avoid the message: -- * fgtty: Not a typewriter (25) -+ /* -+ * Under BSD we have to set the controlling terminal again explicitly. - */ --# if defined(__osf__) || (BSD >= 199103) || defined(ISC) -- if (separate_sids) -- setsid(); /* should be already done */ --# ifdef TIOCSCTTY -+# if defined(__FreeBSD_kernel__) && defined(TIOCSCTTY) - ioctl(fd, TIOCSCTTY, (char *)0); --# endif - # endif - - # ifdef POSIX diff -Nru screen-4.0.3/debian/patches/12kfreebsd_ctty.patch screen-4.1.0~20120320gitdb59704/debian/patches/12kfreebsd_ctty.patch --- screen-4.0.3/debian/patches/12kfreebsd_ctty.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/12kfreebsd_ctty.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,28 @@ +Author: +Description: See inline documentation. +Index: screen/tty.sh +=================================================================== +--- screen.orig/tty.sh 2011-10-08 19:54:22.000000000 +0200 ++++ screen/tty.sh 2011-10-08 19:58:28.000000000 +0200 +@@ -808,18 +808,11 @@ + + mypid = getpid(); + +- /* The next lines should be obsolete. Can anybody check if they +- * are really needed on the BSD platforms? +- * +- * this is to avoid the message: +- * fgtty: Not a typewriter (25) ++ /* ++ * Under BSD we have to set the controlling terminal again explicitly. + */ +-# if defined(__osf__) || (BSD >= 199103) || defined(ISC) +- if (separate_sids) +- setsid(); /* should be already done */ +-# ifdef TIOCSCTTY ++# if (defined(__FreeBSD_kernel__) || defined(__GNU__)) && defined(TIOCSCTTY) + ioctl(fd, TIOCSCTTY, (char *)0); +-# endif + # endif + + # ifdef POSIX diff -Nru screen-4.0.3/debian/patches/13split_info_files.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/13split_info_files.dpatch --- screen-4.0.3/debian/patches/13split_info_files.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/13split_info_files.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 13split_info_files.dpatch by -## -## DP: Split the info files at 50k to match the distribution style -## DP: of the orig tarball. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/Makefile.in screen-4.0.3/doc/Makefile.in ---- screen-4.0.3.orig/doc/Makefile.in 2006-10-23 15:06:32.000000000 +0200 -+++ screen-4.0.3/doc/Makefile.in 2008-06-01 23:40:33.000000000 +0200 -@@ -27,7 +27,7 @@ - - info screen.info: screen.texinfo - @rm -f screen.info* -- $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info -+ $(MAKEINFO) --split 50000 $(srcdir)/screen.texinfo -o screen.info - - install: installdirs - $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1 diff -Nru screen-4.0.3/debian/patches/13split_info_files.patch screen-4.1.0~20120320gitdb59704/debian/patches/13split_info_files.patch --- screen-4.0.3/debian/patches/13split_info_files.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/13split_info_files.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,14 @@ +Author: +Description: Split the info files at 50k to match the distribution style +of the orig tarball. +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -28,7 +28,7 @@ + + info screen.info: screen.texinfo + @rm -f screen.info* +- $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info ++ $(MAKEINFO) --split 50000 $(srcdir)/screen.texinfo -o screen.info + + install: installdirs + $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1 diff -Nru screen-4.0.3/debian/patches/14size_matters.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/14size_matters.dpatch --- screen-4.0.3/debian/patches/14size_matters.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/14size_matters.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 14size_matters.dpatch by -## -## DP: * Increase the MAXSTR macro to suit present-day needs. -## DP: * Increase the maximum length of the input line buffer likewise. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/input.c screen-4.0.3/input.c ---- screen-4.0.3.orig/input.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/input.c 2008-06-01 23:40:37.000000000 +0200 -@@ -38,7 +38,7 @@ - - struct inpline - { -- char buf[101]; /* text buffer */ -+ char buf[MAXSTR+1]; /* text buffer */ - int len; /* length of the editible string */ - int pos; /* cursor position in editable string */ - }; -@@ -49,7 +49,7 @@ - struct inpdata - { - struct inpline inp; -- int inpmaxlen; /* 100, or less, if caller has shorter buffer */ -+ int inpmaxlen; /* MAXSTR, or less, if caller has shorter buffer */ - char *inpstring; /* the prompt */ - int inpstringlen; /* length of the prompt */ - int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */ -@@ -120,8 +120,8 @@ - int maxlen; - struct inpdata *inpdata; - -- if (len > 100) -- len = 100; -+ if (len > MAXSTR) -+ len = MAXSTR; - if (!(mode & INP_NOECHO)) - { - maxlen = flayer->l_width - 1 - strlen(istr); -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:40:37.000000000 +0200 -@@ -1934,7 +1934,7 @@ - ChangeAKA(fore, *args, strlen(*args)); - break; - case RC_COLON: -- Input(":", 100, INP_COOKED, Colonfin, NULL, 0); -+ Input(":", MAXSTR, INP_COOKED, Colonfin, NULL, 0); - if (*args && **args) - { - s = *args; -diff -Naur screen-4.0.3.orig/screen.h screen-4.0.3/screen.h ---- screen-4.0.3.orig/screen.h 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/screen.h 2008-06-01 23:40:37.000000000 +0200 -@@ -86,7 +86,7 @@ - - #define Ctrl(c) ((c)&037) - --#define MAXSTR 256 -+#define MAXSTR 768 - #define MAXARGS 64 - #define MSGWAIT 5 - #define MSGMINWAIT 1 -diff -Naur screen-4.0.3.orig/window.c screen-4.0.3/window.c ---- screen-4.0.3.orig/window.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/window.c 2008-06-01 23:40:37.000000000 +0200 -@@ -2171,7 +2171,7 @@ - return; - } - flayer = &p->w_layer; -- Input(":", 100, INP_COOKED, zmodem_fin, NULL, 0); -+ Input(":", MAXSTR, INP_COOKED, zmodem_fin, NULL, 0); - s = send ? zmodem_sendcmd : zmodem_recvcmd; - n = strlen(s); - LayProcess(&s, &n); diff -Nru screen-4.0.3/debian/patches/14size_matters.patch screen-4.1.0~20120320gitdb59704/debian/patches/14size_matters.patch --- screen-4.0.3/debian/patches/14size_matters.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/14size_matters.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,75 @@ +Author: +Description: * Increase the MAXSTR macro to suit present-day needs. +* Increase the maximum length of the input line buffer likewise. +Index: screen/input.c +=================================================================== +--- screen.orig/input.c 2012-03-20 22:34:27.000000000 +0100 ++++ screen/input.c 2012-03-20 22:35:13.000000000 +0100 +@@ -43,7 +43,7 @@ + + struct inpline + { +- char buf[101]; /* text buffer */ ++ char buf[MAXSTR+1]; /* text buffer */ + int len; /* length of the editible string */ + int pos; /* cursor position in editable string */ + struct inpline *next, *prev; +@@ -58,7 +58,7 @@ + struct inpdata + { + struct inpline inp; +- int inpmaxlen; /* 100, or less, if caller has shorter buffer */ ++ int inpmaxlen; /* MAXSTR, or less, if caller has shorter buffer */ + char *inpstring; /* the prompt */ + int inpstringlen; /* length of the prompt */ + int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */ +@@ -134,8 +134,8 @@ + if (!flayer) + return; + +- if (len > 100) +- len = 100; ++ if (len > MAXSTR) ++ len = MAXSTR; + if (!(mode & INP_NOECHO)) + { + maxlen = flayer->l_width - 1 - strlen(istr); +Index: screen/process.c +=================================================================== +--- screen.orig/process.c 2012-03-20 22:34:27.000000000 +0100 ++++ screen/process.c 2012-03-20 22:35:13.000000000 +0100 +@@ -2097,7 +2097,7 @@ + ChangeAKA(fore, *args, strlen(*args)); + break; + case RC_COLON: +- Input(":", 100, INP_EVERY, Colonfin, NULL, 0); ++ Input(":", MAXSTR, INP_EVERY, Colonfin, NULL, 0); + if (*args && **args) + { + s = *args; +Index: screen/screen.h +=================================================================== +--- screen.orig/screen.h 2012-03-20 22:34:27.000000000 +0100 ++++ screen/screen.h 2012-03-20 22:35:13.000000000 +0100 +@@ -91,7 +91,7 @@ + + #define Ctrl(c) ((c)&037) + +-#define MAXSTR 512 ++#define MAXSTR 768 + #define MAXARGS 64 + #define MSGWAIT 5 + #define MSGMINWAIT 1 +Index: screen/window.c +=================================================================== +--- screen.orig/window.c 2012-03-20 22:34:27.000000000 +0100 ++++ screen/window.c 2012-03-20 22:35:13.000000000 +0100 +@@ -2233,7 +2233,7 @@ + return; + } + flayer = &p->w_layer; +- Input(":", 100, INP_COOKED, zmodem_fin, NULL, 0); ++ Input(":", MAXSTR, INP_COOKED, zmodem_fin, NULL, 0); + s = send ? zmodem_sendcmd : zmodem_recvcmd; + n = strlen(s); + LayProcess(&s, &n); diff -Nru screen-4.0.3/debian/patches/15manpage_typos.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/15manpage_typos.dpatch --- screen-4.0.3/debian/patches/15manpage_typos.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/15manpage_typos.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 15manpage_typos.dpatch by -## -## DP: Fix a few typos and groff errors in the documentation. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:40:31.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:40:42.000000000 +0200 -@@ -3185,7 +3185,7 @@ - Specify the transmission of eight (or seven) bits per byte. - .IP "ixon or -ixon" - Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data. --.IP "ixoff or -ixon" -+.IP "ixoff or -ixoff" - Enables (or disables) software flow-control for receiving data. - .IP "istrip or -istrip" - Clear (or keep) the eight bit in each received byte. -@@ -4028,7 +4028,7 @@ - Background Black - .TP 27 - \h'\w'ESC [ Ps = 'u'\fB...\fP --... -+\&... - .TP 27 - \h'\w'ESC [ Ps = 'u'\fB49\fP (A) - Background Default diff -Nru screen-4.0.3/debian/patches/16fix_gcc_warnings.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/16fix_gcc_warnings.dpatch --- screen-4.0.3/debian/patches/16fix_gcc_warnings.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/16fix_gcc_warnings.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 16fix_gcc_warnings.dpatch by -## -## DP: Get rid of several minor gcc warnings. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c ---- screen-4.0.3.orig/attacher.c 2008-06-01 23:40:23.000000000 +0200 -+++ screen-4.0.3/attacher.c 2008-06-01 23:41:01.000000000 +0200 -@@ -820,7 +820,7 @@ - pam_handle_t *pamh = 0; - int pam_error; - #endif -- char *pass, mypass[16 + 1], salt[3]; -+ char *pass = 0, mypass[16 + 1], salt[3]; - int using_pam = 1; - - #ifdef USE_PAM -diff -Naur screen-4.0.3.orig/layer.c screen-4.0.3/layer.c ---- screen-4.0.3.orig/layer.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/layer.c 2008-06-01 23:41:01.000000000 +0200 -@@ -451,7 +451,7 @@ - void - LClearLine(l, y, xs, xe, bce, ol) - struct layer *l; --int xs, xe, bce; -+int y, xs, xe, bce; - struct mline *ol; - { - struct canvas *cv; -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:40:40.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:41:01.000000000 +0200 -@@ -3123,7 +3123,7 @@ - int newnr, fl = 0, kf = 0, af = 0, df = 0, mf = 0; - struct display *odisp = display; - int used = 0; -- struct kmap_ext *kme; -+ struct kmap_ext *kme = 0; - - for (; *args && **args == '-'; args++, argl++) - { -diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/screen.c 2008-06-01 23:41:01.000000000 +0200 -@@ -2360,7 +2360,7 @@ - int truncpos = -1; - int truncper = 0; - int trunclong = 0; -- struct backtick *bt; -+ struct backtick *bt = 0; - - if (winmsg_numrend >= 0) - winmsg_numrend = 0; diff -Nru screen-4.0.3/debian/patches/16fix_gcc_warnings.patch screen-4.1.0~20120320gitdb59704/debian/patches/16fix_gcc_warnings.patch --- screen-4.0.3/debian/patches/16fix_gcc_warnings.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/16fix_gcc_warnings.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,28 @@ +Author: +Description: Get rid of several minor gcc warnings. +Index: screen/attacher.c +=================================================================== +--- screen.orig/attacher.c 2011-10-08 19:58:12.000000000 +0200 ++++ screen/attacher.c 2011-10-08 19:58:41.000000000 +0200 +@@ -848,7 +848,7 @@ + pam_handle_t *pamh = 0; + int pam_error; + #endif +- char *pass, mypass[16 + 1], salt[3]; ++ char *pass = 0, mypass[16 + 1], salt[3]; + int using_pam = 1; + + #ifdef USE_PAM +Index: screen/layer.c +=================================================================== +--- screen.orig/layer.c 2011-10-08 19:54:20.000000000 +0200 ++++ screen/layer.c 2011-10-08 19:58:41.000000000 +0200 +@@ -492,7 +492,7 @@ + void + LClearLine(l, y, xs, xe, bce, ol) + struct layer *l; +-int xs, xe, bce; ++int y, xs, xe, bce; + struct mline *ol; + { + struct canvas *cv; diff -Nru screen-4.0.3/debian/patches/16fix_gcc_warnings_II.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/16fix_gcc_warnings_II.dpatch --- screen-4.0.3/debian/patches/16fix_gcc_warnings_II.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/16fix_gcc_warnings_II.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,198 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 16fix_gcc_warnings_II.dpatch -## -## DP: ... - -@DPATCH@ -diff -Naur screen-4.0.3.orig/display.c screen-4.0.3/display.c ---- screen-4.0.3.orig/display.c 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/display.c 2008-06-01 23:41:19.000000000 +0200 -@@ -4423,7 +4423,7 @@ - } - } - --struct lay * -+struct layout * - CreateLayout(title, startat) - char *title; - int startat; -diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h ---- screen-4.0.3.orig/extern.h 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/extern.h 2008-06-01 23:41:19.000000000 +0200 -@@ -289,6 +289,10 @@ - #endif - extern void SetCanvasWindow __P((struct canvas *, struct win *)); - extern int MakeDefaultCanvas __P((void)); -+extern void RecreateCanvasChain __P((void)); -+extern int CountCanvasPerp __P((struct canvas *)); -+extern void EqualizeCanvas __P((struct canvas *, int)); -+extern void ResizeCanvas __P((struct canvas *)); - extern int AddCanvas __P((int)); - extern void RemCanvas __P((void)); - extern void OneCanvas __P((void)); -@@ -307,6 +311,12 @@ - extern void ResetIdle __P((void)); - extern void KillBlanker __P((void)); - extern void DisplaySleep1000 __P((int, int)); -+extern void SaveLayout __P((char *, struct canvas *)); -+extern void AutosaveLayout __P((struct layout *)); -+extern struct layout *FindLayout __P((char *)); -+extern void LoadLayout __P((struct layout *, struct canvas *)); -+extern void NewLayout __P((char *, int)); -+extern void ShowLayouts __P((int)); - - /* resize.c */ - extern int ChangeWindowSize __P((struct win *, int, int, int)); -diff -Naur screen-4.0.3.orig/help.c screen-4.0.3/help.c ---- screen-4.0.3.orig/help.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/help.c 2008-06-01 23:41:19.000000000 +0200 -@@ -1302,7 +1302,7 @@ - if (wtab[pos] && WTAB_GROUP_MATCHES(pos)) - break; - if (pos == -1) -- pos == MAXWIN; -+ pos = MAXWIN; - } - } - wlistdata->pos = pos; -diff -Naur screen-4.0.3.orig/input.c screen-4.0.3/input.c ---- screen-4.0.3.orig/input.c 2008-06-01 23:40:40.000000000 +0200 -+++ screen-4.0.3/input.c 2008-06-01 23:41:19.000000000 +0200 -@@ -142,7 +142,7 @@ - inpdata->inpmode = mode; - inpdata->privdata = data; - if (!priv) -- priv = &inpdata->privdata; -+ priv = (char *)&inpdata->privdata; - inpdata->priv = priv; - inpdata->inpstringlen = 0; - inpdata->inpstring = NULL; -diff -Naur screen-4.0.3.orig/layer.c screen-4.0.3/layer.c ---- screen-4.0.3.orig/layer.c 2008-06-01 23:41:11.000000000 +0200 -+++ screen-4.0.3/layer.c 2008-06-01 23:41:19.000000000 +0200 -@@ -398,7 +398,6 @@ - { - struct canvas *cv; - struct viewport *vp; -- char *s2; - int xs2, xe2, y2, len, len2; - struct mchar or; - -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:41:11.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:41:19.000000000 +0200 -@@ -2070,15 +2070,15 @@ - #endif - case RC_WINDOWLIST: - if (!*args) -- display_wlist(0, WLIST_NUM, (char *)0); -+ display_wlist(0, WLIST_NUM, (struct win *)0); - else if (!strcmp(*args, "-m") && !args[1]) -- display_wlist(0, WLIST_MRU, (char *)0); -+ display_wlist(0, WLIST_MRU, (struct win *)0); - else if (!strcmp(*args, "-b") && !args[1]) -- display_wlist(1, WLIST_NUM, (char *)0); -+ display_wlist(1, WLIST_NUM, (struct win *)0); - else if (!strcmp(*args, "-b") && !strcmp(args[1], "-m") && !args[2]) -- display_wlist(1, WLIST_MRU, (char *)0); -+ display_wlist(1, WLIST_MRU, (struct win *)0); - else if (!strcmp(*args, "-m") && !strcmp(args[1], "-b") && !args[2]) -- display_wlist(1, WLIST_MRU, (char *)0); -+ display_wlist(1, WLIST_MRU, (struct win *)0); - else if (!strcmp(*args, "string")) - { - if (args[1]) -@@ -3967,7 +3967,7 @@ - if (args[0][0]) - { - fore->w_group = WindowByName(*args); -- if (fore->w_group && fore->w_group != W_TYPE_GROUP) -+ if (fore->w_group && fore->w_type != W_TYPE_GROUP) - fore->w_group = 0; - } - } -@@ -4071,7 +4071,6 @@ - } - else if (!strcmp(args[0], "select")) - { -- struct layout *lay; - if (!args[1]) - { - Input("Switch to layout: ", 20, INP_COOKED, SelectLayoutFin, NULL, 0); -@@ -4952,7 +4951,7 @@ - { - register struct win **pp; - int n = fore ? fore->w_number : MAXWIN; -- char *group = fore ? fore->w_group : 0; -+ struct win *group = fore ? fore->w_group : (struct win *)0; - - for (pp = fore ? wtab + n + 1 : wtab; pp != wtab + n; pp++) - { -@@ -4974,7 +4973,7 @@ - { - register struct win **pp; - int n = fore ? fore->w_number : -1; -- char *group = fore ? fore->w_group : 0; -+ struct win *group = fore ? fore->w_group : (struct win *)0; - - for (pp = wtab + n - 1; pp != wtab + n; pp--) - { -@@ -5485,14 +5484,13 @@ - int len; - char *data; /* dummy */ - { -- int n; - struct layout *lay; - - if (!len || !display) - return; - if (len == 1 && *buf == '-') - { -- LoadLayout((struct layout *)0); -+ LoadLayout((struct layout *)0, (struct canvas *)0); - Activate(0); - return; - } -@@ -6445,7 +6443,7 @@ - int flags; - { - struct canvas *cv; -- int nreg, dsize, diff, siz, nsiz, l, done; -+ int diff, l; - int gflag = 0, abs = 0, percent = 0; - int orient = 0; - -diff -Naur screen-4.0.3.orig/resize.c screen-4.0.3/resize.c ---- screen-4.0.3.orig/resize.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/resize.c 2008-06-01 23:41:19.000000000 +0200 -@@ -146,9 +146,8 @@ - int change_fore; - { - struct win *p; -- struct canvas *cv, **cvpp; -+ struct canvas *cv; - int wwi; -- int y, h, hn, xe, ye; - - debug2("ChangeScreenSize from (%d,%d) ", D_width, D_height); - debug3("to (%d,%d) (change_fore: %d)\n",wi, he, change_fore); -diff -Naur screen-4.0.3.orig/socket.c screen-4.0.3/socket.c ---- screen-4.0.3.orig/socket.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/socket.c 2008-06-01 23:41:19.000000000 +0200 -@@ -1193,7 +1193,6 @@ - char *p; - int pid; - int noshowwin; -- int r = 0; - struct win *wi; - - ASSERT(display); -@@ -1318,7 +1317,7 @@ - #endif - { - flayer = D_forecv->c_layer; -- display_wlist(1, WLIST_NUM, (char *)0); -+ display_wlist(1, WLIST_NUM, (struct win *)0); - noshowwin = 1; - } - } diff -Nru screen-4.0.3/debian/patches/17manpage_sessionname_warning.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/17manpage_sessionname_warning.dpatch --- screen-4.0.3/debian/patches/17manpage_sessionname_warning.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/17manpage_sessionname_warning.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 17manpage_sessionname_warning.dpatch by -## -## DP: Discourage the use of 'sessionname' (see #103771). - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:40:56.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:44:56.000000000 +0200 -@@ -2603,9 +2603,10 @@ - .PP - Rename the current session. Note, that for \*Qscreen -list\*U the - name shows up with the process-id prepended. If the argument \*Qname\*U --is omitted, the name of this session is displayed. Caution: The $STY --environment variables still reflects the old name. This may result in --confusion. -+is omitted, the name of this session is displayed. Caution: Among other -+problems, the $STY environment variable still reflects the old name. -+Use of this command is strongly discouraged. Use the \*Q-S\*U commandline -+option if you need this feature. - The default is constructed from the tty and host names. - .sp - .ne 3 -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:40:31.000000000 +0200 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:44:56.000000000 +0200 -@@ -1757,9 +1757,11 @@ - Rename the current session. Note that for @code{screen -list} the name - shows up with the process-id prepended. If the argument @var{name} is - omitted, the name of this session is displayed.@* --@emph{Caution}: The @code{$STY} --environment variable still reflects the old name. This may result in --confusion. The default is constructed from the tty and host names. -+@emph{Caution}: Among other problems, the @code{$STY} -+environment variable still reflects the old name. Use of this command -+is strongly discouraged. Use the @code{-S} commandline option if you -+need this feature. -+The default is constructed from the tty and host names. - @end deffn - - @node Suspend, Quit, Session Name, Session Management diff -Nru screen-4.0.3/debian/patches/18manpage_maxwin_limit.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/18manpage_maxwin_limit.dpatch --- screen-4.0.3/debian/patches/18manpage_maxwin_limit.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/18manpage_maxwin_limit.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 18manpage_maxwin_limit.dpatch by -## -## DP: The builtin 'screen' command can directly reference window IDs -## DP: up to MAXWIN, not only {0-9}. Additionally mention Debian's -## DP: MAXWIN default in the man and info pages. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:44:57.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:44:57.000000000 +0200 -@@ -2545,9 +2545,9 @@ - and scrollback option (\fB-h\fP ) may be specified with each command. - The option (\fB-M\fP) turns monitoring on for this window. - The option (\fB-L\fP) turns output logging on for this window. --If an optional number \fIn\fP in the range 0..9 is given, the window --number \fIn\fP is assigned to the newly created window (or, if this --number is already in-use, the next available number). -+If an optional number \fIn\fP in the range 0..MAXWIN-1 is given, -+the window number \fIn\fP is assigned to the newly created window -+(or, if this number is already in-use, the next available number). - If a command is specified after \*Qscreen\*U, this command (with the given - arguments) is started in the window; otherwise, a shell is created. - Thus, if your \*Q.screenrc\*U contains the lines -@@ -2593,7 +2593,7 @@ - is assigned to this window. - Thus, the first window can be activated by \*Qselect 0\*U. - The number of windows is limited at compile-time by the MAXWIN --configuration parameter. -+configuration parameter (which defaults to 40 in Debian). - There are two special WindowIDs, \*Q-\*U selects the - internal blank window and \*Q.\*U selects the current window. The - latter is useful if used with screen's \*Q-X\*U option. -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:44:57.000000000 +0200 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:44:57.000000000 +0200 -@@ -1168,9 +1168,9 @@ - - This section describes the commands for creating a new window for - running programs. When a new window is created, the first available --number from the range 0@dots{}9 is assigned to it. -+number is assigned to it. - The number of windows is limited at compile-time by the MAXWIN --configuration parameter. -+configuration parameter (which defaults to 40 in Debian). - - @menu - * Chdir:: Change the working directory for new windows. -@@ -1212,7 +1212,7 @@ - (@samp{-h @var{num}}) may be specified with each command. - The option (@samp{-M}) turns monitoring on for this window. - The option (@samp{-L}) turns output logging on for this window. --If an optional number @var{n} in the range 0@dots{}9 is given, -+If an optional number @var{n} in the range 0@dots{}MAXWIN-1 is given, - the window number @var{n} is assigned to the newly created window (or, - if this number is already in-use, the next available number). If a - command is specified after @code{screen}, this command (with the given diff -Nru screen-4.0.3/debian/patches/19flowcontrol_lockup.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/19flowcontrol_lockup.dpatch --- screen-4.0.3/debian/patches/19flowcontrol_lockup.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/19flowcontrol_lockup.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 19flowcontrol_lockup.dpatch by -## -## DP: Make Flush() truly non-blocking by employing an extra select(). -## DP: Thus D_userfd is assured to be in non-blocking mode on return -## DP: (even if the return was premature due to select() timing out), -## DP: so the SetTTY() call in FreeDisplay() doesn't have to be -## DP: safeguarded on its own. -## DP: -## DP: Note - I'm not satisfied at all with this patch, but I consider -## DP: it an ugly but working kluge, meant only to stay around as long -## DP: as upstream hasn't come up with anything better. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/display.c screen-4.0.3/display.c ---- screen-4.0.3.orig/display.c 2008-06-01 23:41:50.000000000 +0200 -+++ screen-4.0.3/display.c 2008-06-01 23:44:57.000000000 +0200 -@@ -3556,6 +3556,8 @@ - { - register int l; - register char *p; -+ fd_set fd_s; -+ struct timeval sO; - - ASSERT(display); - l = D_obufp - D_obuf; -@@ -3570,15 +3572,29 @@ - return; - } - p = D_obuf; -- if (fcntl(D_userfd, F_SETFL, 0)) -- debug1("Warning: BLOCK fcntl failed: %d\n", errno); -+ if (fcntl(D_userfd, F_SETFL, FNBLOCK)) -+ debug1("Warning: NBLOCK fcntl failed: %d\n", errno); -+ if (D_blocked == 1) -+ D_blocked = 0; -+ D_blocked_fuzz = 0; - while (l) - { -- register int wr; -+ register int wr = 0; -+ sO.tv_sec = 5; sO.tv_usec = 0; -+ while (1) { -+ int sR; -+ FD_ZERO(&fd_s); -+ FD_SET(D_userfd, &fd_s); -+ sR = select(D_userfd+1, NULL, &fd_s, NULL, &sO); -+ if (!sR) { -+ debug("Timeout while waiting for display write fd to unblock\n"); -+ return; -+ } else if (sR > 0) break; -+ } - wr = write(D_userfd, p, l); - if (wr <= 0) - { -- if (errno == EINTR) -+ if (errno == EINTR || errno == EAGAIN) - continue; - debug1("Writing to display: %d\n", errno); - wr = l; -@@ -3591,11 +3607,6 @@ - } - D_obuffree += l; - D_obufp = D_obuf; -- if (fcntl(D_userfd, F_SETFL, FNBLOCK)) -- debug1("Warning: NBLOCK fcntl failed: %d\n", errno); -- if (D_blocked == 1) -- D_blocked = 0; -- D_blocked_fuzz = 0; - } - - void diff -Nru screen-4.0.3/debian/patches/20defmonitor.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/20defmonitor.dpatch --- screen-4.0.3/debian/patches/20defmonitor.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/20defmonitor.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 20defmonitor.dpatch by -## -## DP: Fix defmonitor / ^a-M behaviour. -## DP: Note that this is only one half of it - ^A-i still shows -## DP: the "mon" flag based solely on fore->w_monitor, which is -## DP: tremendously ugly. Fix pending. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:41:50.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:44:58.000000000 +0200 -@@ -2029,7 +2029,12 @@ - WriteString(fore, "\033c", 2); - break; - case RC_MONITOR: -- n = fore->w_monitor != MON_OFF; -+#ifdef MULTIUSER -+ if (display) -+ n = !!(ACLBYTE(fore->w_mon_notify, D_user->u_id) & ACLBIT(D_user->u_id)); -+ else -+#endif -+ n = fore->w_monitor != MON_OFF; - if (ParseSwitch(act, &n)) - break; - if (n) diff -Nru screen-4.0.3/debian/patches/21manpage_nethack_activation.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/21manpage_nethack_activation.dpatch --- screen-4.0.3/debian/patches/21manpage_nethack_activation.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/21manpage_nethack_activation.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 21manpage_nethack_activation.dpatch by -## -## DP: Document that there are two possible causes for 'nethack on' -## DP: being activated by default... - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:44:57.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:44:58.000000000 +0200 -@@ -2268,7 +2268,8 @@ - .I screen - was compiled with the NETHACK flag defined. The - default setting is then determined by the presence of the environment --variable $NETHACKOPTIONS. -+variable $NETHACKOPTIONS and the file ~/.nethackrc - if either one is present, -+the default is \fBon\fP. - .sp - .ne 3 - .B next -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:44:57.000000000 +0200 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:44:58.000000000 +0200 -@@ -4447,7 +4447,8 @@ - This option is only available if @code{screen} was compiled with the - NETHACK flag defined (@pxref{Installation}). The default setting is then - determined by the presence of the environment variable --@code{$NETHACKOPTIONS}. -+@code{$NETHACKOPTIONS} and the file @code{~/.nethackrc} - if either one is -+present, the default is @code{on}. - @end deffn - - @node Nonblock, Number, Nethack, Miscellaneous diff -Nru screen-4.0.3/debian/patches/22exchange_file_mode.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/22exchange_file_mode.dpatch --- screen-4.0.3/debian/patches/22exchange_file_mode.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/22exchange_file_mode.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 22exchange_file_mode.dpatch by -## -## DP: Make it a bit harder to shoot oneself in the foot by -## DP: keeping the umask tight by default when creating the -## DP: screen exchange file. Fearless users may still chmod it. - -@DPATCH@ ---- screen-4.0.3.orig/fileio.c 2009-04-02 02:01:23.530568088 +0200 -+++ screen-4.0.3/fileio.c 2009-04-02 02:02:18.155521670 +0200 -@@ -367,11 +367,6 @@ - char *mode = "w"; - #ifdef COPY_PASTE - int public = 0; --# ifdef _MODE_T -- mode_t old_umask; --# else -- int old_umask; --# endif - # ifdef HAVE_LSTAT - struct stat stb, stb2; - int fd, exists = 0; -@@ -434,7 +429,6 @@ - #ifdef COPY_PASTE - if (dump == DUMP_EXCHANGE && public) - { -- old_umask = umask(0); - # ifdef HAVE_LSTAT - if (exists) - { -@@ -455,7 +449,6 @@ - # else - f = fopen(fn, mode); - # endif -- umask(old_umask); - } - else - #endif /* COPY_PASTE */ diff -Nru screen-4.0.3/debian/patches/22exchange_file_mode.patch screen-4.1.0~20120320gitdb59704/debian/patches/22exchange_file_mode.patch --- screen-4.0.3/debian/patches/22exchange_file_mode.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/22exchange_file_mode.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,36 @@ +Author: +Description: Make it a bit harder to shoot oneself in the foot by +keeping the umask tight by default when creating the +screen exchange file. Fearless users may still chmod it. +Index: screen/fileio.c +=================================================================== +--- screen.orig/fileio.c 2011-10-08 19:54:19.000000000 +0200 ++++ screen/fileio.c 2011-10-08 19:58:46.000000000 +0200 +@@ -413,11 +413,6 @@ + char *mode = "w"; + #ifdef COPY_PASTE + int public = 0; +-# ifdef _MODE_T +- mode_t old_umask; +-# else +- int old_umask; +-# endif + # ifdef HAVE_LSTAT + struct stat stb, stb2; + int fd, exists = 0; +@@ -480,7 +475,6 @@ + #ifdef COPY_PASTE + if (dump == DUMP_EXCHANGE && public) + { +- old_umask = umask(0); + # ifdef HAVE_LSTAT + if (exists) + { +@@ -501,7 +495,6 @@ + # else + f = fopen(fn, mode); + # endif +- umask(old_umask); + } + else + #endif /* COPY_PASTE */ diff -Nru screen-4.0.3/debian/patches/23exitcode_q_ls.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/23exitcode_q_ls.dpatch --- screen-4.0.3/debian/patches/23exitcode_q_ls.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/23exitcode_q_ls.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 23exitcode_q_ls.dpatch by -## -## DP: Make the exitcode of '-q -ls' and friends ('-qr -ls' and even -## DP: '-qdr -ls') match the documentation. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2008-06-01 23:41:11.000000000 +0200 -+++ screen-4.0.3/screen.c 2008-06-01 23:44:59.000000000 +0200 -@@ -1073,8 +1073,12 @@ - eff_uid = real_uid; - eff_gid = real_gid; - i = FindSocket((int *)NULL, &fo, &oth, SockMatch); -- if (quietflag) -- exit(8 + (fo ? ((oth || i) ? 2 : 1) : 0) + i); -+ if (quietflag) { -+ if (rflag) -+ exit(10 + i); -+ else -+ exit(9 + (fo || oth ? 1 : 0) + fo); -+ } - if (fo == 0) - Panic(0, "No Sockets found in %s.\n", SockPath); - Panic(0, "%d Socket%s in %s.\n", fo, fo > 1 ? "s" : "", SockPath); diff -Nru screen-4.0.3/debian/patches/23exitcode_q_ls.patch screen-4.1.0~20120320gitdb59704/debian/patches/23exitcode_q_ls.patch --- screen-4.0.3/debian/patches/23exitcode_q_ls.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/23exitcode_q_ls.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,22 @@ +Author: +Description: Make the exitcode of '-q -ls' and friends ('-qr -ls' and even +'-qdr -ls') match the documentation. +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2011-10-08 19:58:41.000000000 +0200 ++++ screen/screen.c 2011-10-08 19:58:51.000000000 +0200 +@@ -1164,8 +1164,12 @@ + #endif + SET_GUID(); + i = FindSocket((int *)NULL, &fo, &oth, SockMatch); +- if (quietflag) +- exit(8 + (fo ? ((oth || i) ? 2 : 1) : 0) + i); ++ if (quietflag) { ++ if (rflag) ++ exit(10 + i); ++ else ++ exit(9 + (fo || oth ? 1 : 0) + fo); ++ } + if (fo == 0) + Panic(0, "No Sockets found in %s.\n", SockPath); + Panic(0, "%d Socket%s in %s.\n", fo, fo > 1 ? "s" : "", SockPath); diff -Nru screen-4.0.3/debian/patches/24option_parser.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/24option_parser.dpatch --- screen-4.0.3/debian/patches/24option_parser.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/24option_parser.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 24option_parser.dpatch by -## -## DP: This is not getopt() and we don't have two leading dashes, so -## DP: parse and match the long options in full. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2008-06-01 23:44:59.000000000 +0200 -+++ screen-4.0.3/screen.c 2008-06-01 23:44:59.000000000 +0200 -@@ -621,6 +621,8 @@ - } - break; - case 'w': -+ if (strcmp(ap+1, "ipe")) -+ exit_with_usage(myname, "Unknown option %s", --ap); - lsflag = 1; - wipeflag = 1; - if (ac > 1 && !SockMatch) diff -Nru screen-4.0.3/debian/patches/24option_parser.patch screen-4.1.0~20120320gitdb59704/debian/patches/24option_parser.patch --- screen-4.0.3/debian/patches/24option_parser.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/24option_parser.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,16 @@ +Author: +Description: This is not getopt() and we don't have two leading dashes, so +parse and match the long options in full. +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2011-10-08 19:58:51.000000000 +0200 ++++ screen/screen.c 2011-10-08 19:58:56.000000000 +0200 +@@ -655,6 +655,8 @@ + } + break; + case 'w': ++ if (strcmp(ap+1, "ipe")) ++ exit_with_usage(myname, "Unknown option %s", --ap); + lsflag = 1; + wipeflag = 1; + if (ac > 1 && !SockMatch) diff -Nru screen-4.0.3/debian/patches/25allow_symlink_sockdir.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/25allow_symlink_sockdir.dpatch --- screen-4.0.3/debian/patches/25allow_symlink_sockdir.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/25allow_symlink_sockdir.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 25allow_symlink_sockdir.dpatch by -## -## DP: I don't know why screen should not allow a symlinked SockDir; -## DP: so now it does. (Note: this is one of TWO calls to lstat() -## DP: the whole program has - and this one isn't even wrapped in -## DP: #ifdef HAVE_LSTAT as it should.) - -@DPATCH@ -diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2008-06-01 23:44:59.000000000 +0200 -+++ screen-4.0.3/screen.c 2008-06-01 23:44:59.000000000 +0200 -@@ -989,7 +989,7 @@ - else - { - SockDir = SOCKDIR; -- if (lstat(SockDir, &st)) -+ if (stat(SockDir, &st)) - { - n = (eff_uid == 0 && (real_uid || eff_gid == real_gid)) ? 0755 : - (eff_gid != real_gid) ? 0775 : diff -Nru screen-4.0.3/debian/patches/26source_encoding.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/26source_encoding.dpatch --- screen-4.0.3/debian/patches/26source_encoding.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/26source_encoding.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,358 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 26source_encoding.dpatch by Ben Finney -## -## DP: Replace the composed characters with their respective description. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:44:58.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:45:00.000000000 +0200 -@@ -223,177 +223,177 @@ - - /* digraph table taken from old vim and rfc1345 */ - static const unsigned char digraphs[][3] = { -- {' ', ' ', 160}, /* */ -- {'N', 'S', 160}, /* */ -- {'~', '!', 161}, /* */ -- {'!', '!', 161}, /* */ -- {'!', 'I', 161}, /* */ -- {'c', '|', 162}, /* */ -- {'c', 't', 162}, /* */ -- {'$', '$', 163}, /* */ -- {'P', 'd', 163}, /* */ -- {'o', 'x', 164}, /* */ -- {'C', 'u', 164}, /* */ -- {'C', 'u', 164}, /* */ -- {'E', 'u', 164}, /* */ -- {'Y', '-', 165}, /* */ -- {'Y', 'e', 165}, /* */ -- {'|', '|', 166}, /* */ -- {'B', 'B', 166}, /* */ -- {'p', 'a', 167}, /* */ -- {'S', 'E', 167}, /* */ -- {'"', '"', 168}, /* */ -- {'\'', ':', 168}, /* */ -- {'c', 'O', 169}, /* */ -- {'C', 'o', 169}, /* */ -- {'a', '-', 170}, /* */ -- {'<', '<', 171}, /* */ -- {'-', ',', 172}, /* */ -- {'N', 'O', 172}, /* */ -- {'-', '-', 173}, /* */ -- {'r', 'O', 174}, /* */ -- {'R', 'g', 174}, /* */ -- {'-', '=', 175}, /* */ -- {'\'', 'm', 175}, /* */ -- {'~', 'o', 176}, /* */ -- {'D', 'G', 176}, /* */ -- {'+', '-', 177}, /* */ -- {'2', '2', 178}, /* */ -- {'2', 'S', 178}, /* */ -- {'3', '3', 179}, /* */ -- {'3', 'S', 179}, /* */ -- {'\'', '\'', 180}, /* */ -- {'j', 'u', 181}, /* */ -- {'M', 'y', 181}, /* */ -- {'p', 'p', 182}, /* */ -- {'P', 'I', 182}, /* */ -- {'~', '.', 183}, /* */ -- {'.', 'M', 183}, /* */ -- {',', ',', 184}, /* */ -- {'\'', ',', 184}, /* */ -- {'1', '1', 185}, /* */ -- {'1', 'S', 185}, /* */ -- {'o', '-', 186}, /* */ -- {'>', '>', 187}, /* */ -- {'1', '4', 188}, /* */ -- {'1', '2', 189}, /* */ -- {'3', '4', 190}, /* */ -- {'~', '?', 191}, /* */ -- {'?', '?', 191}, /* */ -- {'?', 'I', 191}, /* */ -- {'A', '`', 192}, /* */ -- {'A', '!', 192}, /* */ -- {'A', '\'', 193}, /* */ -- {'A', '^', 194}, /* */ -- {'A', '>', 194}, /* */ -- {'A', '~', 195}, /* */ -- {'A', '?', 195}, /* */ -- {'A', '"', 196}, /* */ -- {'A', ':', 196}, /* */ -- {'A', '@', 197}, /* */ -- {'A', 'A', 197}, /* */ -- {'A', 'E', 198}, /* */ -- {'C', ',', 199}, /* */ -- {'E', '`', 200}, /* */ -- {'E', '!', 200}, /* */ -- {'E', '\'', 201}, /* */ -- {'E', '^', 202}, /* */ -- {'E', '>', 202}, /* */ -- {'E', '"', 203}, /* */ -- {'E', ':', 203}, /* */ -- {'I', '`', 204}, /* */ -- {'I', '!', 204}, /* */ -- {'I', '\'', 205}, /* */ -- {'I', '^', 206}, /* */ -- {'I', '>', 206}, /* */ -- {'I', '"', 207}, /* */ -- {'I', ':', 207}, /* */ -- {'D', '-', 208}, /* */ -- {'N', '~', 209}, /* */ -- {'N', '?', 209}, /* */ -- {'O', '`', 210}, /* */ -- {'O', '!', 210}, /* */ -- {'O', '\'', 211}, /* */ -- {'O', '^', 212}, /* */ -- {'O', '>', 212}, /* */ -- {'O', '~', 213}, /* */ -- {'O', '?', 213}, /* */ -- {'O', '"', 214}, /* */ -- {'O', ':', 214}, /* */ -- {'/', '\\', 215}, /* */ -- {'*', 'x', 215}, /* */ -- {'O', '/', 216}, /* */ -- {'U', '`', 217}, /* */ -- {'U', '!', 217}, /* */ -- {'U', '\'', 218}, /* */ -- {'U', '^', 219}, /* */ -- {'U', '>', 219}, /* */ -- {'U', '"', 220}, /* */ -- {'U', ':', 220}, /* */ -- {'Y', '\'', 221}, /* */ -- {'I', 'p', 222}, /* */ -- {'T', 'H', 222}, /* */ -- {'s', 's', 223}, /* */ -- {'s', '"', 223}, /* */ -- {'a', '`', 224}, /* */ -- {'a', '!', 224}, /* */ -- {'a', '\'', 225}, /* */ -- {'a', '^', 226}, /* */ -- {'a', '>', 226}, /* */ -- {'a', '~', 227}, /* */ -- {'a', '?', 227}, /* */ -- {'a', '"', 228}, /* */ -- {'a', ':', 228}, /* */ -- {'a', 'a', 229}, /* */ -- {'a', 'e', 230}, /* */ -- {'c', ',', 231}, /* */ -- {'e', '`', 232}, /* */ -- {'e', '!', 232}, /* */ -- {'e', '\'', 233}, /* */ -- {'e', '^', 234}, /* */ -- {'e', '>', 234}, /* */ -- {'e', '"', 235}, /* */ -- {'e', ':', 235}, /* */ -- {'i', '`', 236}, /* */ -- {'i', '!', 236}, /* */ -- {'i', '\'', 237}, /* */ -- {'i', '^', 238}, /* */ -- {'i', '>', 238}, /* */ -- {'i', '"', 239}, /* */ -- {'i', ':', 239}, /* */ -- {'d', '-', 240}, /* */ -- {'n', '~', 241}, /* */ -- {'n', '?', 241}, /* */ -- {'o', '`', 242}, /* */ -- {'o', '!', 242}, /* */ -- {'o', '\'', 243}, /* */ -- {'o', '^', 244}, /* */ -- {'o', '>', 244}, /* */ -- {'o', '~', 245}, /* */ -- {'o', '?', 245}, /* */ -- {'o', '"', 246}, /* */ -- {'o', ':', 246}, /* */ -- {':', '-', 247}, /* */ -- {'o', '/', 248}, /* */ -- {'u', '`', 249}, /* */ -- {'u', '!', 249}, /* */ -- {'u', '\'', 250}, /* */ -- {'u', '^', 251}, /* */ -- {'u', '>', 251}, /* */ -- {'u', '"', 252}, /* */ -- {'u', ':', 252}, /* */ -- {'y', '\'', 253}, /* */ -- {'i', 'p', 254}, /* */ -- {'t', 'h', 254}, /* */ -- {'y', '"', 255}, /* */ -- {'y', ':', 255}, /* */ -- {'"', '[', 196}, /* */ -- {'"', '\\', 214}, /* */ -- {'"', ']', 220}, /* */ -- {'"', '{', 228}, /* */ -- {'"', '|', 246}, /* */ -- {'"', '}', 252}, /* */ -- {'"', '~', 223} /* */ -+ {' ', ' ', 0x00a0}, /* NO-BREAK SPACE */ -+ {'N', 'S', 0x00a0}, /* NO-BREAK SPACE */ -+ {'~', '!', 0x00a1}, /* INVERTED EXCLAMATION MARK */ -+ {'!', '!', 0x00a1}, /* INVERTED EXCLAMATION MARK */ -+ {'!', 'I', 0x00a1}, /* INVERTED EXCLAMATION MARK */ -+ {'c', '|', 0x00a2}, /* CENT SIGN */ -+ {'c', 't', 0x00a2}, /* CENT SIGN */ -+ {'$', '$', 0x00a3}, /* POUND SIGN */ -+ {'P', 'd', 0x00a3}, /* POUND SIGN */ -+ {'o', 'x', 0x00a4}, /* CURRENCY SIGN */ -+ {'C', 'u', 0x00a4}, /* CURRENCY SIGN */ -+ {'C', 'u', 0x00a4}, /* CURRENCY SIGN */ -+ {'E', 'u', 0x00a4}, /* CURRENCY SIGN */ -+ {'Y', '-', 0x00a5}, /* YEN SIGN */ -+ {'Y', 'e', 0x00a5}, /* YEN SIGN */ -+ {'|', '|', 0x00a6}, /* BROKEN BAR */ -+ {'B', 'B', 0x00a6}, /* BROKEN BAR */ -+ {'p', 'a', 0x00a7}, /* SECTION SIGN */ -+ {'S', 'E', 0x00a7}, /* SECTION SIGN */ -+ {'"', '"', 0x00a8}, /* DIAERESIS */ -+ {'\'', ':', 0x00a8}, /* DIAERESIS */ -+ {'c', 'O', 0x00a9}, /* COPYRIGHT SIGN */ -+ {'C', 'o', 0x00a9}, /* COPYRIGHT SIGN */ -+ {'-', 'a', 0x00aa}, /* FEMININE ORDINAL INDICATOR */ -+ {'<', '<', 0x00ab}, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ -+ {'-', ',', 0x00ac}, /* NOT SIGN */ -+ {'N', 'O', 0x00ac}, /* NOT SIGN */ -+ {'-', '-', 0x00ad}, /* SOFT HYPHEN */ -+ {'r', 'O', 0x00ae}, /* REGISTERED SIGN */ -+ {'R', 'g', 0x00ae}, /* REGISTERED SIGN */ -+ {'-', '=', 0x00af}, /* MACRON */ -+ {'\'', 'm', 0x00af}, /* MACRON */ -+ {'~', 'o', 0x00b0}, /* DEGREE SIGN */ -+ {'D', 'G', 0x00b0}, /* DEGREE SIGN */ -+ {'+', '-', 0x00b1}, /* PLUS-MINUS SIGN */ -+ {'2', '2', 0x00b2}, /* SUPERSCRIPT TWO */ -+ {'2', 'S', 0x00b2}, /* SUPERSCRIPT TWO */ -+ {'3', '3', 0x00b3}, /* SUPERSCRIPT THREE */ -+ {'3', 'S', 0x00b3}, /* SUPERSCRIPT THREE */ -+ {'\'', '\'', 0x00b4}, /* ACUTE ACCENT */ -+ {'j', 'u', 0x00b5}, /* MICRO SIGN */ -+ {'M', 'y', 0x00b5}, /* MICRO SIGN */ -+ {'p', 'p', 0x00b6}, /* PILCROW SIGN */ -+ {'P', 'I', 0x00b6}, /* PILCROW SIGN */ -+ {'~', '.', 0x00b7}, /* MIDDLE DOT */ -+ {'.', 'M', 0x00b7}, /* MIDDLE DOT */ -+ {',', ',', 0x00b8}, /* CEDILLA */ -+ {'\'', ',', 0x00b8}, /* CEDILLA */ -+ {'1', '1', 0x00b9}, /* SUPERSCRIPT ONE */ -+ {'1', 'S', 0x00b9}, /* SUPERSCRIPT ONE */ -+ {'-', 'o', 0x00ba}, /* MASCULINE ORDINAL INDICATOR */ -+ {'>', '>', 0x00bb}, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ -+ {'1', '4', 0x00bc}, /* VULGAR FRACTION ONE QUARTER */ -+ {'1', '2', 0x00bd}, /* VULGAR FRACTION ONE HALF */ -+ {'3', '4', 0x00be}, /* VULGAR FRACTION THREE QUARTERS */ -+ {'~', '?', 0x00bf}, /* INVERTED QUESTION MARK */ -+ {'?', '?', 0x00bf}, /* INVERTED QUESTION MARK */ -+ {'?', 'I', 0x00bf}, /* INVERTED QUESTION MARK */ -+ {'A', '`', 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */ -+ {'A', '!', 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */ -+ {'A', '\'', 0x00c1}, /* LATIN CAPITAL LETTER A WITH ACUTE */ -+ {'A', '^', 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ -+ {'A', '>', 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ -+ {'A', '~', 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */ -+ {'A', '?', 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */ -+ {'A', '"', 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ -+ {'A', ':', 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ -+ {'A', '@', 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ -+ {'A', 'A', 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ -+ {'A', 'E', 0x00c6}, /* LATIN CAPITAL LETTER AE */ -+ {'C', ',', 0x00c7}, /* LATIN CAPITAL LETTER C WITH CEDILLA */ -+ {'E', '`', 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */ -+ {'E', '!', 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */ -+ {'E', '\'', 0x00c9}, /* LATIN CAPITAL LETTER E WITH ACUTE */ -+ {'E', '^', 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ -+ {'E', '>', 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ -+ {'E', '"', 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ -+ {'E', ':', 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ -+ {'I', '`', 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */ -+ {'I', '!', 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */ -+ {'I', '\'', 0x00cd}, /* LATIN CAPITAL LETTER I WITH ACUTE */ -+ {'I', '^', 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ -+ {'I', '>', 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ -+ {'I', '"', 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ -+ {'I', ':', 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ -+ {'D', '-', 0x00d0}, /* LATIN CAPITAL LETTER ETH */ -+ {'N', '~', 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */ -+ {'N', '?', 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */ -+ {'O', '`', 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */ -+ {'O', '!', 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */ -+ {'O', '\'', 0x00d3}, /* LATIN CAPITAL LETTER O WITH ACUTE */ -+ {'O', '^', 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ -+ {'O', '>', 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ -+ {'O', '~', 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */ -+ {'O', '?', 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */ -+ {'O', '"', 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ -+ {'O', ':', 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ -+ {'/', '\\', 0x00d7}, /* MULTIPLICATION SIGN */ -+ {'*', 'x', 0x00d7}, /* MULTIPLICATION SIGN */ -+ {'O', '/', 0x00d8}, /* LATIN CAPITAL LETTER O WITH STROKE */ -+ {'U', '`', 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */ -+ {'U', '!', 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */ -+ {'U', '\'', 0x00da}, /* LATIN CAPITAL LETTER U WITH ACUTE */ -+ {'U', '^', 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ -+ {'U', '>', 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ -+ {'U', '"', 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ -+ {'U', ':', 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ -+ {'Y', '\'', 0x00dd}, /* LATIN CAPITAL LETTER Y WITH ACUTE */ -+ {'I', 'p', 0x00de}, /* LATIN CAPITAL LETTER THORN */ -+ {'T', 'H', 0x00de}, /* LATIN CAPITAL LETTER THORN */ -+ {'s', 's', 0x00df}, /* LATIN SMALL LETTER SHARP S */ -+ {'s', '"', 0x00df}, /* LATIN SMALL LETTER SHARP S */ -+ {'a', '`', 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */ -+ {'a', '!', 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */ -+ {'a', '\'', 0x00e1}, /* LATIN SMALL LETTER A WITH ACUTE */ -+ {'a', '^', 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ -+ {'a', '>', 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ -+ {'a', '~', 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */ -+ {'a', '?', 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */ -+ {'a', '"', 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ -+ {'a', ':', 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ -+ {'a', 'a', 0x00e5}, /* LATIN SMALL LETTER A WITH RING ABOVE */ -+ {'a', 'e', 0x00e6}, /* LATIN SMALL LETTER AE */ -+ {'c', ',', 0x00e7}, /* LATIN SMALL LETTER C WITH CEDILLA */ -+ {'e', '`', 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */ -+ {'e', '!', 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */ -+ {'e', '\'', 0x00e9}, /* LATIN SMALL LETTER E WITH ACUTE */ -+ {'e', '^', 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ -+ {'e', '>', 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ -+ {'e', '"', 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */ -+ {'e', ':', 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */ -+ {'i', '`', 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */ -+ {'i', '!', 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */ -+ {'i', '\'', 0x00ed}, /* LATIN SMALL LETTER I WITH ACUTE */ -+ {'i', '^', 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ -+ {'i', '>', 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ -+ {'i', '"', 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */ -+ {'i', ':', 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */ -+ {'d', '-', 0x00f0}, /* LATIN SMALL LETTER ETH */ -+ {'n', '~', 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */ -+ {'n', '?', 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */ -+ {'o', '`', 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */ -+ {'o', '!', 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */ -+ {'o', '\'', 0x00f3}, /* LATIN SMALL LETTER O WITH ACUTE */ -+ {'o', '^', 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ -+ {'o', '>', 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ -+ {'o', '~', 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */ -+ {'o', '?', 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */ -+ {'o', '"', 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ -+ {'o', ':', 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ -+ {'-', ':', 0x00f7}, /* DIVISION SIGN */ -+ {'o', '/', 0x00f8}, /* LATIN SMALL LETTER O WITH STROKE */ -+ {'u', '`', 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */ -+ {'u', '!', 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */ -+ {'u', '\'', 0x00fa}, /* LATIN SMALL LETTER U WITH ACUTE */ -+ {'u', '^', 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ -+ {'u', '>', 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ -+ {'u', '"', 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ -+ {'u', ':', 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ -+ {'y', '\'', 0x00fd}, /* LATIN SMALL LETTER Y WITH ACUTE */ -+ {'i', 'p', 0x00fe}, /* LATIN SMALL LETTER THORN */ -+ {'t', 'h', 0x00fe}, /* LATIN SMALL LETTER THORN */ -+ {'y', '"', 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */ -+ {'y', ':', 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */ -+ {'"', '[', 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ -+ {'"', '\\', 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ -+ {'"', ']', 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ -+ {'"', '{', 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ -+ {'"', '|', 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ -+ {'"', '}', 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ -+ {'"', '~', 0x00df}, /* LATIN SMALL LETTER SHARP S */ - }; - - #define RESIZE_FLAG_H 1 diff -Nru screen-4.0.3/debian/patches/26source_encoding.patch screen-4.1.0~20120320gitdb59704/debian/patches/26source_encoding.patch --- screen-4.0.3/debian/patches/26source_encoding.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/26source_encoding.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,353 @@ +Author: Ben Finney +Description: Replace the composed characters with their respective description. +--- a/process.c ++++ b/process.c +@@ -250,177 +250,177 @@ + + /* digraph table taken from old vim and rfc1345 */ + static struct digraph digraphs[MAX_DIGRAPH + 1] = { +- {{' ', ' '}, 160}, /* */ +- {{'N', 'S'}, 160}, /* */ +- {{'~', '!'}, 161}, /* */ +- {{'!', '!'}, 161}, /* */ +- {{'!', 'I'}, 161}, /* */ +- {{'c', '|'}, 162}, /* */ +- {{'c', 't'}, 162}, /* */ +- {{'$', '$'}, 163}, /* */ +- {{'P', 'd'}, 163}, /* */ +- {{'o', 'x'}, 164}, /* */ +- {{'C', 'u'}, 164}, /* */ +- {{'C', 'u'}, 164}, /* */ +- {{'E', 'u'}, 164}, /* */ +- {{'Y', '-'}, 165}, /* */ +- {{'Y', 'e'}, 165}, /* */ +- {{'|', '|'}, 166}, /* */ +- {{'B', 'B'}, 166}, /* */ +- {{'p', 'a'}, 167}, /* */ +- {{'S', 'E'}, 167}, /* */ +- {{'"', '"'}, 168}, /* */ +- {{'\'', ':'}, 168}, /* */ +- {{'c', 'O'}, 169}, /* */ +- {{'C', 'o'}, 169}, /* */ +- {{'a', '-'}, 170}, /* */ +- {{'<', '<'}, 171}, /* */ +- {{'-', ','}, 172}, /* */ +- {{'N', 'O'}, 172}, /* */ +- {{'-', '-'}, 173}, /* */ +- {{'r', 'O'}, 174}, /* */ +- {{'R', 'g'}, 174}, /* */ +- {{'-', '='}, 175}, /* */ +- {{'\'', 'm'}, 175}, /* */ +- {{'~', 'o'}, 176}, /* */ +- {{'D', 'G'}, 176}, /* */ +- {{'+', '-'}, 177}, /* */ +- {{'2', '2'}, 178}, /* */ +- {{'2', 'S'}, 178}, /* */ +- {{'3', '3'}, 179}, /* */ +- {{'3', 'S'}, 179}, /* */ +- {{'\'', '\''}, 180}, /* */ +- {{'j', 'u'}, 181}, /* */ +- {{'M', 'y'}, 181}, /* */ +- {{'p', 'p'}, 182}, /* */ +- {{'P', 'I'}, 182}, /* */ +- {{'~', '.'}, 183}, /* */ +- {{'.', 'M'}, 183}, /* */ +- {{',', ','}, 184}, /* */ +- {{'\'', ','}, 184}, /* */ +- {{'1', '1'}, 185}, /* */ +- {{'1', 'S'}, 185}, /* */ +- {{'o', '-'}, 186}, /* */ +- {{'>', '>'}, 187}, /* */ +- {{'1', '4'}, 188}, /* */ +- {{'1', '2'}, 189}, /* */ +- {{'3', '4'}, 190}, /* */ +- {{'~', '?'}, 191}, /* */ +- {{'?', '?'}, 191}, /* */ +- {{'?', 'I'}, 191}, /* */ +- {{'A', '`'}, 192}, /* */ +- {{'A', '!'}, 192}, /* */ +- {{'A', '\''}, 193}, /* */ +- {{'A', '^'}, 194}, /* */ +- {{'A', '>'}, 194}, /* */ +- {{'A', '~'}, 195}, /* */ +- {{'A', '?'}, 195}, /* */ +- {{'A', '"'}, 196}, /* */ +- {{'A', ':'}, 196}, /* */ +- {{'A', '@'}, 197}, /* */ +- {{'A', 'A'}, 197}, /* */ +- {{'A', 'E'}, 198}, /* */ +- {{'C', ','}, 199}, /* */ +- {{'E', '`'}, 200}, /* */ +- {{'E', '!'}, 200}, /* */ +- {{'E', '\''}, 201}, /* */ +- {{'E', '^'}, 202}, /* */ +- {{'E', '>'}, 202}, /* */ +- {{'E', '"'}, 203}, /* */ +- {{'E', ':'}, 203}, /* */ +- {{'I', '`'}, 204}, /* */ +- {{'I', '!'}, 204}, /* */ +- {{'I', '\''}, 205}, /* */ +- {{'I', '^'}, 206}, /* */ +- {{'I', '>'}, 206}, /* */ +- {{'I', '"'}, 207}, /* */ +- {{'I', ':'}, 207}, /* */ +- {{'D', '-'}, 208}, /* */ +- {{'N', '~'}, 209}, /* */ +- {{'N', '?'}, 209}, /* */ +- {{'O', '`'}, 210}, /* */ +- {{'O', '!'}, 210}, /* */ +- {{'O', '\''}, 211}, /* */ +- {{'O', '^'}, 212}, /* */ +- {{'O', '>'}, 212}, /* */ +- {{'O', '~'}, 213}, /* */ +- {{'O', '?'}, 213}, /* */ +- {{'O', '"'}, 214}, /* */ +- {{'O', ':'}, 214}, /* */ +- {{'/', '\\'}, 215}, /* */ +- {{'*', 'x'}, 215}, /* */ +- {{'O', '/'}, 216}, /* */ +- {{'U', '`'}, 217}, /* */ +- {{'U', '!'}, 217}, /* */ +- {{'U', '\''}, 218}, /* */ +- {{'U', '^'}, 219}, /* */ +- {{'U', '>'}, 219}, /* */ +- {{'U', '"'}, 220}, /* */ +- {{'U', ':'}, 220}, /* */ +- {{'Y', '\''}, 221}, /* */ +- {{'I', 'p'}, 222}, /* */ +- {{'T', 'H'}, 222}, /* */ +- {{'s', 's'}, 223}, /* */ +- {{'s', '"'}, 223}, /* */ +- {{'a', '`'}, 224}, /* */ +- {{'a', '!'}, 224}, /* */ +- {{'a', '\''}, 225}, /* */ +- {{'a', '^'}, 226}, /* */ +- {{'a', '>'}, 226}, /* */ +- {{'a', '~'}, 227}, /* */ +- {{'a', '?'}, 227}, /* */ +- {{'a', '"'}, 228}, /* */ +- {{'a', ':'}, 228}, /* */ +- {{'a', 'a'}, 229}, /* */ +- {{'a', 'e'}, 230}, /* */ +- {{'c', ','}, 231}, /* */ +- {{'e', '`'}, 232}, /* */ +- {{'e', '!'}, 232}, /* */ +- {{'e', '\''}, 233}, /* */ +- {{'e', '^'}, 234}, /* */ +- {{'e', '>'}, 234}, /* */ +- {{'e', '"'}, 235}, /* */ +- {{'e', ':'}, 235}, /* */ +- {{'i', '`'}, 236}, /* */ +- {{'i', '!'}, 236}, /* */ +- {{'i', '\''}, 237}, /* */ +- {{'i', '^'}, 238}, /* */ +- {{'i', '>'}, 238}, /* */ +- {{'i', '"'}, 239}, /* */ +- {{'i', ':'}, 239}, /* */ +- {{'d', '-'}, 240}, /* */ +- {{'n', '~'}, 241}, /* */ +- {{'n', '?'}, 241}, /* */ +- {{'o', '`'}, 242}, /* */ +- {{'o', '!'}, 242}, /* */ +- {{'o', '\''}, 243}, /* */ +- {{'o', '^'}, 244}, /* */ +- {{'o', '>'}, 244}, /* */ +- {{'o', '~'}, 245}, /* */ +- {{'o', '?'}, 245}, /* */ +- {{'o', '"'}, 246}, /* */ +- {{'o', ':'}, 246}, /* */ +- {{':', '-'}, 247}, /* */ +- {{'o', '/'}, 248}, /* */ +- {{'u', '`'}, 249}, /* */ +- {{'u', '!'}, 249}, /* */ +- {{'u', '\''}, 250}, /* */ +- {{'u', '^'}, 251}, /* */ +- {{'u', '>'}, 251}, /* */ +- {{'u', '"'}, 252}, /* */ +- {{'u', ':'}, 252}, /* */ +- {{'y', '\''}, 253}, /* */ +- {{'i', 'p'}, 254}, /* */ +- {{'t', 'h'}, 254}, /* */ +- {{'y', '"'}, 255}, /* */ +- {{'y', ':'}, 255}, /* */ +- {{'"', '['}, 196}, /* */ +- {{'"', '\\'}, 214}, /* */ +- {{'"', ']'}, 220}, /* */ +- {{'"', '{'}, 228}, /* */ +- {{'"', '|'}, 246}, /* */ +- {{'"', '}'}, 252}, /* */ +- {{'"', '~'}, 223} /* */ ++ {{' ', ' '}, 0x00a0}, /* NO-BREAK SPACE */ ++ {{'N', 'S'}, 0x00a0}, /* NO-BREAK SPACE */ ++ {{'~', '!'}, 0x00a1}, /* INVERTED EXCLAMATION MARK */ ++ {{'!', '!'}, 0x00a1}, /* INVERTED EXCLAMATION MARK */ ++ {{'!', 'I'}, 0x00a1}, /* INVERTED EXCLAMATION MARK */ ++ {{'c', '|'}, 0x00a2}, /* CENT SIGN */ ++ {{'c', 't'}, 0x00a2}, /* CENT SIGN */ ++ {{'$', '$'}, 0x00a3}, /* POUND SIGN */ ++ {{'P', 'd'}, 0x00a3}, /* POUND SIGN */ ++ {{'o', 'x'}, 0x00a4}, /* CURRENCY SIGN */ ++ {{'C', 'u'}, 0x00a4}, /* CURRENCY SIGN */ ++ {{'C', 'u'}, 0x00a4}, /* CURRENCY SIGN */ ++ {{'E', 'u'}, 0x00a4}, /* CURRENCY SIGN */ ++ {{'Y', '-'}, 0x00a5}, /* YEN SIGN */ ++ {{'Y', 'e'}, 0x00a5}, /* YEN SIGN */ ++ {{'|', '|'}, 0x00a6}, /* BROKEN BAR */ ++ {{'B', 'B'}, 0x00a6}, /* BROKEN BAR */ ++ {{'p', 'a'}, 0x00a7}, /* SECTION SIGN */ ++ {{'S', 'E'}, 0x00a7}, /* SECTION SIGN */ ++ {{'"', '"'}, 0x00a8}, /* DIAERESIS */ ++ {{'\'', ':'}, 0x00a8}, /* DIAERESIS */ ++ {{'c', 'O'}, 0x00a9}, /* COPYRIGHT SIGN */ ++ {{'C', 'o'}, 0x00a9}, /* COPYRIGHT SIGN */ ++ {{'-', 'a'}, 0x00aa}, /* FEMININE ORDINAL INDICATOR */ ++ {{'<', '<'}, 0x00ab}, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ ++ {{'-', ','}, 0x00ac}, /* NOT SIGN */ ++ {{'N', 'O'}, 0x00ac}, /* NOT SIGN */ ++ {{'-', '-'}, 0x00ad}, /* SOFT HYPHEN */ ++ {{'r', 'O'}, 0x00ae}, /* REGISTERED SIGN */ ++ {{'R', 'g'}, 0x00ae}, /* REGISTERED SIGN */ ++ {{'-', '='}, 0x00af}, /* MACRON */ ++ {{'\'', 'm'}, 0x00af}, /* MACRON */ ++ {{'~', 'o'}, 0x00b0}, /* DEGREE SIGN */ ++ {{'D', 'G'}, 0x00b0}, /* DEGREE SIGN */ ++ {{'+', '-'}, 0x00b1}, /* PLUS-MINUS SIGN */ ++ {{'2', '2'}, 0x00b2}, /* SUPERSCRIPT TWO */ ++ {{'2', 'S'}, 0x00b2}, /* SUPERSCRIPT TWO */ ++ {{'3', '3'}, 0x00b3}, /* SUPERSCRIPT THREE */ ++ {{'3', 'S'}, 0x00b3}, /* SUPERSCRIPT THREE */ ++ {{'\'', '\''}, 0x00b4}, /* ACUTE ACCENT */ ++ {{'j', 'u'}, 0x00b5}, /* MICRO SIGN */ ++ {{'M', 'y'}, 0x00b5}, /* MICRO SIGN */ ++ {{'p', 'p'}, 0x00b6}, /* PILCROW SIGN */ ++ {{'P', 'I'}, 0x00b6}, /* PILCROW SIGN */ ++ {{'~', '.'}, 0x00b7}, /* MIDDLE DOT */ ++ {{'.', 'M'}, 0x00b7}, /* MIDDLE DOT */ ++ {{',', ','}, 0x00b8}, /* CEDILLA */ ++ {{'\'', ','}, 0x00b8}, /* CEDILLA */ ++ {{'1', '1'}, 0x00b9}, /* SUPERSCRIPT ONE */ ++ {{'1', 'S'}, 0x00b9}, /* SUPERSCRIPT ONE */ ++ {{'-', 'o'}, 0x00ba}, /* MASCULINE ORDINAL INDICATOR */ ++ {{'>', '>'}, 0x00bb}, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ ++ {{'1', '4'}, 0x00bc}, /* VULGAR FRACTION ONE QUARTER */ ++ {{'1', '2'}, 0x00bd}, /* VULGAR FRACTION ONE HALF */ ++ {{'3', '4'}, 0x00be}, /* VULGAR FRACTION THREE QUARTERS */ ++ {{'~', '?'}, 0x00bf}, /* INVERTED QUESTION MARK */ ++ {{'?', '?'}, 0x00bf}, /* INVERTED QUESTION MARK */ ++ {{'?', 'I'}, 0x00bf}, /* INVERTED QUESTION MARK */ ++ {{'A', '`'}, 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */ ++ {{'A', '!'}, 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */ ++ {{'A', '\''}, 0x00c1}, /* LATIN CAPITAL LETTER A WITH ACUTE */ ++ {{'A', '^'}, 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ ++ {{'A', '>'}, 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ ++ {{'A', '~'}, 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */ ++ {{'A', '?'}, 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */ ++ {{'A', '"'}, 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ ++ {{'A', ':'}, 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ ++ {{'A', '@'}, 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ ++ {{'A', 'A'}, 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ ++ {{'A', 'E'}, 0x00c6}, /* LATIN CAPITAL LETTER AE */ ++ {{'C', ','}, 0x00c7}, /* LATIN CAPITAL LETTER C WITH CEDILLA */ ++ {{'E', '`'}, 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */ ++ {{'E', '!'}, 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */ ++ {{'E', '\''}, 0x00c9}, /* LATIN CAPITAL LETTER E WITH ACUTE */ ++ {{'E', '^'}, 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ ++ {{'E', '>'}, 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ ++ {{'E', '"'}, 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ ++ {{'E', ':'}, 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ ++ {{'I', '`'}, 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */ ++ {{'I', '!'}, 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */ ++ {{'I', '\''}, 0x00cd}, /* LATIN CAPITAL LETTER I WITH ACUTE */ ++ {{'I', '^'}, 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ ++ {{'I', '>'}, 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ ++ {{'I', '"'}, 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ ++ {{'I', ':'}, 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ ++ {{'D', '-'}, 0x00d0}, /* LATIN CAPITAL LETTER ETH */ ++ {{'N', '~'}, 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */ ++ {{'N', '?'}, 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */ ++ {{'O', '`'}, 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */ ++ {{'O', '!'}, 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */ ++ {{'O', '\''}, 0x00d3}, /* LATIN CAPITAL LETTER O WITH ACUTE */ ++ {{'O', '^'}, 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ ++ {{'O', '>'}, 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ ++ {{'O', '~'}, 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */ ++ {{'O', '?'}, 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */ ++ {{'O', '"'}, 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ ++ {{'O', ':'}, 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ ++ {{'/', '\\'}, 0x00d7}, /* MULTIPLICATION SIGN */ ++ {{'*', 'x'}, 0x00d7}, /* MULTIPLICATION SIGN */ ++ {{'O', '/'}, 0x00d8}, /* LATIN CAPITAL LETTER O WITH STROKE */ ++ {{'U', '`'}, 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */ ++ {{'U', '!'}, 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */ ++ {{'U', '\''}, 0x00da}, /* LATIN CAPITAL LETTER U WITH ACUTE */ ++ {{'U', '^'}, 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ ++ {{'U', '>'}, 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ ++ {{'U', '"'}, 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ ++ {{'U', ':'}, 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ ++ {{'Y', '\''}, 0x00dd}, /* LATIN CAPITAL LETTER Y WITH ACUTE */ ++ {{'I', 'p'}, 0x00de}, /* LATIN CAPITAL LETTER THORN */ ++ {{'T', 'H'}, 0x00de}, /* LATIN CAPITAL LETTER THORN */ ++ {{'s', 's'}, 0x00df}, /* LATIN SMALL LETTER SHARP S */ ++ {{'s', '"'}, 0x00df}, /* LATIN SMALL LETTER SHARP S */ ++ {{'a', '`'}, 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */ ++ {{'a', '!'}, 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */ ++ {{'a', '\''}, 0x00e1}, /* LATIN SMALL LETTER A WITH ACUTE */ ++ {{'a', '^'}, 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ ++ {{'a', '>'}, 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ ++ {{'a', '~'}, 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */ ++ {{'a', '?'}, 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */ ++ {{'a', '"'}, 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ ++ {{'a', ':'}, 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ ++ {{'a', 'a'}, 0x00e5}, /* LATIN SMALL LETTER A WITH RING ABOVE */ ++ {{'a', 'e'}, 0x00e6}, /* LATIN SMALL LETTER AE */ ++ {{'c', ','}, 0x00e7}, /* LATIN SMALL LETTER C WITH CEDILLA */ ++ {{'e', '`'}, 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */ ++ {{'e', '!'}, 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */ ++ {{'e', '\''}, 0x00e9}, /* LATIN SMALL LETTER E WITH ACUTE */ ++ {{'e', '^'}, 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ ++ {{'e', '>'}, 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ ++ {{'e', '"'}, 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */ ++ {{'e', ':'}, 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */ ++ {{'i', '`'}, 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */ ++ {{'i', '!'}, 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */ ++ {{'i', '\''}, 0x00ed}, /* LATIN SMALL LETTER I WITH ACUTE */ ++ {{'i', '^'}, 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ ++ {{'i', '>'}, 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ ++ {{'i', '"'}, 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */ ++ {{'i', ':'}, 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */ ++ {{'d', '-'}, 0x00f0}, /* LATIN SMALL LETTER ETH */ ++ {{'n', '~'}, 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */ ++ {{'n', '?'}, 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */ ++ {{'o', '`'}, 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */ ++ {{'o', '!'}, 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */ ++ {{'o', '\''}, 0x00f3}, /* LATIN SMALL LETTER O WITH ACUTE */ ++ {{'o', '^'}, 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ ++ {{'o', '>'}, 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ ++ {{'o', '~'}, 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */ ++ {{'o', '?'}, 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */ ++ {{'o', '"'}, 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ ++ {{'o', ':'}, 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ ++ {{'-', ':'}, 0x00f7}, /* DIVISION SIGN */ ++ {{'o', '/'}, 0x00f8}, /* LATIN SMALL LETTER O WITH STROKE */ ++ {{'u', '`'}, 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */ ++ {{'u', '!'}, 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */ ++ {{'u', '\''}, 0x00fa}, /* LATIN SMALL LETTER U WITH ACUTE */ ++ {{'u', '^'}, 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ ++ {{'u', '>'}, 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ ++ {{'u', '"'}, 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ ++ {{'u', ':'}, 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ ++ {{'y', '\''}, 0x00fd}, /* LATIN SMALL LETTER Y WITH ACUTE */ ++ {{'i', 'p'}, 0x00fe}, /* LATIN SMALL LETTER THORN */ ++ {{'t', 'h'}, 0x00fe}, /* LATIN SMALL LETTER THORN */ ++ {{'y', '"'}, 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */ ++ {{'y', ':'}, 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */ ++ {{'"', '['}, 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ ++ {{'"', '\\'}, 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ ++ {{'"', ']'}, 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ ++ {{'"', '{'}, 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ ++ {{'"', '|'}, 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ ++ {{'"', '}'}, 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ ++ {{'"', '~'}, 0x00df}, /* LATIN SMALL LETTER SHARP S */ + }; + + #define RESIZE_FLAG_H 1 diff -Nru screen-4.0.3/debian/patches/27doc_sty_noenvpassing.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/27doc_sty_noenvpassing.dpatch --- screen-4.0.3/debian/patches/27doc_sty_noenvpassing.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/27doc_sty_noenvpassing.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 27doc_sty_noenvpassing.dpatch by -## -## DP: Document the fact that when calling 'env=var screen app arg' from inside -## DP: screen the environment variable will go up in smoke. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:44:58.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:45:00.000000000 +0200 -@@ -97,7 +97,9 @@ - manager (specified in the $STY environment variable) who will use it to - create the new window. - The above example would start the emacs editor (editing prog.c) and switch --to its window. -+to its window. - Note that you cannot transport environment variables from -+the invoking shell to the application (emacs in this case), because it is -+forked from the parent screen process, not from the invoking shell. - .PP - If \*Q/var/run/utmp\*U is writable by - .IR screen , -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:44:58.000000000 +0200 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:45:00.000000000 +0200 -@@ -175,6 +175,9 @@ - name and its arguments to the window manager (specified in the $STY environment - variable) who will use it to create the new window. The above example would - start the @code{emacs} editor (editing @file{prog.c}) and switch to its window. -+- Note that you cannot transport environment variables from -+the invoking shell to the application (emacs in this case), because it is -+forked from the parent screen process, not from the invoking shell. - - If @file{/var/run/utmp} is writable by @code{screen}, an appropriate record - will be written to this file for each window, and removed when the diff -Nru screen-4.0.3/debian/patches/28blankerprg_callsemantics.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/28blankerprg_callsemantics.dpatch --- screen-4.0.3/debian/patches/28blankerprg_callsemantics.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/28blankerprg_callsemantics.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 28blankerprg_callsemantics.dpatch by -## -## DP: Allow 'blankerprg' to be called without arguments (as the manpage states). - -@DPATCH@ -diff -Naur screen-4.0.3.orig/comm.c screen-4.0.3/comm.c ---- screen-4.0.3.orig/comm.c 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/comm.c 2008-06-01 23:45:00.000000000 +0200 -@@ -98,7 +98,7 @@ - #endif - { "blanker", NEED_DISPLAY|ARGS_0}, - #ifdef BLANKER_PRG -- { "blankerprg", ARGS_1|ARGS_ORMORE }, -+ { "blankerprg", ARGS_0|ARGS_ORMORE }, - #endif - { "break", NEED_FORE|ARGS_01 }, - { "breaktype", NEED_FORE|ARGS_01 }, -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:45:00.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:45:00.000000000 +0200 -@@ -3903,7 +3903,7 @@ - free(blankerprg); - blankerprg = 0; - } -- if (args[0][0]) -+ if (args[0] && args[0][0]) - blankerprg = SaveArgs(args); - break; - #endif diff -Nru screen-4.0.3/debian/patches/29infodoc_version.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/29infodoc_version.dpatch --- screen-4.0.3/debian/patches/29infodoc_version.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/29infodoc_version.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 29infodoc_version.dpatch by -## -## DP: Update software version number in info documentation. - -@DPATCH@ ---- screen-4.0.3.orig/doc/screen.texinfo 2003-12-05 14:51:46.000000000 +0100 -+++ screen-4.0.3/doc/screen.texinfo 2009-02-04 01:06:52.573469826 +0100 -@@ -7,7 +7,7 @@ - @finalout - @setchapternewpage odd - @c %**end of header --@set version 4.0.2 -+@set version 4.0.3 - - @direntry - * Screen: (screen). Full-screen window manager. diff -Nru screen-4.0.3/debian/patches/30fix_fsf_address.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/30fix_fsf_address.dpatch --- screen-4.0.3/debian/patches/30fix_fsf_address.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/30fix_fsf_address.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#! /bin/bash -## 30fix_fsf_address.dpatch by Jan Christoph Nordholz -## -## DP: Update the FSF address in the GPL header of the source files -## DP: until upstream does. - -set -o errexit - -non_ascii_source_files="acls.c process.c help.c" -original_encoding=iso-8859-1 -patched_encoding=utf-8 - -convert_encoding () { - local in_encoding=$1 - local out_encoding=$2 - local in_file=$3 - local out_file=$(tempfile) - iconv --from-code $in_encoding --to-code $out_encoding $in_file > $out_file - mv $out_file $in_file -} - -dpatch_patch () { - for file in *.c; do - sed -i -e 's/59 Temple Place - Suite 330, Boston, MA 02111-1307, USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/' $file - done -} - -dpatch_unpatch () { - for file in *.c; do - sed -i -e 's/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/59 Temple Place - Suite 330, Boston, MA 02111-1307, USA/' $file - done -} - -DPATCH_LIB_NO_DEFAULT=1 - -. /usr/share/dpatch/dpatch.lib.sh diff -Nru screen-4.0.3/debian/patches/31upstream_cherries.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/31upstream_cherries.dpatch --- screen-4.0.3/debian/patches/31upstream_cherries.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/31upstream_cherries.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 31upstream_cherries.dpatch by -## -## DP: Cherry-picked upstream commits: -## DP: - (#501201, git d128abd5...) - -@DPATCH@ ---- screen-4.0.3.orig/attacher.c -+++ screen-4.0.3/attacher.c -@@ -52,6 +52,7 @@ static sigret_t AttachSigCont __P(SIGPROTOARG); - - extern int real_uid, real_gid, eff_uid, eff_gid; - extern char *SockName, *SockMatch, SockPath[]; -+extern char HostName[]; - extern struct passwd *ppp; - extern char *attach_tty, *attach_term, *LoginName, *preselect; - extern int xflag, dflag, rflag, quietflag, adaptflag; -@@ -891,8 +892,8 @@ screen_builtin_lck() - *cp1 -= 'a' - 'A'; - } - -- sprintf(message, "Screen used by %s <%s>.\nPassword:\007", -- fullname, ppp->pw_name); -+ sprintf(message, "Screen used by %s%s<%s> on %s.\nPassword:\007", -+ fullname, fullname[0] ? " " : "", ppp->pw_name, HostName); - - /* loop here to wait for correct password */ - for (;;) diff -Nru screen-4.0.3/debian/patches/32misc_minor_fixes.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/32misc_minor_fixes.dpatch --- screen-4.0.3/debian/patches/32misc_minor_fixes.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/32misc_minor_fixes.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 32misc_minor_fixes.dpatch by -## -## DP: Remove an unconditional nethack message. (# 512299) - -@DPATCH@ ---- screen-4.0.3.orig/attacher.c 2009-02-26 01:40:12.427283863 +0100 -+++ screen-4.0.3/attacher.c 2009-02-26 01:43:02.258234277 +0100 -@@ -579,7 +579,7 @@ - { - fcntl(0, F_SETFL, 0); - SetTTY(0, &attach_Mode); -- printf("\nSuddenly the Dungeon collapses!! - You die...\n"); -+ printf("\nError: Cannot find master process to attach to!\n"); - eexit(1); - } - #endif diff -Nru screen-4.0.3/debian/patches/32misc_minor_fixes.patch screen-4.1.0~20120320gitdb59704/debian/patches/32misc_minor_fixes.patch --- screen-4.0.3/debian/patches/32misc_minor_fixes.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/32misc_minor_fixes.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,15 @@ +Author: +Description: Remove an unconditional nethack message. (# 512299) +Index: screen/attacher.c +=================================================================== +--- screen.orig/attacher.c 2011-10-08 19:58:41.000000000 +0200 ++++ screen/attacher.c 2011-10-08 19:59:12.000000000 +0200 +@@ -621,7 +621,7 @@ + { + fcntl(0, F_SETFL, 0); + SetTTY(0, &attach_Mode); +- printf("\nSuddenly the Dungeon collapses!! - You die...\n"); ++ printf("\nError: Cannot find master process to attach to!\n"); + eexit(1); + } + #ifdef BSDJOBS diff -Nru screen-4.0.3/debian/patches/33increase_max_winmsg_renditions.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/33increase_max_winmsg_renditions.dpatch --- screen-4.0.3/debian/patches/33increase_max_winmsg_renditions.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/33increase_max_winmsg_renditions.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 33increase_max_winmsg_renditions.dpatch -## by Dustin Kirkland -## -## DP: Increase MAX_WINMSG_REND constant from 16 to 256 -## DP: Allows for up to 256 formatting changes on a status line -## DP: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/315871 - -@DPATCH@ -diff -uprN screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2003-09-08 09:26:41.000000000 -0500 -+++ screen-4.0.3/screen.c 2009-01-10 12:06:34.698560196 -0600 -@@ -2026,7 +2026,7 @@ static const char months[] = "JanFebMarA - #endif - - static char winmsg_buf[MAXSTR]; --#define MAX_WINMSG_REND 16 /* rendition changes */ -+#define MAX_WINMSG_REND 256 /* rendition changes */ - static int winmsg_rend[MAX_WINMSG_REND]; - static int winmsg_rendpos[MAX_WINMSG_REND]; - static int winmsg_numrend; diff -Nru screen-4.0.3/debian/patches/35screen_invoked_with_a_command.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/35screen_invoked_with_a_command.dpatch --- screen-4.0.3/debian/patches/35screen_invoked_with_a_command.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/35screen_invoked_with_a_command.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 35screen_invoked_with_a_command.dpatch -## -## DP: Cherry-picked from upstream. -## DP: From 25c4f34d19c9f7d7262ef2a173238fdab7e283be Mon Sep 17 00:00:00 2001 -## DP: From: Sadrul Habib Chowdhury -## DP: Date: Mon, 26 Jan 2009 21:19:47 +0000 -## DP: Subject: Don't forget the startup command. - -## DP:Fixes savannah bug #25348, launchpad bug #311443. -## DP:--- -## DP:diff --git a/src/screen.c b/src/screen.c -## DP:index c914c59..7239560 100644 - -@DPATCH@ - ---- src/screen.c -+++ src/screen.c -@@ -1420,6 +1420,10 @@ char **av; - /* NOTREACHED */ - } - } -+ else if (ac) /* Screen was invoked with a command */ -+ { -+ MakeWindow(&nwin); -+ } - - #ifdef HAVE_BRAILLE - StartBraille(); diff -Nru screen-4.0.3/debian/patches/40cjk_eastasian.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/40cjk_eastasian.dpatch --- screen-4.0.3/debian/patches/40cjk_eastasian.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/40cjk_eastasian.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,150 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 40cjk_eastasian.dpatch by Yi-Hsuan Hsin -## -## DP: Fix display of characters with ambiguous width depending on the -## DP: user's display locale. See upstream #16666. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/ansi.c screen-4.0.3/ansi.c ---- screen-4.0.3.orig/ansi.c 2008-06-01 23:39:48.000000000 +0200 -+++ screen-4.0.3/ansi.c 2008-06-01 23:45:01.000000000 +0200 -@@ -681,7 +681,7 @@ - curr->w_rend.font = 0; - } - # ifdef DW_CHARS -- if (curr->w_encoding == UTF8 && c >= 0x1100 && utf8_isdouble(c)) -+ if (curr->w_encoding == UTF8 && utf8_isdouble(c)) - curr->w_mbcs = 0xff; - # endif - if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) -diff -Naur screen-4.0.3.orig/comm.c screen-4.0.3/comm.c ---- screen-4.0.3.orig/comm.c 2008-06-01 23:45:00.000000000 +0200 -+++ screen-4.0.3/comm.c 2008-06-01 23:45:01.000000000 +0200 -@@ -112,6 +112,9 @@ - #endif - { "charset", NEED_FORE|ARGS_1 }, - { "chdir", ARGS_01 }, -+#ifdef DW_CHARS -+ { "cjkwidth", ARGS_01 }, -+#endif - { "clear", NEED_FORE|ARGS_0 }, - { "colon", NEED_LAYER|ARGS_01 }, - { "command", NEED_DISPLAY|ARGS_02 }, -diff -Naur screen-4.0.3.orig/encoding.c screen-4.0.3/encoding.c ---- screen-4.0.3.orig/encoding.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/encoding.c 2008-06-01 23:45:01.000000000 +0200 -@@ -22,6 +22,7 @@ - */ - - #include -+#include - - #include "config.h" - #include "screen.h" -@@ -35,6 +36,10 @@ - - extern char *screenencodings; - -+#ifdef DW_CHARS -+extern int cjkwidth; -+#endif -+ - static int encmatch __P((char *, char *)); - # ifdef UTF8 - static int recode_char __P((int, int, int)); -@@ -849,18 +854,10 @@ - utf8_isdouble(c) - int c; - { -- return -- (c >= 0x1100 && -- (c <= 0x115f || /* Hangul Jamo init. consonants */ -- (c >= 0x2e80 && c <= 0xa4cf && (c & ~0x0011) != 0x300a && -- c != 0x303f) || /* CJK ... Yi */ -- (c >= 0xac00 && c <= 0xd7a3) || /* Hangul Syllables */ -- (c >= 0xdf00 && c <= 0xdfff) || /* dw combining sequence */ -- (c >= 0xf900 && c <= 0xfaff) || /* CJK Compatibility Ideographs */ -- (c >= 0xfe30 && c <= 0xfe6f) || /* CJK Compatibility Forms */ -- (c >= 0xff00 && c <= 0xff5f) || /* Fullwidth Forms */ -- (c >= 0xffe0 && c <= 0xffe6) || -- (c >= 0x20000 && c <= 0x2ffff))); -+ /* convert Unicode to UCS-4 */ -+ wchar_t w = c; -+ -+ return wcswidth(&w, 1) > 1; - } - #endif - -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:45:00.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:45:01.000000000 +0200 -@@ -105,6 +105,9 @@ - #ifdef UTF8 - extern char *screenencodings; - #endif -+#ifdef DW_CHARS -+extern int cjkwidth; -+#endif - - static int CheckArgNum __P((int, char **)); - static void ClearAction __P((struct action *)); -@@ -4155,6 +4158,15 @@ - else - Msg(0, "unknown layout subcommand"); - break; -+#ifdef DW_CHARS -+ case RC_CJKWIDTH: -+ if(ParseSwitch(act, &cjkwidth) == 0) -+ { -+ if(msgok) -+ Msg(0, "Treat ambiguous width characters as %s width", cjkwidth ? "full" : "half"); -+ } -+ break; -+#endif - default: - #ifdef HAVE_BRAILLE - /* key == -2: input from braille keybord, msgok always 0 */ -diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c ---- screen-4.0.3.orig/screen.c 2008-06-01 23:44:59.000000000 +0200 -+++ screen-4.0.3/screen.c 2008-06-01 23:45:01.000000000 +0200 -@@ -223,6 +223,10 @@ - char *screenencodings; - #endif - -+#ifdef DW_CHARS -+int cjkwidth; -+#endif -+ - #ifdef NETHACK - int nethackflag = 0; - #endif -@@ -470,6 +474,9 @@ - InitBuiltinTabs(); - screenencodings = SaveStr(SCREENENCODINGS); - #endif -+#ifdef DW_CHARS -+ cjkwidth = 0; -+#endif - nwin = nwin_undef; - nwin_options = nwin_undef; - strcpy(screenterm, "screen"); -@@ -766,6 +773,19 @@ - debug1("environment says encoding=%d\n", nwin_options.encoding); - #endif - } -+# ifdef DW_CHARS -+ { -+ char *s; -+ if((s = getenv("LC_ALL")) || (s = getenv("LC_CTYPE")) || -+ (s = getenv("LANG"))) -+ { -+ if(!strncmp(s, "zh_", 3) || !strncmp(s, "ja_", 3) || !strncmp(s, "ko_", 3)) -+ { -+ cjkwidth = 1; -+ } -+ } -+ } -+#endif - #endif - if (SockMatch && strlen(SockMatch) >= MAXSTR) - Panic(0, "Ridiculously long socketname - try again."); diff -Nru screen-4.0.3/debian/patches/45suppress_remap.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/45suppress_remap.dpatch --- screen-4.0.3/debian/patches/45suppress_remap.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/45suppress_remap.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 45suppress_remap.dpatch by Loic Minier -## -## DP: Unbreak several useful keybindings. - -@DPATCH@ ---- screen-4.0.3.orig/termcap.c 2008-06-05 12:24:28.000000000 +0200 -+++ screen-4.0.3/termcap.c 2008-06-05 12:24:59.000000000 +0200 -@@ -548,8 +548,6 @@ - else - break; - } -- if (n < KMAP_KEYS) -- domap = 1; - if (map == 0 && domap) - return 0; - if (map && !domap) diff -Nru screen-4.0.3/debian/patches/45suppress_remap.patch screen-4.1.0~20120320gitdb59704/debian/patches/45suppress_remap.patch --- screen-4.0.3/debian/patches/45suppress_remap.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/45suppress_remap.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,13 @@ +Author: Loic Minier +Description: Unbreak several useful keybindings. +--- a/termcap.c ++++ b/termcap.c +@@ -552,8 +552,6 @@ + else + break; + } +- if (n < KMAP_KEYS) +- domap = 1; + if (map == 0 && domap) + return 0; + if (map && !domap) diff -Nru screen-4.0.3/debian/patches/46fix-keybinding-typo-in-manpage.patch screen-4.1.0~20120320gitdb59704/debian/patches/46fix-keybinding-typo-in-manpage.patch --- screen-4.0.3/debian/patches/46fix-keybinding-typo-in-manpage.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/46fix-keybinding-typo-in-manpage.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,58 @@ +The manpage for Screen says that you should use C-a C-\ to quit screen, while +it is in fact C-a \ (Closes: #630535) + +There's also one case where C-a h is documented instead of C-a C-h (aka +backspace) (Closes: #541793) + +Index: screen/doc/screen.1 +=================================================================== +--- screen.orig/doc/screen.1 2011-10-08 19:58:19.000000000 +0200 ++++ screen/doc/screen.1 2011-10-08 19:59:19.000000000 +0200 +@@ -512,7 +512,7 @@ + Show the number (and title) of the current window. + .IP "\fBC-a backspace\fP" + .PD 0 +-.IP "\fBC-a h\fP" ++.IP "\fBC-a C-h\fP" + .IP "\fBC-a p\fP" + .IP "\fBC-a C-p\fP (prev)" + .PD +@@ -578,7 +578,7 @@ + Write out a \*Q.termcap\*U file. + .IP "\fBC-a ?\fP (help)" + Show key bindings. +-.IP "\fBC-a C-\e\fP (quit)" ++.IP "\fBC-a \e\fP (quit)" + Kill all windows and terminate + .IR screen . + .IP "\fBC-a :\fP (colon)" +Index: screen/doc/screen.texinfo +=================================================================== +--- screen.orig/doc/screen.texinfo 2011-10-08 19:58:19.000000000 +0200 ++++ screen/doc/screen.texinfo 2011-10-08 19:59:19.000000000 +0200 +@@ -791,7 +791,7 @@ + (help)@* + Show key bindings. @xref{Help}. + +-@item @kbd{C-a C-\} ++@item @kbd{C-a \} + (quit)@* + Kill all windows and terminate @code{screen}. @xref{Quit}. + +@@ -2031,13 +2031,10 @@ + + @node Quit, , Suspend, Session Management + @section Quit +-@kindex C-\ ++@kindex \ + @deffn Command quit +-(@kbd{C-a C-\})@* +-Kill all windows and terminate @code{screen}. Note that on VT100-style +-terminals the keys @kbd{C-4} and @kbd{C-\} are identical. So be careful +-not to type @kbd{C-a C-4} when selecting window no. 4. Use the empty +-bind command (as in @code{bind "^\"}) to remove a key binding ++(@kbd{C-a \})@* ++Kill all windows and terminate @code{screen}. + (@pxref{Key Binding}). + @end deffn + diff -Nru screen-4.0.3/debian/patches/47screen-cc.patch screen-4.1.0~20120320gitdb59704/debian/patches/47screen-cc.patch --- screen-4.0.3/debian/patches/47screen-cc.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/47screen-cc.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,276 @@ +Author: +Description: Some patches stolen from the fedora package for better error checking and tty security. +Index: screen/utmp.c +=================================================================== +--- screen.orig/utmp.c 2011-10-08 19:54:17.000000000 +0200 ++++ screen/utmp.c 2011-10-08 19:59:23.000000000 +0200 +@@ -361,7 +361,7 @@ + char *tty; + debug("couln't zap slot -> do mesg n\n"); + D_loginttymode = 0; +- if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && (int)stb.st_uid == real_uid && ((int)stb.st_mode & 0777) != 0666) ++ if ((tty = ttyname(D_userfd)) && stat(tty, &stb) == 0 && (int)stb.st_uid == real_uid && !CheckTtyname(tty) && ((int)stb.st_mode & 0777) != 0666) + { + D_loginttymode = (int)stb.st_mode & 0777; + chmod(D_usertty, stb.st_mode & 0600); +@@ -387,7 +387,7 @@ + } + UT_CLOSE; + D_loginslot = (slot_t)0; +- if (D_loginttymode && (tty = ttyname(D_userfd))) ++ if (D_loginttymode && (tty = ttyname(D_userfd)) && !CheckTtyname(tty)) + chmod(tty, D_loginttymode); + } + +@@ -575,7 +575,7 @@ + return ut_delete_user(slot, u.ut_pid, 0, 0) != 0; + #endif + #ifdef HAVE_UTEMPTER +- if (eff_uid && wi->w_ptyfd != -1) ++ if (eff_uid && wi && wi->w_ptyfd != -1) + { + /* sigh, linux hackers made the helper functions void */ + if (SLOT_USED(u)) +@@ -853,7 +853,7 @@ + + for (fd = 0; fd <= 2 && (tty = ttyname(fd)) == NULL; fd++) + ; +- if ((tty == NULL) || ((fd = open(UTMP_FILE, O_RDONLY)) < 0)) ++ if ((tty == NULL) || CheckTtyname(tty) || ((fd = open(UTMP_FILE, O_RDONLY)) < 0)) + return NULL; + tty = stripdev(tty); + retbuf[0] = '\0'; +Index: screen/extern.h +=================================================================== +--- screen.orig/extern.h 2011-10-08 19:54:16.000000000 +0200 ++++ screen/extern.h 2011-10-08 19:59:23.000000000 +0200 +@@ -110,6 +110,7 @@ + extern struct baud_values *lookup_baud __P((int bps)); + extern int SetBaud __P((struct mode *, int, int)); + extern int SttyMode __P((struct mode *, char *)); ++extern int CheckTtyname __P((char *)); + + + /* mark.c */ +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2011-10-08 19:58:56.000000000 +0200 ++++ screen/screen.c 2011-10-08 19:59:23.000000000 +0200 +@@ -972,8 +972,13 @@ + else \ + attach_tty = ""; \ + } \ +- else if (stat(attach_tty, &st)) \ +- Panic(errno, "Cannot access '%s'", attach_tty); \ ++ else \ ++ { \ ++ if (stat(attach_tty, &st)) \ ++ Panic(errno, "Cannot access '%s'", attach_tty); \ ++ if (CheckTtyname(attach_tty)) \ ++ Panic(0, "Bad tty '%s'", attach_tty); \ ++ } \ + if (strlen(attach_tty) >= MAXPATHLEN) \ + Panic(0, "TtyName too long - sorry."); \ + } while (0) +Index: screen/tty.sh +=================================================================== +--- screen.orig/tty.sh 2011-10-08 19:58:28.000000000 +0200 ++++ screen/tty.sh 2011-10-08 19:59:23.000000000 +0200 +@@ -60,6 +60,7 @@ + #include + #include + #include ++#include + #ifndef sgi + # include + #endif +@@ -1499,6 +1500,19 @@ + return 0; + } + ++ ++int ++CheckTtyname (tty) ++char *tty; ++{ ++ struct stat st; ++ ++ if (lstat(tty, &st) || !S_ISCHR(st.st_mode) || ++ (st.st_nlink > 1 && strncmp(tty, "/dev/", 5))) ++ return -1; ++ return 0; ++} ++ + /* + * Write out the mode struct in a readable form + */ +Index: screen/socket.c +=================================================================== +--- screen.orig/socket.c 2011-10-08 19:54:17.000000000 +0200 ++++ screen/socket.c 2011-10-08 19:59:23.000000000 +0200 +@@ -722,6 +722,7 @@ + char *args[MAXARGS]; + register int n; + register char **pp = args, *p = mp->m.create.line; ++ char buf[20]; + + nwin = nwin_undef; + n = mp->m.create.nargs; +@@ -731,7 +732,6 @@ + if (n) + { + int l, num; +- char buf[20]; + + l = strlen(p); + if (IsNumColon(p, 10, buf, sizeof(buf))) +Index: screen/braille_tsi.c +=================================================================== +--- screen.orig/braille_tsi.c 2011-10-08 19:54:17.000000000 +0200 ++++ screen/braille_tsi.c 2011-10-08 19:59:23.000000000 +0200 +@@ -127,7 +127,6 @@ + r = read(bd.bd_fd,ibuf,1); + if (r != 1) + return -1; +- if (r != -1) + if (ibuf[0] == 'V') + r = read(bd.bd_fd, ibuf, 3); + else +Index: screen/fileio.c +=================================================================== +--- screen.orig/fileio.c 2011-10-08 19:58:46.000000000 +0200 ++++ screen/fileio.c 2011-10-08 19:59:23.000000000 +0200 +@@ -80,8 +80,6 @@ + } + else + { +- if (len1 == 0) +- return 0; + if ((cp = malloc((unsigned) len1 + add_colon + 1)) == NULL) + Panic(0, "%s", strnomem); + cp[len1 + add_colon] = '\0'; +Index: screen/attacher.c +=================================================================== +--- screen.orig/attacher.c 2011-10-08 19:59:12.000000000 +0200 ++++ screen/attacher.c 2011-10-08 19:59:23.000000000 +0200 +@@ -185,8 +185,8 @@ + if (ret == SIG_POWER_BYE) + { + int ppid; +- setgid(real_gid); +- setuid(real_uid); ++ if (setgid(real_gid) || setuid(real_uid)) ++ Panic(errno, "setuid/gid"); + if ((ppid = getppid()) > 1) + Kill(ppid, SIGHUP); + exit(0); +@@ -282,7 +282,10 @@ + #ifdef MULTIUSER + if (!multiattach) + #endif +- setuid(real_uid); ++ { ++ if (setuid(real_uid)) ++ Panic(errno, "setuid"); ++ } + #if defined(MULTIUSER) && defined(USE_SETEUID) + else + { +@@ -290,7 +293,8 @@ + xseteuid(real_uid); /* multi_uid, allow backend to send signals */ + } + #endif +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + eff_uid = real_uid; + eff_gid = real_gid; + +@@ -486,7 +490,8 @@ + #ifdef MULTIUSER + if (tty_oldmode >= 0) + { +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + chmod(attach_tty, tty_oldmode); + } + #endif +@@ -504,11 +509,14 @@ + if (multiattach) + exit(SIG_POWER_BYE); + #endif +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + #ifdef MULTIUSER +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + #else +- setuid(real_uid); ++ if (setuid(real_uid)) ++ Panic(errno, "setuid"); + #endif + /* we don't want to disturb init (even if we were root), eh? jw */ + if ((ppid = getppid()) > 1) +@@ -679,11 +687,14 @@ + LockHup SIGDEFARG + { + int ppid = getppid(); +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + #ifdef MULTIUSER +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + #else +- setuid(real_uid); ++ if (setuid(real_uid)) ++ Panic(errno, "setuid"); + #endif + if (ppid > 1) + Kill(ppid, SIGHUP); +@@ -710,11 +721,14 @@ + if ((pid = fork()) == 0) + { + /* Child */ +- setgid(real_gid); ++ if (setgid(real_gid)) ++ Panic(errno, "setgid"); + #ifdef MULTIUSER +- setuid(own_uid); ++ if (setuid(own_uid)) ++ Panic(errno, "setuid"); + #else +- setuid(real_uid); /* this should be done already */ ++ if (setuid(real_uid)) /* this should be done already */ ++ Panic(errno, "setuid"); + #endif + closeallfiles(0); /* important: /etc/shadow may be open */ + execl(prg, "SCREEN-LOCK", NULL); +@@ -847,6 +861,7 @@ + #ifdef USE_PAM + pam_handle_t *pamh = 0; + int pam_error; ++ char *tty_name; + #endif + char *pass = 0, mypass[16 + 1], salt[3]; + int using_pam = 1; +@@ -926,6 +941,15 @@ + pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); + if (pam_error != PAM_SUCCESS) + AttacherFinit(SIGARG); /* goodbye */ ++ ++ if (strncmp(attach_tty, "/dev/", 5) == 0) ++ tty_name = attach_tty + 5; ++ else ++ tty_name = attach_tty; ++ pam_error = pam_set_item(pamh, PAM_TTY, tty_name); ++ if (pam_error != PAM_SUCCESS) ++ AttacherFinit(SIGARG); /* goodbye */ ++ + pam_error = pam_authenticate(pamh, 0); + pam_end(pamh, pam_error); + PAM_conversation.appdata_ptr = 0; diff -Nru screen-4.0.3/debian/patches/48screen-ipv6.patch screen-4.1.0~20120320gitdb59704/debian/patches/48screen-ipv6.patch --- screen-4.0.3/debian/patches/48screen-ipv6.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/48screen-ipv6.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,351 @@ +Author: +Description: Some patches stolen from the fedora package for better error checking and tty security. +Index: screen/doc/screen.1 +=================================================================== +--- screen.orig/doc/screen.1 2012-03-20 22:41:10.000000000 +0100 ++++ screen/doc/screen.1 2012-03-20 22:41:13.000000000 +0100 +@@ -398,6 +398,12 @@ + the \fB-d\fP or \fB-r\fP option to tell screen to look only for + attached or detached screen sessions. Note that this command doesn't + work if the session is password protected. ++.TP 5 ++.B \-4 ++Resolve hostnames only to IPv4 addresses. ++.TP 5 ++.B \-6 ++Resolve hostnames only to IPv6 addresses. + + .SH "DEFAULT KEY BINDINGS" + .ta 12n 26n +Index: screen/extern.h +=================================================================== +--- screen.orig/extern.h 2012-03-20 22:41:12.000000000 +0100 ++++ screen/extern.h 2012-03-20 22:41:13.000000000 +0100 +@@ -459,8 +459,7 @@ + + /* teln.c */ + #ifdef BUILTIN_TELNET +-extern int TelOpen __P((char **)); +-extern int TelConnect __P((struct win *)); ++extern int TelOpenAndConnect __P((struct win *)); + extern int TelIsline __P((struct win *p)); + extern void TelProcessLine __P((char **, int *)); + extern int DoTelnet __P((char *, int *, int)); +Index: screen/help.c +=================================================================== +--- screen.orig/help.c 2012-03-20 22:14:48.000000000 +0100 ++++ screen/help.c 2012-03-20 22:41:13.000000000 +0100 +@@ -66,6 +66,10 @@ + { + printf("Use: %s [-opts] [cmd [args]]\n", myname); + printf(" or: %s -r [host.tty]\n\nOptions:\n", myname); ++#ifdef BUILTIN_TELNET ++ printf("-4 Resolve hostnames only to IPv4 addresses.\n"); ++ printf("-6 Resolve hostnames only to IPv6 addresses.\n"); ++#endif + printf("-a Force all capabilities into each window's termcap.\n"); + printf("-A -[r|R] Adapt all windows to the new display width & height.\n"); + printf("-c file Read configuration file instead of '.screenrc'.\n"); +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2012-03-20 22:41:12.000000000 +0100 ++++ screen/screen.c 2012-03-20 22:41:13.000000000 +0100 +@@ -248,8 +248,9 @@ + struct win *fore; + struct win *windows; + struct win *console_window; +- +- ++#ifdef BUILTIN_TELNET ++int af; ++#endif + + /* + * Do this last +@@ -507,6 +508,9 @@ + nwin = nwin_undef; + nwin_options = nwin_undef; + strcpy(screenterm, "screen"); ++#ifdef BUILTIN_TELNET ++ af = AF_UNSPEC; ++#endif + + logreopen_register(lf_secreopen); + +@@ -541,6 +545,14 @@ + { + switch (*ap) + { ++#ifdef BUILTIN_TELNET ++ case '4': ++ af = AF_INET; ++ break; ++ case '6': ++ af = AF_INET6; ++ break; ++#endif + case 'a': + nwin_options.aflag = 1; + break; +Index: screen/teln.c +=================================================================== +--- screen.orig/teln.c 2012-03-20 22:14:48.000000000 +0100 ++++ screen/teln.c 2012-03-20 22:41:13.000000000 +0100 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "config.h" + +@@ -42,12 +43,13 @@ + extern struct layer *flayer; + extern int visual_bell; + extern char screenterm[]; ++extern int af; + + static void TelReply __P((struct win *, char *, int)); + static void TelDocmd __P((struct win *, int, int)); + static void TelDosub __P((struct win *)); +- +-#define TEL_DEFPORT 23 ++// why TEL_DEFPORT has " ++#define TEL_DEFPORT "23" + #define TEL_CONNECTING (-2) + + #define TC_IAC 255 +@@ -105,86 +107,78 @@ + } + + int +-TelOpen(args) +-char **args; +-{ +- int fd; +- int on = 1; +- +- if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) +- { +- Msg(errno, "TelOpen: socket"); +- return -1; +- } +- if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char *)&on, sizeof(on))) +- Msg(errno, "TelOpen: setsockopt SO_OOBINLINE"); +- return fd; +-} +- +-int +-TelConnect(p) +-struct win *p; +-{ +- int port = TEL_DEFPORT; +- struct hostent *hp; +- char **args; ++TelOpenAndConnect(struct win *p) { ++ int fd, on = 1; + char buf[256]; + +- args = p->w_cmdargs + 1; ++ struct addrinfo hints, *res0, *res; + +- if (!*args) +- { +- Msg(0, "Usage: screen //telnet host [port]"); +- return -1; +- } +- if (args[1]) +- port = atoi(args[1]); +- p->w_telsa.sin_family = AF_INET; +- if((p->w_telsa.sin_addr.s_addr = inet_addr(*args)) == -1) +- { +- if ((hp = gethostbyname(*args)) == NULL) +- { +- Msg(0, "unknown host: %s", *args); +- return -1; +- } +- if (hp->h_length != sizeof(p->w_telsa.sin_addr.s_addr) || hp->h_addrtype != AF_INET) +- { +- Msg(0, "Bad address type for %s", hp->h_name); +- return -1; +- } +- bcopy((char *)hp->h_addr,(char *)&p->w_telsa.sin_addr.s_addr, hp->h_length); +- p->w_telsa.sin_family = hp->h_addrtype; ++ if (!(p->w_cmdargs[1])) { ++ Msg(0, "Usage: screen //telnet host [port]"); ++ return -1; ++ } ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = af; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_protocol = IPPROTO_TCP; ++ if(getaddrinfo(p->w_cmdargs[1], p->w_cmdargs[2] ? p->w_cmdargs[2] : TEL_DEFPORT, ++ &hints, &res0)) { ++ Msg(0, "unknown host: %s", p->w_cmdargs[1]); ++ return -1; ++ } ++ ++ for(res = res0; res; res = res->ai_next) { ++ if((fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == -1) { ++ if(res->ai_next) ++ continue; ++ else { ++ Msg(errno, "TelOpenAndConnect: socket"); ++ freeaddrinfo(res0); ++ return -1; ++ } + } +- p->w_telsa.sin_port = htons(port); +- if (port != TEL_DEFPORT) +- sprintf(buf, "Trying %s %d...", inet_ntoa(p->w_telsa.sin_addr), port); +- else +- sprintf(buf, "Trying %s...", inet_ntoa(p->w_telsa.sin_addr)); +- WriteString(p, buf, strlen(buf)); +- if (connect(p->w_ptyfd, (struct sockaddr *)&p->w_telsa, sizeof(p->w_telsa))) +- { +- if (errno == EINPROGRESS) +- { +- p->w_telstate = TEL_CONNECTING; +- p->w_telconnev.fd = p->w_ptyfd; +- p->w_telconnev.handler = tel_connev_fn; +- p->w_telconnev.data = (char *)p; +- p->w_telconnev.type = EV_WRITE; +- p->w_telconnev.pri = 1; +- debug("telnet connect in progress...\n"); +- evenq(&p->w_telconnev); +- } +- else +- { +- Msg(errno, "TelOpen: connect"); +- return -1; +- } ++ ++ if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char *)&on, sizeof(on))) ++ Msg(errno, "TelOpenAndConnect: setsockopt SO_OOBINLINE"); ++ ++ if (p->w_cmdargs[2] && strcmp(p->w_cmdargs[2], TEL_DEFPORT)) ++ snprintf(buf, 256, "Trying %s %s...", p->w_cmdargs[1], p->w_cmdargs[2]); ++ else ++ snprintf(buf, 256, "Trying %s...", p->w_cmdargs[1]); ++ WriteString(p, buf, strlen(buf)); ++ if (connect(fd, res->ai_addr, res->ai_addrlen)) { ++ if (errno == EINPROGRESS) { ++ p->w_telstate = TEL_CONNECTING; ++ p->w_telconnev.fd = fd; ++ p->w_telconnev.handler = tel_connev_fn; ++ p->w_telconnev.data = (char *)p; ++ p->w_telconnev.type = EV_WRITE; ++ p->w_telconnev.pri = 1; ++ debug("telnet connect in progress...\n"); ++ evenq(&p->w_telconnev); ++ } ++ else { ++ close(fd); ++ if(res->ai_next) ++ continue; ++ else { ++ Msg(errno, "TelOpenAndConnect: connect"); ++ freeaddrinfo(res0); ++ return -1; ++ } ++ } + } +- else +- WriteString(p, "connected.\r\n", 12); +- if (port == TEL_DEFPORT) +- TelReply(p, (char *)tn_init, sizeof(tn_init)); +- return 0; ++ else ++ WriteString(p, "connected.\r\n", 12); ++ if (!(p->w_cmdargs[2] && strcmp(p->w_cmdargs[2], TEL_DEFPORT))) ++ TelReply(p, (char *)tn_init, sizeof(tn_init)); ++ p->w_ptyfd = fd; ++ memcpy(&p->w_telsa, &res->ai_addr, sizeof(res->ai_addr)); ++ freeaddrinfo(res0); ++ return 0; ++ } ++ return -1; + } + + int +Index: screen/window.c +=================================================================== +--- screen.orig/window.c 2012-03-20 22:35:13.000000000 +0100 ++++ screen/window.c 2012-03-20 22:41:13.000000000 +0100 +@@ -607,6 +607,13 @@ + n = pp - wtab; + debug1("Makewin creating %d\n", n); + ++#ifdef BUILTIN_TELNET ++ if(!strcmp(nwin.args[0], "//telnet")) { ++ type = W_TYPE_TELNET; ++ TtyName = "telnet"; ++ } ++ else ++#endif + if ((f = OpenDevice(nwin.args, nwin.lflag, &type, &TtyName)) < 0) + return -1; + if (type == W_TYPE_GROUP) +@@ -768,7 +775,7 @@ + #ifdef BUILTIN_TELNET + if (type == W_TYPE_TELNET) + { +- if (TelConnect(p)) ++ if (TelOpenAndConnect(p)) + { + FreeWindow(p); + return -1; +@@ -880,6 +887,13 @@ + int lflag, f; + + lflag = nwin_default.lflag; ++#ifdef BUILTIN_TELNET ++ if(!strcmp(p->w_cmdargs[0], "//telnet")) { ++ p->w_type = W_TYPE_TELNET; ++ TtyName = "telnet"; ++ } ++ else ++#endif + if ((f = OpenDevice(p->w_cmdargs, lflag, &p->w_type, &TtyName)) < 0) + return -1; + +@@ -913,7 +927,7 @@ + #ifdef BUILTIN_TELNET + if (p->w_type == W_TYPE_TELNET) + { +- if (TelConnect(p)) ++ if (TelOpenAndConnect(p)) + return -1; + } + else +@@ -1072,16 +1086,6 @@ + *namep = "telnet"; + return 0; + } +-#ifdef BUILTIN_TELNET +- if (strcmp(arg, "//telnet") == 0) +- { +- f = TelOpen(args + 1); +- lflag = 0; +- *typep = W_TYPE_TELNET; +- *namep = "telnet"; +- } +- else +-#endif + if (strncmp(arg, "//", 2) == 0) + { + Msg(0, "Invalid argument '%s'", arg); +Index: screen/window.h +=================================================================== +--- screen.orig/window.h 2012-03-20 22:14:48.000000000 +0100 ++++ screen/window.h 2012-03-20 22:41:13.000000000 +0100 +@@ -268,7 +268,7 @@ + struct display *w_zdisplay; + #endif + #ifdef BUILTIN_TELNET +- struct sockaddr_in w_telsa; ++ struct sockaddr_storage w_telsa; + char w_telbuf[IOSIZE]; + int w_telbufl; + char w_telmopts[256]; diff -Nru screen-4.0.3/debian/patches/49long-usernames.patch screen-4.1.0~20120320gitdb59704/debian/patches/49long-usernames.patch --- screen-4.0.3/debian/patches/49long-usernames.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/49long-usernames.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,104 @@ +Description: Patch to allow usernames longer than 20 characters. +Source: http://www.mail-archive.com/screen-devel@gnu.org/msg00186.html +Author: Steve Kemp +Upstream-Bug: http://savannah.gnu.org/bugs/?21653 +Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560231 +Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/582153 + +Index: screen/acconfig.h +=================================================================== +--- screen.orig/acconfig.h 2011-10-08 21:20:48.000000000 +0200 ++++ screen/acconfig.h 2011-10-08 21:20:57.000000000 +0200 +@@ -39,6 +39,13 @@ + #endif + + /* ++ * Length of longest username. ++ */ ++#ifndef MAX_USERNAME_LEN ++# define MAX_USERNAME_LEN 50 ++#endif ++ ++/* + * Define SOCKDIR to be the directory to contain the named sockets + * screen creates. This should be in a common subdirectory, such as + * /usr/local or /tmp. It makes things a little more secure if you +Index: screen/acls.c +=================================================================== +--- screen.orig/acls.c 2011-10-08 21:20:48.000000000 +0200 ++++ screen/acls.c 2011-10-08 21:20:57.000000000 +0200 +@@ -182,7 +182,7 @@ + #endif + (*up)->u_Esc = DefaultEsc; + (*up)->u_MetaEsc = DefaultMetaEsc; +- strncpy((*up)->u_name, name, 20); ++ strncpy((*up)->u_name, name, MAX_USERNAME_LEN); + (*up)->u_password = NULL; + if (pass) + (*up)->u_password = SaveStr(pass); +@@ -318,8 +318,8 @@ + return UserAdd(name, pass, up); + if (!strcmp(name, "nobody")) /* he remains without password */ + return -1; +- strncpy((*up)->u_password, pass ? pass : "", 20); +- (*up)->u_password[20] = '\0'; ++ strncpy((*up)->u_password, pass ? pass : "", MAX_USERNAME_LEN); ++ (*up)->u_password[MAX_USERNAME_LEN] = '\0'; + return 0; + } + #endif +Index: screen/acls.h +=================================================================== +--- screen.orig/acls.h 2011-10-08 21:20:48.000000000 +0200 ++++ screen/acls.h 2011-10-08 21:20:57.000000000 +0200 +@@ -78,7 +78,7 @@ + typedef struct acluser + { + struct acluser *u_next; /* continue the main user list */ +- char u_name[20+1]; /* login name how he showed up */ ++ char u_name[MAX_USERNAME_LEN+1]; /* login name how he showed up */ + char *u_password; /* his password (may be NullStr). */ + int u_checkpassword; /* nonzero if this u_password is valid */ + int u_detachwin; /* the window where he last detached */ +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2011-10-08 21:20:56.000000000 +0200 ++++ screen/screen.c 2011-10-08 21:20:57.000000000 +0200 +@@ -997,7 +997,7 @@ + + if (home == 0 || *home == '\0') + home = ppp->pw_dir; +- if (strlen(LoginName) > 20) ++ if (strlen(LoginName) > MAX_USERNAME_LEN) + Panic(0, "LoginName too long - sorry."); + #ifdef MULTIUSER + if (multi && strlen(multi) > 20) +Index: screen/screen.h +=================================================================== +--- screen.orig/screen.h 2011-10-08 21:20:48.000000000 +0200 ++++ screen/screen.h 2011-10-08 21:20:57.000000000 +0200 +@@ -207,7 +207,7 @@ + create; + struct + { +- char auser[20 + 1]; /* username */ ++ char auser[MAX_USERNAME_LEN + 1]; /* username */ + int apid; /* pid of frontend */ + int adaptflag; /* adapt window size? */ + int lines, columns; /* display size */ +@@ -221,13 +221,13 @@ + attach; + struct + { +- char duser[20 + 1]; /* username */ ++ char duser[MAX_USERNAME_LEN + 1]; /* username */ + int dpid; /* pid of frontend */ + } + detach; + struct + { +- char auser[20 + 1]; /* username */ ++ char auser[MAX_USERNAME_LEN + 1]; /* username */ + int nargs; + char cmd[MAXPATHLEN]; /* command */ + int apid; /* pid of frontend */ diff -Nru screen-4.0.3/debian/patches/50EXP_tilde_expansion.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/50EXP_tilde_expansion.dpatch --- screen-4.0.3/debian/patches/50EXP_tilde_expansion.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/50EXP_tilde_expansion.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 50EXP_tilde_expansion.dpatch by -## -## DP: Add full tilde expansion to the builtin commands 'source' -## DP: and 'chdir'. Thanks to Nico Golde (#308818) and Steve Kemp -## DP: (#477210) for patch suggestions. - -@DPATCH@ -diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h ---- screen-4.0.3.orig/extern.h 2008-06-01 23:41:50.000000000 +0200 -+++ screen-4.0.3/extern.h 2008-06-01 23:45:01.000000000 +0200 -@@ -65,6 +65,7 @@ - extern int MFindUsedLine __P((struct win *, int, int)); - - /* fileio.c */ -+extern char *ExpandFilename __P((const char *)); - extern int StartRc __P((char *, int)); - extern void FinishRc __P((char *)); - extern void RcLine __P((char *, int)); -diff -Naur screen-4.0.3.orig/fileio.c screen-4.0.3/fileio.c ---- screen-4.0.3.orig/fileio.c 2008-06-01 23:44:59.000000000 +0200 -+++ screen-4.0.3/fileio.c 2008-06-01 23:45:01.000000000 +0200 -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - #ifndef SIGINT - # include -@@ -87,6 +88,56 @@ - return cp; - } - -+/** -+ * Private simple tilde expansion function, to avoid pulling in -+ * libreadline or similar monster libraries. -+ * -+ * Note: We are applying a conservative match on usernames here. -+ * Jan Nordholz , 2008/04/27 -+ */ -+char * -+ExpandFilename(fn) -+const char *fn; -+{ -+ char *ret = 0; -+ -+ ret = malloc(MAXPATHLEN + 1); -+ snprintf(ret, MAXPATHLEN, "%s", fn); -+ -+ if (*fn == '~') -+ { -+ int userlen = strspn(fn+1, "abcdefghijklmnopqrstuvwxyz0123456789-_"); -+ if (!userlen) -+ { -+ if (home && *home) -+ { -+ snprintf(ret, MAXPATHLEN, "%s%s", home, fn+1+userlen); -+ } -+ else -+ { -+ Msg(0, "%s: source: tilde expansion failed.", rc_name); -+ } -+ } -+ else -+ { -+ struct passwd *p; -+ ret[userlen+1] = 0; -+ p = getpwnam(ret+1); -+ ret[userlen+1] = fn[userlen+1]; -+ if (p && p->pw_dir) -+ { -+ snprintf(ret, MAXPATHLEN, "%s%s", p->pw_dir, fn+1+userlen); -+ } -+ else -+ { -+ Msg(0, "%s: source: tilde expansion failed.", rc_name); -+ } -+ } -+ } -+ -+ return ret; -+} -+ - static char * - findrcfile(rcfile) - char *rcfile; -@@ -293,17 +344,21 @@ - do_source(rcfilename) - char *rcfilename; - { -+ char *expanded_rcfilename; -+ - if (rc_recursion > 10) - { - Msg(0, "%s: source: recursion limit reached", rc_name); - return; - } -+ - rc_recursion++; -- FinishRc(rcfilename); -+ expanded_rcfilename = ExpandFilename(rcfilename); -+ FinishRc(expanded_rcfilename); -+ free(expanded_rcfilename); - rc_recursion--; - } - -- - /* - * Running a Command Line in the environment determined by the display. - * The fore window is taken from the display as well as the user. -diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c ---- screen-4.0.3.orig/process.c 2008-06-01 23:45:01.000000000 +0200 -+++ screen-4.0.3/process.c 2008-06-01 23:45:01.000000000 +0200 -@@ -2418,9 +2418,10 @@ - #endif - break; - case RC_CHDIR: -- s = *args ? *args : home; -+ s = ExpandFilename(*args ? *args : home); - if (chdir(s) == -1) - Msg(errno, "%s", s); -+ free(s); - break; - case RC_SHELL: - case RC_DEFSHELL: diff -Nru screen-4.0.3/debian/patches/50increase-max-TERM-length.patch screen-4.1.0~20120320gitdb59704/debian/patches/50increase-max-TERM-length.patch --- screen-4.0.3/debian/patches/50increase-max-TERM-length.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/50increase-max-TERM-length.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,40 @@ +From: Andy Spencer +Subject: [screen-devel] [PATCH 1/1] Increase max TERM length to 40 characters +Date: Tue, 5 Apr 2011 03:26:58 +0000 +Source: https://lists.gnu.org/archive/html/screen-devel/2011-04/msg00002.html + +Some terms contain rather long TERM names these days, for example, +`rxvt-unicode-256color'. Increasing the max size for the TERM variables +avoids the `$TERM too long - sorry.' error when using these terms. + +--- + display.h | 2 +- + screen.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: screen/display.h +=================================================================== +--- screen.orig/display.h 2011-10-06 01:30:53.000000000 +0200 ++++ screen/display.h 2011-10-08 21:28:51.000000000 +0200 +@@ -73,7 +73,7 @@ + struct win *d_other; /* pointer to other window */ + int d_nonblock; /* -1 don't block if obufmax reached */ + /* >0: block after nonblock secs */ +- char d_termname[20 + 1]; /* $TERM */ ++ char d_termname[40 + 1]; /* $TERM */ + char *d_tentry; /* buffer for tgetstr */ + char d_tcinited; /* termcap inited flag */ + int d_width, d_height; /* width/height of the screen */ +Index: screen/screen.h +=================================================================== +--- screen.orig/screen.h 2011-10-08 21:20:57.000000000 +0200 ++++ screen/screen.h 2011-10-08 21:28:45.000000000 +0200 +@@ -214,7 +214,7 @@ + char preselect[20]; + int esc; /* his new escape character unless -1 */ + int meta_esc; /* his new meta esc character unless -1 */ +- char envterm[20 + 1]; /* terminal type */ ++ char envterm[40 + 1]; /* terminal type */ + int encoding; /* encoding of display */ + int detachfirst; /* whether to detach remote sessions first */ + } diff -Nru screen-4.0.3/debian/patches/51EXP_session_creation_time.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/51EXP_session_creation_time.dpatch --- screen-4.0.3/debian/patches/51EXP_session_creation_time.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/51EXP_session_creation_time.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,323 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 51EXP_session_creation_time.dpatch by -## -## DP: Add lookup code for the creation time of each session. Requires -## DP: digging in /proc/$pid and /proc/uptime, though, so it's definitely -## DP: no candidate for the Beautiful C contest. -## DP: Affects screen's behaviour in the following situations: -## DP: * 'screen -ls' lists available sessions sorted chronologically -## DP: * 'screen -RR' now picks the youngest session instead of an -## DP: arbitrary one - -@DPATCH@ -diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 ---- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:45:00.000000000 +0200 -+++ screen-4.0.3/doc/screen.1 2008-06-01 23:45:02.000000000 +0200 -@@ -238,7 +238,7 @@ - .IR screen , - but prints a list of - .I pid.tty.host --strings identifying your -+strings and creation timestamps identifying your - .I screen - sessions. - Sessions marked `detached' can be resumed with \*Qscreen -r\*U. Those marked -@@ -317,7 +317,7 @@ - sessions in another user's directory. This requires setuid-root. - .TP 5 - .B \-R --attempts to resume the first detached -+attempts to resume the youngest (in terms of creation time) detached - .I screen - session it finds. If successful, all other command-line options are ignored. - If no detached session exists, starts a new session using the specified -@@ -327,6 +327,8 @@ - .I screen - is run as a login-shell (actually screen uses \*Q-xRR\*U in that case). - For combinations with the \fB\-d\fP/\fB\-D\fP option see there. -+.B Note: -+Time-based session selection is a Debian addition. - .TP 5 - .B \-s - sets the default shell to the program specified, instead of the value -diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo ---- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:45:00.000000000 +0200 -+++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:45:02.000000000 +0200 -@@ -315,7 +315,8 @@ - @itemx -list [@var{match}] - Do not start @code{screen}, but instead print a list of session - identification strings (usually of the form @var{pid.tty.host}; --@pxref{Session Name}). Sessions marked @samp{detached} can be resumed -+@pxref{Session Name}) and the corresponding creation timestamps. -+Sessions marked @samp{detached} can be resumed - with @code{screen -r}. Those marked @samp{attached} are running and - have a controlling terminal. If the session runs in multiuser mode, - it is marked @samp{multi}. Sessions marked as @samp{unreachable} either -@@ -376,14 +377,15 @@ - sessions in another user's directory. This requires setuid-root. - - @item -R --Resume the first appropriate detached @code{screen} session. If --successful, all other command-line options are ignored. If no detached -+Resume the most-recently created appropriate detached @code{screen} session. -+If successful, all other command-line options are ignored. If no detached - session exists, start a new session using the specified options, just as - if @samp{-R} had not been specified. This option is set by default if - screen is run as a login-shell (actually screen uses @samp{-xRR} in - that case). - For combinations with the - @samp{-D}/@samp{-d} option see there. -+@samp{Note:} Time-based session selection is a Debian addition. - - @item -s @var{program} - Set the default shell to be @var{program}. By default, @code{screen} -diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h ---- screen-4.0.3.orig/extern.h 2008-06-01 23:45:02.000000000 +0200 -+++ screen-4.0.3/extern.h 2008-06-01 23:45:02.000000000 +0200 -@@ -391,6 +391,8 @@ - #else - extern int xsnprintf __P(()); - #endif -+extern time_t SessionCreationTime __P((const char *)); -+extern time_t GetUptime __P((void)); - - - /* acl.c */ -diff -Naur screen-4.0.3.orig/misc.c screen-4.0.3/misc.c ---- screen-4.0.3.orig/misc.c 2008-06-01 23:39:49.000000000 +0200 -+++ screen-4.0.3/misc.c 2008-06-01 23:45:02.000000000 +0200 -@@ -24,6 +24,7 @@ - #include - #include /* mkdir() declaration */ - #include -+#include - - #include "config.h" - #include "screen.h" -@@ -796,3 +797,40 @@ - } - - #endif -+ -+time_t SessionCreationTime(const char *fifo) { -+ char ppath[20]; -+ int pfd; -+ char pdata[512]; -+ char *jiffies; -+ -+ int pid = atoi(fifo); -+ if (pid <= 0) return 0; -+ sprintf(ppath, "/proc/%u/stat", pid); -+ pfd = open(ppath, O_RDONLY); -+ if (pfd < 0) return 0; -+ while (1) { -+ int R=0, RR; -+ RR = read(pfd, pdata + R, 512-R); -+ if (RR < 0) {close(pfd); return 0;} -+ else if (RR == 0) break; -+ } -+ close(pfd); -+ -+ for (pfd=21, jiffies=pdata; pfd; --pfd) { -+ jiffies = strchr(jiffies, ' '); -+ if (!jiffies) break; else ++jiffies; -+ } -+ if (!jiffies) return 0; -+ -+ return atol(jiffies) / 100; -+} -+ -+time_t GetUptime(void) { -+ char uptimestr[32]; -+ int fd = open("/proc/uptime", O_RDONLY); -+ if (fd < 0) return 0; -+ (void)read(fd, uptimestr, 32); -+ close(fd); -+ return atol(uptimestr); -+} -diff -Naur screen-4.0.3.orig/socket.c screen-4.0.3/socket.c ---- screen-4.0.3.orig/socket.c 2008-06-01 23:41:50.000000000 +0200 -+++ screen-4.0.3/socket.c 2008-06-01 23:45:02.000000000 +0200 -@@ -116,15 +116,17 @@ - int sdirlen; - int matchlen = 0; - char *name, *n; -- int firsts = -1, sockfd; -- char *firstn = NULL; -+ int sockfd = -1; - int nfound = 0, ngood = 0, ndead = 0, nwipe = 0, npriv = 0; -+ time_t sysboot = time(NULL) - GetUptime(); - struct sent - { - struct sent *next; - int mode; - char *name; -- } *slist, **slisttail, *sent, *nsent; -+ time_t created; -+ int good; -+ } *slist, **slisttail, *sent, *nsent, *schosen = NULL; - - if (match) - { -@@ -151,7 +153,6 @@ - Panic(errno, "Cannot opendir %s", SockPath); - - slist = 0; -- slisttail = &slist; - while ((dp = readdir(dirp))) - { - name = dp->d_name; -@@ -162,7 +163,7 @@ - { - n = name; - /* if we don't want to match digits. Skip them */ -- if ((*match <= '0' || *match > '9') && (*n > '0' && *n <= '9')) -+ if ((*match < '0' || *match > '9') && (*n >= '0' && *n <= '9')) - { - while (*n >= '0' && *n <= '9') - n++; -@@ -227,12 +228,24 @@ - debug(" store it.\n"); - if ((sent = (struct sent *)malloc(sizeof(struct sent))) == 0) - continue; -- sent->next = 0; - sent->name = SaveStr(name); - sent->mode = mode; -+ sent->created = sysboot + SessionCreationTime(name); -+ sent->good = 0; -+ -+ for (slisttail = &slist; *slisttail; slisttail = &((*slisttail)->next)) -+ { -+ if ((*slisttail)->created < sent->created) break; -+ } -+ -+ sent->next = *slisttail; - *slisttail = sent; -- slisttail = &sent->next; - nfound++; -+ if (sockfd >= 0) -+ { -+ close(sockfd); -+ sockfd = -1; -+ } - sockfd = MakeClientSocket(0); - #ifdef USE_SETEUID - /* MakeClientSocket sets ids back to eff */ -@@ -291,22 +304,14 @@ - (!dflag && !rflag && !xflag)) - { - close(sockfd); -+ sockfd = -1; - debug(" no!\n"); - npriv++; /* a good socket that was not for us */ - continue; - } - ngood++; -- if (fdp && firsts == -1) -- { -- firsts = sockfd; -- firstn = sent->name; -- debug(" taken.\n"); -- } -- else -- { -- debug(" discarded.\n"); -- close(sockfd); -- } -+ sent->good = 1; -+ debug(" added to list.\n"); - } - (void)closedir(dirp); - if (nfound && (lsflag || ngood != 1) && !quietflag) -@@ -325,34 +330,42 @@ - } - for (sent = slist; sent; sent = sent->next) - { -+ char timestr[64]; -+ if (sent->created == 0) -+ { -+ sprintf(timestr, "???"); -+ } else { -+ strftime(timestr, 64, "%x %X", localtime(&sent->created)); -+ } -+ printf("\t%s\t(%s)", sent->name, timestr); - switch (sent->mode) - { - case 0700: -- printf("\t%s\t(Attached)\n", sent->name); -+ printf("\t(Attached)\n"); - break; - case 0600: -- printf("\t%s\t(Detached)\n", sent->name); -+ printf("\t(Detached)\n"); - break; - #ifdef MULTIUSER - case 0701: -- printf("\t%s\t(Multi, attached)\n", sent->name); -+ printf("\t(Multi, attached)\n"); - break; - case 0601: -- printf("\t%s\t(Multi, detached)\n", sent->name); -+ printf("\t(Multi, detached)\n"); - break; - #endif - case -1: - /* No trigraphs here! */ -- printf("\t%s\t(Dead ?%c?)\n", sent->name, '?'); -+ printf("\t(Dead ?%c?)\n", '?'); - break; - case -2: -- printf("\t%s\t(Removed)\n", sent->name); -+ printf("\t(Removed)\n"); - break; - case -3: -- printf("\t%s\t(Remote or dead)\n", sent->name); -+ printf("\t(Remote or dead)\n"); - break; - case -4: -- printf("\t%s\t(Private)\n", sent->name); -+ printf("\t(Private)\n"); - break; - } - } -@@ -365,13 +378,37 @@ - else - Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */ - } -- if (firsts != -1) -+ for (sent = slist; sent; sent = sent->next) - { -- sprintf(SockPath + sdirlen, "/%s", firstn); -- *fdp = firsts; -+ if (sent->good) -+ { -+ schosen = sent; -+ break; -+ } -+ } -+ if (schosen && fdp) -+ { -+ if (sockfd >= 0 && !strcmp(SockPath + sdirlen + 1, schosen->name)) -+ { -+ *fdp = sockfd; -+ sockfd = -1; -+ } -+ else -+ { -+ sprintf(SockPath + sdirlen, "/%s", schosen->name); -+ *fdp = MakeClientSocket(0); -+#ifdef USE_SETEUID -+ xseteuid(real_uid); -+ xsetegid(real_gid); -+#endif -+ } - } - else - SockPath[sdirlen] = 0; -+ if (sockfd >= 0) -+ { -+ close(sockfd); -+ } - for (sent = slist; sent; sent = nsent) - { - nsent = sent->next; diff -Nru screen-4.0.3/debian/patches/51fix-utf8-status-padding-bug.patch screen-4.1.0~20120320gitdb59704/debian/patches/51fix-utf8-status-padding-bug.patch --- screen-4.0.3/debian/patches/51fix-utf8-status-padding-bug.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/51fix-utf8-status-padding-bug.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,65 @@ +fix-utf8-status-padding-bug + +Ensure that multibyte UTF8 characters are counted correctly when +calculating and displaying the caption and hardstatus lines. + +Based on an earlier version by Kees Cook + +Signed-off-by: Dustin Kirkland + +=== modified file 'src/display.c' +Index: screen/display.c +=================================================================== +--- screen.orig/display.c 2012-03-20 22:15:02.000000000 +0100 ++++ screen/display.c 2012-03-20 22:41:28.000000000 +0100 +@@ -2155,7 +2155,7 @@ + { + int chars = strlen_onscreen((unsigned char *)(s + start), (unsigned char *)(s + max)); + D_encoding = 0; +- PutWinMsg(s, start, max); ++ PutWinMsg(s, start, max + ((max - start) - chars)); /* Multibyte count */ + D_encoding = UTF8; + D_x -= (max - chars); /* Yak! But this is necessary to count for + the fact that not every byte represents a +@@ -2249,11 +2249,15 @@ + RefreshHStatus() + { + char *buf; +- ++#ifdef UTF8 ++ int extrabytes = strlen(hstatusstring) - strlen_onscreen(hstatusstring, NULL); ++#else ++ int extrabytes = 0; ++#endif + evdeq(&D_hstatusev); + if (D_status == STATUS_ON_HS) + return; +- buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS > 0) ? D_WS : D_width - !D_CLP, &D_hstatusev, 0); ++ buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS > 0) ? D_WS : D_width - !D_CLP + extrabytes, &D_hstatusev, 0); + if (buf && *buf) + { + ShowHStatus(buf); +@@ -2348,8 +2352,13 @@ + { + if (y == cv->c_ye + 1 && from >= cv->c_xs && from <= cv->c_xe) + { ++#ifdef UTF8 ++ int extrabytes = strlen(captionstring) - strlen_onscreen(captionstring, NULL); ++#else ++ int extrabytes = 0; ++#endif + p = Layer2Window(cv->c_layer); +- buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP), &cv->c_captev, 0); ++ buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP) + extrabytes, &cv->c_captev, 0); + if (cv->c_captev.timeout.tv_sec) + evenq(&cv->c_captev); + xx = to > cv->c_xe ? cv->c_xe : to; +@@ -2358,7 +2367,7 @@ + SetRendition(&mchar_so); + if (l > xx - cv->c_xs + 1) + l = xx - cv->c_xs + 1; +- l = PrePutWinMsg(buf, from - cv->c_xs, l); ++ l = PrePutWinMsg(buf, from - cv->c_xs, l + extrabytes); + from = cv->c_xs + l; + for (; from <= xx; from++) + PUTCHARLP(' '); diff -Nru screen-4.0.3/debian/patches/52fix_screen_utf8_nfd.patch screen-4.1.0~20120320gitdb59704/debian/patches/52fix_screen_utf8_nfd.patch --- screen-4.0.3/debian/patches/52fix_screen_utf8_nfd.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/52fix_screen_utf8_nfd.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,41 @@ +## 52fix_screen_utf8_nfd.dpatch by Nobuhiro Iwamatsu +## +## DP: screen outputs screen "ÿ" after a connected character. +## DP: This is a character without the need. +## DP: This happens in UTF-8 environment. +## DP: Before : screen$ ruby1.9.1 -e 'puts "\u304b\u3099.."' +## DP: がÿ... +## DP: patch applied : screen $ ruby1.9.1 -e 'puts "\u304b\u3099.."' +## DP: が.. +## DP: Report from http://d.hatena.ne.jp/mrkn/20101014/fix_screen_utf8_nfd_bug +## DP: Copyright Kenta Murata (mrkn) +## DP: Modified by Nobuhiro Iwamatsu + +Index: screen/ansi.c +=================================================================== +--- screen.orig/ansi.c 2012-03-20 22:15:02.000000000 +0100 ++++ screen/ansi.c 2012-03-20 22:41:45.000000000 +0100 +@@ -725,6 +725,10 @@ + LPutChar(&curr->w_layer, &omc, ox, oy); + LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); + } ++ if (curr->w_mbcs) ++ { ++ curr->w_rend.mbcs = curr->w_mbcs = 0; ++ } + break; + } + font = curr->w_rend.font; +Index: screen/display.c +=================================================================== +--- screen.orig/display.c 2012-03-20 22:41:28.000000000 +0100 ++++ screen/display.c 2012-03-20 22:41:45.000000000 +0100 +@@ -603,7 +603,7 @@ + D_x += D_AM ? 1 : -1; + D_mbcs = 0; + } +- else if (utf8_isdouble(c)) ++ else if (utf8_isdouble(c) || (c >= 0xd800 && c < 0xe000)) + { + D_mbcs = c; + D_x++; diff -Nru screen-4.0.3/debian/patches/53fix-startup-race-condition.patch screen-4.1.0~20120320gitdb59704/debian/patches/53fix-startup-race-condition.patch --- screen-4.0.3/debian/patches/53fix-startup-race-condition.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/53fix-startup-race-condition.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,15 @@ +Fixes directory creation race condition (#653434) + +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2012-06-21 01:43:09.000000000 +0200 ++++ screen/screen.c 2012-06-21 01:44:31.000000000 +0200 +@@ -1127,7 +1127,7 @@ + sprintf(SockPath, "%s/S-%s", SockDir, LoginName); + if (access(SockPath, F_OK)) + { +- if (mkdir(SockPath, 0700) == -1) ++ if (mkdir(SockPath, 0700) == -1 && errno != EEXIST) + Panic(errno, "Cannot make directory '%s'", SockPath); + (void) chown(SockPath, real_uid, real_gid); + } diff -Nru screen-4.0.3/debian/patches/56-source-file-not-found-warning.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/56-source-file-not-found-warning.dpatch --- screen-4.0.3/debian/patches/56-source-file-not-found-warning.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/56-source-file-not-found-warning.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 56-source-file-not-found-warning.dpatch -## by Dustin Kirkland -## -## DP: sourcing a file that's not found should fail more gracefully, -## DP: by emitting a debug message rather than a work-flow-interrupting -## DP: error message directly to the screen -## DP: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/323756 - -@DPATCH@ ---- screen-4.0.3/fileio.c 2003-09-08 16:25:28.000000000 +0200 -+++ screen-4.0.3/fileio.c.new 2009-02-01 20:15:12.479816708 +0100 -@@ -261,7 +261,7 @@ char *rcfilename; - if ((fp = secfopen(rc_name, "r")) == NULL) - { - if (rc_recursion) -- Msg(errno, "%s: source %s", oldrc_name, rc_name); -+ debug2("%s: source %s\n", oldrc_name, rc_name); - else if (RcFileName && !strcmp(RcFileName, rc_name)) - { - /* diff -Nru screen-4.0.3/debian/patches/58-show-encoding-hardstatus.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/58-show-encoding-hardstatus.dpatch --- screen-4.0.3/debian/patches/58-show-encoding-hardstatus.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/58-show-encoding-hardstatus.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 58-show-encoding-hardstatus.dpatch -## DP: From: rascov@rascov.tw -## DP: Date: Wed Feb 11 05:51:31 CST 2009 -## DP: Subject: show encoding in hardstatus, orginal from BSD by -## DP: yzlin@cs.nctu.edu.tw - -## DP: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/286810 - -@DPATCH@ - ---- screen-4.0.3.orig/screen.c -+++ screen-4.0.3/screen.c -@@ -2564,6 +2564,18 @@ - } - p += strlen(p) - 1; - break; -+ #ifdef ENCODINGS -+ case 'e': -+ *p = 0; -+ D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; -+ if (win && win->w_encoding) -+ { -+ *p++ = ' '; -+ strcpy(p, EncodingName(win->w_encoding)); -+ } -+ p += strlen(p) - 1; -+ break; -+ #endif - case '{': - { - char rbuf[128]; ---- screen-4.0.3.orig/process.c -+++ screen-4.0.3/process.c -@@ -3419,6 +3419,7 @@ - { - WinSwitchEncoding(fore, n); - ResetCharsets(fore); -+ RedisplayDisplays(0); - } - else if (i && display) - D_encoding = n; diff -Nru screen-4.0.3/debian/patches/58-show-encoding-hardstatus.patch screen-4.1.0~20120320gitdb59704/debian/patches/58-show-encoding-hardstatus.patch --- screen-4.0.3/debian/patches/58-show-encoding-hardstatus.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/58-show-encoding-hardstatus.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,41 @@ +Author: rascov@rascov.tw +Date: Wed Feb 11 05:51:31 CST 2009 +Subject: show encoding in hardstatus, orginal from FreeBSD by yzlin@cs.nctu.edu.tw +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/286810 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533498 + +Index: screen/screen.c +=================================================================== +--- screen.orig/screen.c 2012-03-20 22:41:24.000000000 +0100 ++++ screen/screen.c 2012-03-20 22:41:49.000000000 +0100 +@@ -2801,6 +2801,18 @@ + } + p += strlen(p) - 1; + break; ++ #ifdef ENCODINGS ++ case 'e': ++ *p = 0; ++ D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; ++ if (win && win->w_encoding) ++ { ++ *p++ = ' '; ++ strcpy(p, EncodingName(win->w_encoding)); ++ } ++ p += strlen(p) - 1; ++ break; ++ #endif + case '{': + { + char rbuf[128]; +Index: screen/process.c +=================================================================== +--- screen.orig/process.c 2012-03-20 22:41:05.000000000 +0100 ++++ screen/process.c 2012-03-20 22:41:49.000000000 +0100 +@@ -3687,6 +3687,7 @@ + { + WinSwitchEncoding(fore, n); + ResetCharsets(fore); ++ RedisplayDisplays(0); + } + else if (i && display) + D_encoding = n; diff -Nru screen-4.0.3/debian/patches/59-fix-manpage-warnings.patch screen-4.1.0~20120320gitdb59704/debian/patches/59-fix-manpage-warnings.patch --- screen-4.0.3/debian/patches/59-fix-manpage-warnings.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/59-fix-manpage-warnings.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,1090 @@ +Patch to fix minor issues with the man page: + +* Lintian warning manpage-has-errors-from-man fixed by replacing all + occurrences of "..." by "…" +* Fixes tons of lintian warnings hyphen-used-as-minus-sign +* Fixes two typos found by lintian + +Index: screen/doc/screen.1 +=================================================================== +--- screen.orig/doc/screen.1 2012-06-10 15:07:54.000000000 +0200 ++++ screen/doc/screen.1 2012-06-10 15:12:28.000000000 +0200 +@@ -245,7 +245,7 @@ + strings identifying your + .I screen + sessions. +-Sessions marked `detached' can be resumed with \*Qscreen -r\*U. Those marked ++Sessions marked `detached' can be resumed with \*Qscreen \-r\*U. Those marked + `attached' are running and have a controlling terminal. If the session runs in + multiuser mode, it is marked `multi'. Sessions marked as `unreachable' either + live on a different host or are `dead'. +@@ -264,13 +264,13 @@ + .B \-m + causes + .I screen +-to ignore the $STY environment variable. With \*Qscreen -m\*U creation of ++to ignore the $STY environment variable. With \*Qscreen \-m\*U creation of + a new session is enforced, regardless whether + .I screen + is called from within another + .I screen + session or not. This flag has a special meaning in connection +-with the `-d' option: ++with the `\-d' option: + .TP 8 + .B \-d \-m + Start +@@ -309,7 +309,7 @@ + .TP 5 + .B \-Q + Some commands now can be queried from a remote session using this +-flag, e.g. 'screen -Q windows'. The commands will send the ++flag, e.g. \*Qscreen \-Q windows\*U. The commands will send the + response to the stdout of the querying process. If there was an + error in the command, then the querying process will exit with + a non-zero status. +@@ -348,7 +348,7 @@ + .B \-R + had not been specified. The option is set by default if + .I screen +-is run as a login-shell (actually screen uses \*Q-xRR\*U in that case). ++is run as a login-shell (actually screen uses \*Q\-xRR\*U in that case). + For combinations with the \fB\-d\fP/\fB\-D\fP option see there. + .TP 5 + .BI "\-s " program +@@ -359,7 +361,7 @@ + .BI "\-S " sessionname + When creating a new session, this option can be used to specify a + meaningful name for the session. This name identifies the session for +-\*Qscreen -list\*U and \*Qscreen -r\*U actions. It substitutes the ++\*Qscreen \-list\*U and \*Qscreen \-r\*U actions. It substitutes the + default [\fItty.host\fP] suffix. + .TP 5 + .BI "\-t " name +@@ -367,7 +369,7 @@ + See also the \*Qshelltitle\*U .screenrc command. + .TP 5 + .BI "\-T " term +-Set the $TERM enviroment varible using the spcified term as ++Set the $TERM environment varible using the spcified term as + opposed to the defualt setting of \fBscreen\fP. + .TP 5 + .B \-U +@@ -379,7 +381,7 @@ + Print version number. + .TP 5 + .BR \-wipe " [" \fImatch ] +-does the same as \*Qscreen -ls\*U, but removes destroyed sessions instead of ++does the same as \*Qscreen \-ls\*U, but removes destroyed sessions instead of + marking them as `dead'. + An unreachable session is considered dead, when its name matches either + the name of the local host, or the explicitly given parameter, if any. +@@ -425,7 +427,7 @@ + Present a list of all windows for selection. + .IP "\fBC-a 0\fP (select 0)" + .PD 0 +-.IP "\fB ... \fP ..." ++.IP "\fB … \fP …" + .IP "\fBC-a 9\fP (select 9)" + .IP "\fBC-a -\fP (select -)" + .PD +@@ -647,7 +649,7 @@ + searches for the environment variable $SYSSCREENRC (this override feature + may be disabled at compile-time). The user specific + screenrc file is searched in $SCREENRC, then $HOME/.screenrc. +-The command line option \fB-c\fP takes ++The command line option \fB\-c\fP takes + precedence over the above user screenrc files. + .PP + Commands in these files are used to set options, bind functions to +@@ -699,7 +701,7 @@ + .BI chacl " usernames permbits list" + .PP + Change permissions for a comma separated list of users. Permission bits are +-represented as `r', `w' and `x'. Prefixing `+' grants the permission, `-' ++represented as `r', `w' and `x'. Prefixing `+' grants the permission, `\-' + removes it. The third parameter is a comma separated list of commands and/or + windows (specified either by number or title). The special list `#' refers to + all windows, `?' to all commands. if \fIusernames\fP consists of a single `*', +@@ -709,9 +711,9 @@ + user obtains a writelock for this window. + Other bits are currently ignored. + To withdraw the writelock from another user in window 2: +-`aclchg \fIusername\fP -w+w 2'. ++`aclchg \fIusername\fP \-w+w 2'. + To allow read-only access to the session: `aclchg \fIusername\fP +--w \&"#\&"'. As soon as a user's name is known to ++\-w \&"#\&"'. As soon as a user's name is known to + .I screen + he can attach to the session and (per default) has full permissions for all + command and windows. Execution permission for the acl commands, `at' and others +@@ -746,11 +748,11 @@ + .ne 3 + .B aclumask + .RI [[ users ] +bits +-.RI |[ users ] -bits " .... ]" ++.RI |[ users ] \-bits " …. ]" + .br + .B umask + .RI [[ users ] +bits +-.RI |[ users ] -bits " .... ]" ++.RI |[ users ] \-bits " …. ]" + .PP + This specifies the access other users have to windows that will be created by + the caller of the command. +@@ -805,7 +807,7 @@ + .sp + .ne 3 + .BR "at " "[\fIidentifier\fP][" "#\fP|\fP*\fP|\fP%\fP] " +-.IR "command " [ args " ... ]" ++.IR "command " [ args " … ]" + .PP + Execute a command at other displays or windows as if it had been entered there. + \*QAt\*U changes the context (the `current window' or `current display' +@@ -856,7 +858,7 @@ + .PP + Change the color to bright red if bold text is to be printed. + .IP +-attrcolor u "-u b" ++attrcolor u "\-u b" + .PP + Use blue text instead of underline. + .IP +@@ -876,7 +878,7 @@ + .I screen + will automatically detach upon hangup, which + saves all your running programs until they are resumed with a +-.B "screen -r" ++.B "screen \-r" + command. + When turned off, a hangup signal will terminate + .I screen +@@ -894,7 +896,7 @@ + .I lifespan + .I autorefresh + .I cmd +-.I args... ++.I args… + .br + .BI "backtick " id + .PP +@@ -948,7 +950,7 @@ + .sp + .ne 3 + .BI "bind " +-.RB [ -c ++.RB [ \-c + .IR class ] + .I key + .RI [ command " [" args ]] +@@ -970,7 +972,7 @@ + for this key is removed. + The \fIcommand\fP argument can be any command listed in this section. + +-If a command class is specified via the \*Q-c\*U option, the key ++If a command class is specified via the \*Q\-c\*U option, the key + is bound for the specified class. Use the \*Qcommand\*U command + to activate a class. Command classes can be used to create multiple + command keys or multi-character bindings. +@@ -983,7 +985,7 @@ + bind k + bind K kill + bind ^f screen telnet foobar +- bind \e033 screen -ln -t root -h 1000 9 su ++ bind \e033 screen \-ln \-t root \-h 1000 9 su + .fi + .PP + would bind the space key to the command that displays a list +@@ -997,29 +999,29 @@ + a superuser shell and a scrollback buffer of 1000 lines. + .PP + .nf +- bind -c demo1 0 select 10 +- bind -c demo1 1 select 11 +- bind -c demo1 2 select 12 +- bindkey "^B" command -c demo1 ++ bind \-c demo1 0 select 10 ++ bind \-c demo1 1 select 11 ++ bind \-c demo1 2 select 12 ++ bindkey "^B" command \-c demo1 + .fi + .PP + makes \*QC-b 0\*U select window 10, \*QC-b 1\*U window 11, etc. + .PP + .nf +- bind -c demo2 0 select 10 +- bind -c demo2 1 select 11 +- bind -c demo2 2 select 12 +- bind - command -c demo2 ++ bind \-c demo2 0 select 10 ++ bind \-c demo2 1 select 11 ++ bind \-c demo2 2 select 12 ++ bind \- command \-c demo2 + .fi + .PP +-makes \*QC-a - 0\*U select window 10, \*QC-a - 1\*U window 11, etc. ++makes \*QC-a \- 0\*U select window 10, \*QC-a \- 1\*U window 11, etc. + .sp + .ne 3 + .B bindkey +-.RB [ -d ] +-.RB [ -m ] +-.RB [ -a ] +-.RB [[ -k | -t ] ++.RB [ \-d ] ++.RB [ \-m ] ++.RB [ \-a ] ++.RB [[ \-k | \-t ] + .I string + .RI [ "cmd args" ]] + .PP +@@ -1032,9 +1034,9 @@ + \*QINPUT TRANSLATION\*U for a list of default key bindings. + .br + If the +-.B -d ++.B \-d + option is given, bindkey modifies the default table, +-.B -m ++.B \-m + changes the copy mode table + and with neither option the user table is selected. + The argument +@@ -1042,18 +1044,18 @@ + is the sequence of characters to which an action is bound. This + can either be a fixed string or a termcap keyboard capability + name (selectable with the +-.B -k ++.B \-k + option). + .br + Some keys on a VT100 terminal can send a different + string if application mode is turned on (e.g the cursor keys). + Such keys have two entries in the translation table. You can + select the application mode entry by specifying the +-.B -a ++.B \-a + option. + .br + The +-.B -t ++.B \-t + option tells screen not to do inter-character timing. One cannot + turn off the timing if a termcap capability is used. + .br +@@ -1067,18 +1069,18 @@ + Here are some examples of keyboard bindings: + .sp + .nf +- bindkey -d ++ bindkey \-d + .fi + Show all of the default key bindings. The application mode entries + are marked with [A]. + .sp + .nf +- bindkey -k k1 select 1 ++ bindkey \-k k1 select 1 + .fi + Make the "F1" key switch to window one. + .sp + .nf +- bindkey -t foo stuff barfoo ++ bindkey \-t foo stuff barfoo + .fi + Make "foo" an abbreviation of the word "barfoo". Timeout is disabled + so that users can type slowly. +@@ -1092,7 +1094,7 @@ + you have to press the key twice (i.e., escape the escape binding). + .sp + .nf +- bindkey -k F1 command ++ bindkey \-k F1 command + .fi + Make the F11 (not F1!) key an alternative screen + escape (besides ^A). +@@ -1144,7 +1146,7 @@ + .PP + Change the filename used for reading and writing with the paste buffer. + If the optional argument to the \*Qbufferfile\*U command is omitted, +-the default setting (\*Q/tmp/screen-exchange\*U) is reactivated. ++the default setting (\*Q/tmp/screen\-exchange\*U) is reactivated. + The following example will paste the system's password file into + the + .I screen +@@ -1213,7 +1215,7 @@ + to the specified directory or, if called without an argument, + to your home directory (the value of the environment variable $HOME). + All windows that are created by means of the \*Qscreen\*U command +-from within \*Q.screenrc\*U or by means of \*QC-a : screen ...\*U ++from within \*Q.screenrc\*U or by means of \*QC-a : screen …\*U + or \*QC-a c\*U use this as their default directory. + Without a chdir command, this would be the directory from which + .I screen +@@ -1239,7 +1241,7 @@ + specific window creation and changing settings. Note that the \*Qset\*U + keyword no longer exists! Usually commands affect the current window rather + than default settings for future windows. Change defaults with commands +-starting with 'def...'. ++starting with 'def…'. + + If you consider this as the `Ex command mode' of + .IR screen , +@@ -1247,12 +1249,12 @@ + .sp + .ne 3 + .B command +-.RB [ -c ++.RB [ \-c + .IR class ] + .PP + This command has the same effect as typing the screen escape + character (^A). It is probably only useful for key bindings. +-If the \*Q-c\*U option is given, select the specified command ++If the \*Q\-c\*U option is given, select the specified command + class. See also \*Qbind\*U and \*Qbindkey\*U. + .sp + .ne 3 +@@ -1443,7 +1445,7 @@ + .br + .ti -2n + \fB>\fP sets the (second) mark and writes the contents of the paste buffer to +-the screen-exchange file (/tmp/screen-exchange per default) once copy-mode is ++the screen-exchange file (/tmp/screen\-exchange per default) once copy-mode is + finished. + .br + This example demonstrates how to dump the whole scrollback buffer +@@ -1485,7 +1487,7 @@ + .PP + Turns runtime debugging on or off. If + .I screen +-has been compiled with option -DDEBUG debugging available and is turned on per ++has been compiled with option \-DDEBUG debugging available and is turned on per + default. Note that this command only affects debugging output from the main + \*QSCREEN\*U process correctly. Debug output from attacher processes can only + be turned off once and forever. +@@ -1659,7 +1661,7 @@ + .PP + Same as the \fButf8\fP command except that the default setting for new + windows is changed. Initial setting is `on' if screen was started with +-\*Q-U\*U, otherwise `off'. ++\*Q\-U\*U, otherwise `off'. + .sp + .ne 3 + .BR "defwrap on" | off +@@ -1682,7 +1684,7 @@ + .sp + .ne 3 + .B detach +-.RB [ -h ] ++.RB [ \-h ] + .PP + Detach the + .I screen +@@ -1781,16 +1783,16 @@ + .br + (I) Window permissions. Made up of three characters: + (1st character) +- ‘-’ : no read ++ ‘\-’ : no read + ‘r’ : read + ‘R’ : read only due to foreign wlock + (2nd character) +- ‘-’ : no write ++ ‘\-’ : no write + ‘.’ : write suppressed by foreign wlock + ‘w’ : write + ‘W’ : own wlock + (3rd character) +- ‘-’ : no execute ++ ‘\-’ : no execute + ‘x’ : execute + + \*QDisplays\*U needs a region size of at least 10 characters wide and 5 characters high in +@@ -1835,14 +1837,14 @@ + .IR tic . + .sp + .ne 3 +-.BR "echo " [ -n ] ++.BR "echo " [ \-n ] + .I message + .PP + The echo command may be used to annoy + .I screen + users with a 'message of the + day'. Typically installed in a global /etc/screenrc. +-The option \*Q-n\*U may be used to suppress the line feed. ++The option \*Q\-n\*U may be used to suppress the line feed. + See also \*Qsleep\*U. + Echo is also useful for online checking of environment variables. + .sp +@@ -1883,14 +1885,14 @@ + .B eval + .I command1 + .RI [ command2 +-.IR ... ] ++.IR … ] + .PP + Parses and executes each argument as separate command. + .sp + .ne 3 + .B exec + .RI [[ fdpat ] +-.IR "newcommand " [ "args ..." ]] ++.IR "newcommand " [ "args …" ]] + .PP + Run a unix subprocess (specified by an executable path \fInewcommand\fP and its + optional arguments) in the current window. The flow of data between +@@ -1933,7 +1935,7 @@ + .sp + Examples: + .IP +-exec ... /bin/sh ++exec … /bin/sh + .br + exec /bin/sh + .br +@@ -1969,7 +1971,7 @@ + .I pg + still works. + .IP +-!:sed -n s/.*Error.*/\e007/p ++!:sed \-n s/.*Error.*/\e007/p + .PP + Sends window output to both, the user and the sed command. The sed inserts an + additional bell character (oct. 007) to the window output seen by +@@ -2045,14 +2047,14 @@ + .sp + .ne 3 + .B hardcopy +-.RB [ -h ] ++.RB [ \-h ] + .RI [ file ] + .PP + Writes out the currently displayed image to the file \fIfile\fP, + or, if no filename is specified, to \fIhardcopy.n\fP in the + default directory, where \fIn\fP is the number of the current window. + This either appends or overwrites the file if it exists. See below. +-If the option \fB-h\fP is specified, dump also the contents of the ++If the option \fB\-h\fP is specified, dump also the contents of the + scrollback buffer. + .sp + .ne 3 +@@ -2123,22 +2125,22 @@ + .sp + .ne 3 + .B height +-.RB [ -w | -d ] ++.RB [ \-w | \-d ] + .RI [ lines " [" cols ]] + .PP + Set the display height to a specified number of lines. When no argument + is given it toggles between 24 and 42 lines display. You can also + specify a width if you want to change both values. + The +-.B -w ++.B \-w + option tells screen to leave the display size unchanged and just set + the window size, +-.B -d ++.B \-d + vice versa. + .sp + .ne 3 + .B help +-.RB [ -c ++.RB [ \-c + .IR class ] + .PP + Not really a online help, but +@@ -2149,7 +2151,7 @@ + bindings. + Subsequent pages will display the custom commands, one command per key. + Press space when you're done reading each page, or return to exit early. +-All other characters are ignored. If the \*Q-c\*U option is given, ++All other characters are ignored. If the \*Q\-c\*U option is given, + display all bound commands for the specified command class. + See also \*QDEFAULT KEY BINDINGS\*U section. + .sp +@@ -2160,7 +2162,7 @@ + For example csh has the command \*Q!!\*U to repeat the last command executed. + .I Screen + allows you to have a primitive way of re-calling \*Qthe command that +-started ...\*U: You just type the first letter of that command, then hit ++started …\*U: You just type the first letter of that command, then hit + `C-a {' and + .I screen + tries to find a previous line that matches with the `prompt character' +@@ -2202,11 +2204,11 @@ + + .nf + +flow automatic flow control, currently on. +- -flow automatic flow control, currently off. ++ \-flow automatic flow control, currently off. + +(+)flow flow control enabled. Agrees with automatic control. +- -(+)flow flow control disabled. Disagrees with automatic control. +- +(-)flow flow control enabled. Disagrees with automatic control. +- -(-)flow flow control disabled. Agrees with automatic control. ++ \-(+)flow flow control disabled. Disagrees with automatic control. ++ +(\-)flow flow control enabled. Disagrees with automatic control. ++ \-(\-)flow flow control disabled. Agrees with automatic control. + .fi + + The current line wrap setting (`+wrap' indicates enabled, `\-wrap' not) is +@@ -2467,7 +2469,7 @@ + a second time-stamp is added to document the restart of the + output. You can change this timeout with the second form + of the command. The third form is used for customizing the time-stamp +-string (`-- %n:%t -- time-stamp -- %M/%d/%y %c:%s --\\n' by ++string (`\-\- %n:%t \-\- time-stamp \-\- %M/%d/%y %c:%s \-\-\\n' by + default). + .sp + .ne 3 +@@ -2611,11 +2613,11 @@ + the display and redisplay the updated window contents. + .sp + .ne 3 +-.BR "number " [[+|-] \fIn ] ++.BR "number " [[+|\-] \fIn ] + .PP + Change the current window's number. If the given number \fIn\fP is already + used by another window, both windows exchange their numbers. If no argument is +-specified, the current window number (and title) is shown. Using `+' or `-' ++specified, the current window number (and title) is shown. Using `+' or `\-' + will change the window's number by the relative amount specified. + .sp + .ne 3 +@@ -2771,18 +2773,18 @@ + .sp + .ne 3 + .B readbuf +-.RB [ -e ++.RB [ \-e + .IR encoding ] + .RI [ filename ] + .PP + Reads the contents of the specified file into the paste buffer. +-You can tell screen the encoding of the file via the \fB-e\fP option. ++You can tell screen the encoding of the file via the \fB\-e\fP option. + If no file is specified, the screen-exchange filename is used. + See also \*Qbufferfile\*U command. + .sp + .ne 3 + .B readreg +-.RB [ -e ++.RB [ \-e + .IR encoding ] + .RI [ register " [" filename ]] + .PP +@@ -2791,7 +2793,7 @@ + or entered at the prompt. With two arguments it reads the contents of the named + file into the register, just as \fIreadbuf\fP reads the screen-exchange file + into the paste buffer. +-You can tell screen the encoding of the file via the \fB-e\fP option. ++You can tell screen the encoding of the file via the \fB\-e\fP option. + The following example will paste the system's password file into + the + .I screen +@@ -2810,12 +2812,12 @@ + .sp + .ne 3 + .B register +-.RB [ -e ++.RB [ \-e + .IR encoding ] + .I "key string" + .PP + Save the specified \fIstring\fP to the register \fIkey\fP. +-The encoding of the string can be specified via the \fB-e\fP option. ++The encoding of the string can be specified via the \fB\-e\fP option. + See also the \*Qpaste\*U command. + .sp + .ne 3 +@@ -2853,7 +2855,7 @@ + .IP + resize +N increase current region height by N + .IP +-resize -N decrease current region height by N ++resize \-N decrease current region height by N + .IP + resize N set current region height to N + .IP +@@ -2865,15 +2867,15 @@ + .PP + .sp + .ne 3 +-.B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]|\fB//group\fP]" ++.B "screen \fP[\fI\-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]|\fB//group\fP]" + .PP + Establish a new window. + The flow-control options (\fB\-f\fP, \fB\-fn\fP and \fB\-fa\fP), +-title (a.\|k.\|a.) option (\fB\-t\fP), login options (\fB-l\fP and \fB-ln\fP) +-, terminal type option (\fB-T\fP ), the all-capability-flag (\fB-a\fP) +-and scrollback option (\fB-h\fP ) may be specified with each command. +-The option (\fB-M\fP) turns monitoring on for this window. +-The option (\fB-L\fP) turns output logging on for this window. ++title (a.\|k.\|a.) option (\fB\-t\fP), login options (\fB\-l\fP and \fB\-ln\fP) ++, terminal type option (\fB\-T\fP ), the all-capability-flag (\fB\-a\fP) ++and scrollback option (\fB\-h\fP ) may be specified with each command. ++The option (\fB\-M\fP) turns monitoring on for this window. ++The option (\fB\-L\fP) turns output logging on for this window. + If an optional number \fIn\fP in the range 0..MAXWIN-1 is given, + the window number \fIn\fP is assigned to the newly created window + (or, if this number is already in-use, the next available number). +@@ -2887,7 +2889,7 @@ + .nf + # example for .screenrc: + screen 1 +- screen -fn -t foobar -L 2 telnet foobar ++ screen \-fn \-t foobar \-L 2 telnet foobar + .fi + .sp + .I screen +@@ -2927,19 +2929,19 @@ + Thus, the first window can be activated by \*Qselect 0\*U. + The number of windows is limited at compile-time by the MAXWIN + configuration parameter (which defaults to 40). +-There are two special WindowIDs, \*Q-\*U selects the ++There are two special WindowIDs, \*Q\-\*U selects the + internal blank window and \*Q.\*U selects the current window. The +-latter is useful if used with screen's \*Q-X\*U option. ++latter is useful if used with screen's \*Q\-X\*U option. + .sp + .ne + .BR "sessionname " [ \fIname ] + .PP +-Rename the current session. Note, that for \*Qscreen -list\*U the ++Rename the current session. Note, that for \*Qscreen \-list\*U the + name shows up with the process-id prepended. If the argument \*Qname\*U + is omitted, the name of this session is displayed. Caution: The $STY + environment variables will still reflect the old name in pre-existing + shells. This may result in confusion. Use of this command is generally +-discouraged. Use the \*Q-S\*U command-line option if you want to ++discouraged. Use the \*Q\-S\*U command-line option if you want to + name a new session. + The default is constructed from the tty and host names. + .sp +@@ -2969,7 +2971,7 @@ + This overrides the value of the environment variable $SHELL. + This is useful if you'd like to run a tty-enhancer which is expecting to + execute the program specified in $SHELL. If the command begins with +-a '-' character, the shell will be started as a login-shell. ++a '\-' character, the shell will be started as a login-shell. + .sp + .ne 3 + .B "shelltitle \fItitle\fP" +@@ -3036,12 +3038,12 @@ + .sp + .ne 3 + .B split +-.RB [ -v ] ++.RB [ \-v ] + .PP + Split the current region into two new ones. All regions on the + display are resized to make room for the new region. The blank + window is displayed on the new region. Splits are made horizontally +-unless -v is used. Use the \*Qremove\*U or the \*Qonly\*U command ++unless \-v is used. Use the \*Qremove\*U or the \*Qonly\*U command + to delete regions. Use \*Qfocus\*U to toggle between regions. + .sp + .ne 3 +@@ -3058,7 +3060,7 @@ + .I string + in the input buffer of the current window. + This is like the \*Qpaste\*U command but with much less overhead. +-Without a paramter, screen will prompt for a string to stuff. ++Without a parameter, screen will prompt for a string to stuff. + You cannot paste + large buffers with the \*Qstuff\*U command. It is most useful for key + bindings. See also \*Qbindkey\*U. +@@ -3108,17 +3110,17 @@ + is VT100/ANSI compatible. + The use of the \*Qterm\*U command is discouraged for non-default purpose. + That is, one may want to specify special $TERM settings (e.g. vt100) for the +-next \*Qscreen rlogin othermachine\*U command. Use the command \*Qscreen -T vt100 ++next \*Qscreen rlogin othermachine\*U command. Use the command \*Qscreen \-T vt100 + rlogin othermachine\*U rather than setting and resetting the default. + .sp + .ne 3 +-.BI termcap " term terminal-tweaks" ++.BI termcap " term terminal\-tweaks" + .RI [ window-tweaks ] + .br +-.BI terminfo " term terminal-tweaks" ++.BI terminfo " term terminal\-tweaks" + .RI [ window-tweaks ] + .br +-.BI termcapinfo " term terminal-tweaks" ++.BI termcapinfo " term terminal\-tweaks" + .RI [ window-tweaks ] + .PP + Use this command to modify your terminal's termcap entry without going +@@ -3234,7 +3236,7 @@ + Unbind all the bindings. This can be useful when + screen is used solely for its detaching abilities, such as when + letting a console application run as a daemon. If, for some reason, +-it is necessary to bind commands after this, use 'screen -X'. ++it is necessary to bind commands after this, use 'screen \-X'. + .sp + .ne 3 + .BI "unsetenv " var +@@ -3249,7 +3251,7 @@ + Change the encoding used in the current window. If utf8 is enabled, the + strings sent to the window will be UTF-8 encoded and vice versa. Omitting the + parameter toggles the setting. If a second parameter is given, the display's +-encoding is also changed (this should rather be done with screen's \*Q-U\*U ++encoding is also changed (this should rather be done with screen's \*Q\-U\*U + option). + See also \*Qdefutf8\*U, which changes the default setting of a new + window. +@@ -3306,7 +3308,7 @@ + .sp + .ne 3 + .B width +-.RB [ -w | -d ] ++.RB [ \-w | \-d ] + .RI [ cols " [" lines ]] + .PP + Toggle the window width between 80 and 132 columns or set it to \fIcols\fP +@@ -3315,17 +3317,17 @@ + See the \*Qtermcap\*U command for more information. You can also specify + a new height if you want to change both values. + The +-.B -w ++.B \-w + option tells screen to leave the display size unchanged and just set + the window size, +-.B -d ++.B \-d + vice versa. + .sp + .ne 3 + .B windowlist +-.RB [ -b ] +-.RB [ -m ] +-.RB [ -g ] ++.RB [ \-b ] ++.RB [ \-m ] ++.RB [ \-g ] + .br + .B windowlist + .B string +@@ -3339,15 +3341,15 @@ + If screen was in a window group, screen will + back out of the group and then display the windows in that group. + If the +-.B -b ++.B \-b + option is given, screen will switch to the blank window before + presenting the list, so that the current window is also selectable. + The +-.B -m ++.B \-m + option changes the order of the windows, instead of sorting by + window numbers screen uses its internal most-recently-used list. + The +-.B -g ++.B \-g + option will show the windows inside any groups in that level + and downwards. + +@@ -3435,7 +3437,7 @@ + Each window is listed by number with the name of process that has been + started in the window (or its title); + the current window is marked with a `*'; +-the previous window is marked with a `-'; ++the previous window is marked with a `\-'; + all the windows that are \*Qlogged in\*U are marked with a `$'; + a background window that has received a bell is marked with a `!'; + a background window that is being monitored and has had activity occur +@@ -3458,17 +3460,17 @@ + .sp + .ne 3 + .B writebuf +-.RB [ -e ++.RB [ \-e + .IR encoding ] + .RI [ filename ] + .PP +-Writes the contents of the paste buffer to the specified file, or the public accessible screen-exchange ++Writes the contents of the paste buffer to the specified file, or the public accessible screen\-exchange + file if no filename is given. This is thought of as a primitive means of communication between + .I screen + users on the same host. If an encoding is specified the paste buffer + is recoded on the fly to match the encoding. + The filename can be set with the \fIbufferfile\fP +-command and defaults to \*Q/tmp/screen-exchange\*U. ++command and defaults to \*Q/tmp/screen\-exchange\*U. + .sp + .ne 3 + .BR "writelock " [ on | "off\fR|\fBauto\fR]" +@@ -3582,13 +3584,13 @@ + The normal window contains a shell (default, if no parameter is given) or any + other system command that could be executed from a shell (e.g. + .BR slogin , +-etc...) ++etc…) + + .IP \(bu + If a tty (character special device) name (e.g. \*Q/dev/ttya\*U) + is specified as the first parameter, then the window is directly connected to + this device. +-This window type is similar to \*Qscreen cu -l /dev/ttya\*U. ++This window type is similar to \*Qscreen cu \-l /dev/ttya\*U. + Read and write access is required on the device node, an exclusive open is + attempted on the node to mark the connection line as busy. + An optional parameter is allowed consisting of a comma separated list of flags +@@ -3598,11 +3600,11 @@ + Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed. + .IP "cs8 or cs7" + Specify the transmission of eight (or seven) bits per byte. +-.IP "ixon or -ixon" ++.IP "ixon or \-ixon" + Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data. +-.IP "ixoff or -ixoff" ++.IP "ixoff or \-ixoff" + Enables (or disables) software flow-control for receiving data. +-.IP "istrip or -istrip" ++.IP "istrip or \-istrip" + Clear (or keep) the eight bit in each received byte. + .PP + You may want to specify as many of these options as applicable. Unspecified +@@ -3727,7 +3729,7 @@ + .IP u + all other users on this window + .IP w +-all window numbers and names. With '-' qualifier: up to the current ++all window numbers and names. With '\-' qualifier: up to the current + window; with '+' qualifier: starting with the window after the current + one. + .IP W +@@ -3747,7 +3749,7 @@ + A '0' qualifier tells screen to treat the number as absolute position. + You can specify to pad relative to the last absolute pad position + by adding a '+' qualifier or to pad relative to the right margin +-by using '-'. The padding truncates the string if the specified ++by using '\-'. The padding truncates the string if the specified + position lies before the current position. Add the 'L' qualifier + to change this. + .IP < +@@ -3759,7 +3761,7 @@ + the output area. (The area starts from the last absolute pad + position and ends with the position specified by the truncation + operator.) The 'L' qualifier tells screen to mark the truncated +-parts with '...'. ++parts with '…'. + .IP { + attribute/color modifier string terminated by the next \*Q}\*U + .IP ` +@@ -3782,7 +3784,7 @@ + a color description. The following change types are known: + .IP + + add the specified set to the current attributes +-.IP - ++.IP \- + remove the set from the current attributes + .IP ! + invert the set in the current attributes +@@ -3843,7 +3845,7 @@ + the same behavior for two-letter color descriptions, also prefix them + with a \*Q.\*U. + .br +-As a special case, \*Q%{-}\*U restores the attributes and colors that ++As a special case, \*Q%{\-}\*U restores the attributes and colors that + were set before the last change was made (i.e., pops one level of the + color-change stack). + .PP +@@ -3854,7 +3856,7 @@ + use bold red + .IP "\*Q= yd\*U" + clear all attributes, write in default color on yellow background. +-.IP "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" ++.IP "%\-Lw%{= BW}%50>%n%f* %t%{\-}%+Lw%<" + The available windows centered at the current window and truncated to + the available width. The current window is displayed white on blue. + This can be used with \*Qhardstatus alwayslastline\*U. +@@ -3985,7 +3987,7 @@ + .PP + Here's some .screenrc examples: + .IP +-screen -t top 2 nice top ++screen \-t top 2 nice top + .PP + Adding this line to your .screenrc would start a nice-d version of the + \*Qtop\*U command in window 2 named \*Qtop\*U rather than \*Qnice\*U. +@@ -4005,7 +4007,7 @@ + The window status would show the name \*Qtrn\*U while the command was + running, and revert to \*Qcsh\*U upon completion. + .IP +-bind R screen -t '% |root:' su ++bind R screen \-t '% |root:' su + .PP + Having this command in your .screenrc would bind the key + sequence \*QC-a R\*U to the \*Qsu\*U command and give it an +@@ -4091,7 +4093,7 @@ + the contents of your $TERM variable. + If no such entry exists, + .I screen +-tries \*Qscreen\*U (or \*Qscreen-w\*U if the terminal is wide ++tries \*Qscreen\*U (or \*Qscreen\-w\*U if the terminal is wide + (132 cols or more)). + If even this entry cannot be found, \*Qvt100\*U is used as a + substitute. +@@ -4134,7 +4136,7 @@ + When the is latter defined, its value will be copied verbatim into each + window's $TERMCAP variable. + This can either be the full terminal definition, or a filename where the +-terminal \*Qscreen\*U (and/or \*Qscreen-w\*U) is defined. ++terminal \*Qscreen\*U (and/or \*Qscreen\-w\*U) is defined. + .PP + Note that + .I screen +@@ -4286,7 +4288,7 @@ + .BR "ESC ] 83 ; cmd ^G" " (A)" + Execute screen command. This only works if multi-user support is + compiled into screen. The pseudo-user \*Q:window:\*U is used to +-check the access control list. Use \*Qaddacl :window: -rwx #?\*U to ++check the access control list. Use \*Qaddacl :window: \-rwx #?\*U to + create a user with no rights and allow only the needed commands. + .TP 27 + .BR "Control-N" " (A)" +@@ -4379,7 +4381,7 @@ + .B "ESC [ \fPPn\fB d" + Cursor vertical position + .TP 27 +-.B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB m" ++.B "ESC [ \fPPs\fB ;\fP…\fB; \fPPs\fB m" + Select Graphic Rendition + .TP 27 + \h'\w'ESC [ 'u'Ps = None or \fB0\fP +@@ -4448,8 +4450,8 @@ + \h'\w'ESC [ Ps = 'u'\fB40\fP (A) + Background Black + .TP 27 +-\h'\w'ESC [ Ps = 'u'\fB...\fP +-... ++\h'\w'ESC [ Ps = 'u'\fB…\fP ++… + .TP 27 + \h'\w'ESC [ Ps = 'u'\fB49\fP (A) + Background Default +@@ -4493,10 +4495,10 @@ + .B "ESC [ \fPPn\fB ^" + same as above + .TP 27 +-.B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB h" ++.B "ESC [ \fPPs\fB ;\fP…\fB; \fPPs\fB h" + Set Mode + .TP 27 +-.B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB l" ++.B "ESC [ \fPPs\fB ;\fP…\fB; \fPPs\fB l" + Reset Mode + .TP 27 + \h'\w'ESC [ 'u'Ps = \fB4\fP (A) +@@ -4639,7 +4641,7 @@ + stuff \e033Oy (A) + Keypad + f+ stuff + + stuff \e033Ok (A) +-Keypad - f- stuff - ++Keypad \- f\- stuff \- + stuff \e033Om (A) + Keypad * f* stuff * + stuff \e033Oj (A) +@@ -4844,8 +4846,8 @@ + + .SH FILES + .PD 0 +-.IP .../screen-4.?.??/etc/screenrc 34 +-.IP .../screen-4.?.??/etc/etcscreenrc ++.IP …/screen-4.?.??/etc/screenrc 34 ++.IP …/screen-4.?.??/etc/etcscreenrc + Examples in the + .I screen + distribution package for private and global initialization files. +@@ -4856,16 +4858,16 @@ + .IP $SCREENRC + .IP $HOME/.screenrc + Read in after /etc/screenrc +-.IP $SCREENDIR/S- +-.IP /var/run/screen/S- ++.IP $SCREENDIR/S\- ++.IP /var/run/screen/S\- + Socket directories (default) +-.IP /usr/tmp/screens/S- ++.IP /usr/tmp/screens/S\- + Alternate socket directories. + .IP "/.termcap" + Written by the "termcap" output function +-.IP /usr/tmp/screens/screen-exchange ++.IP /usr/tmp/screens/screen\-exchange + or +-.IP /tmp/screen-exchange ++.IP /tmp/screen\-exchange + .I screen + `interprocess communication buffer' + .IP hardcopy.[0-9] +@@ -4894,16 +4896,16 @@ + .SH COPYLEFT + .nf + Copyright (c) 2010 +- Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) ++ Juergen Weigert (jnweiger@immd4.informatik.uni\-erlangen.de) + Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + Copyright (c) 2008, 2009 +- Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) +- Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) ++ Juergen Weigert (jnweiger@immd4.informatik.uni\-erlangen.de) ++ Michael Schroeder (mlschroe@immd4.informatik.uni\-erlangen.de) + Micah Cowan (micah@cowan.name) + Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + Copyright (C) 1993-2003 +- Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) +- Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) ++ Juergen Weigert (jnweiger@immd4.informatik.uni\-erlangen.de) ++ Michael Schroeder (mlschroe@immd4.informatik.uni\-erlangen.de) + Copyright (C) 1987 Oliver Laumann + .fi + .PP +@@ -4925,8 +4927,8 @@ + .SH CONTRIBUTORS + .nf + Ken Beal (kbeal@amber.ssd.csd.harris.com), +-Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de), +-Toerless Eckert (eckert@immd4.informatik.uni-erlangen.de), ++Rudolf Koenig (rfkoenig@immd4.informatik.uni\-erlangen.de), ++Toerless Eckert (eckert@immd4.informatik.uni\-erlangen.de), + Wayne Davison (davison@borland.com), + Patrick Wolfe (pat@kai.com, kailand!pat), + Bart Schaefer (schaefer@cse.ogi.edu), +@@ -4967,10 +4969,10 @@ + .I GNU + distribution site. The home site of + .I screen +-is ftp.uni-erlangen.de, in the directory ++is ftp.uni\-erlangen.de, in the directory + pub/utilities/screen. The subdirectory `private' contains the latest beta + testing release. If you want to help, send a note to +-screen@uni-erlangen.de. ++screen@uni\-erlangen.de. + + .SH BUGS + .PD +@@ -5015,9 +5017,9 @@ + unless the device driver is configured to send a HANGUP signal. + To detach a + .I screen +-session use the -D or -d command line option. ++session use the \-D or \-d command line option. + .IP \(bu +-If a password is set, the command line options -d and -D still detach a ++If a password is set, the command line options \-d and \-D still detach a + session without asking. + .IP \(bu + Both \*Qbreaktype\*U and \*Qdefbreaktype\*U change the break generating +@@ -5032,5 +5034,5 @@ + A weird imagination is most useful to gain full advantage of all the features. + .IP \(bu + Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza to +-.BR screen@uni-erlangen.de . ++.BR screen@uni\-erlangen.de . + diff -Nru screen-4.0.3/debian/patches/59-no-beep-on-write-acl.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/59-no-beep-on-write-acl.dpatch --- screen-4.0.3/debian/patches/59-no-beep-on-write-acl.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/59-no-beep-on-write-acl.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 59-no-beep-on-write-acl.dpatch by Kees Cook -## DP: Description: instead of beeping on all displays, report failure to attached display. -## DP: Upstream: https://savannah.gnu.org/bugs/index.php?26401 - -@DPATCH@ -diff -uNrp screen-4.0.3~/window.c screen-4.0.3/window.c ---- screen-4.0.3~/window.c 2009-04-29 10:25:28.000000000 -0700 -+++ screen-4.0.3/window.c 2009-04-29 10:27:21.000000000 -0700 -@@ -275,8 +275,7 @@ int *lenp; - debug2("window %d, user %s: ", fore->w_number, D_user->u_name); - debug2("writelock %d (wlockuser %s)\n", fore->w_wlock, - fore->w_wlockuser ? fore->w_wlockuser->u_name : "NULL"); -- /* XXX FIXME only display !*/ -- WBell(fore, visual_bell); -+ Msg(0, "write: permission denied (user %s)", D_user->u_name); - *bufpp += *lenp; - *lenp = 0; - return; diff -Nru screen-4.0.3/debian/patches/60-644788-screen-4.1.0-4.0.3-interoperability.patch screen-4.1.0~20120320gitdb59704/debian/patches/60-644788-screen-4.1.0-4.0.3-interoperability.patch --- screen-4.0.3/debian/patches/60-644788-screen-4.1.0-4.0.3-interoperability.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/60-644788-screen-4.1.0-4.0.3-interoperability.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,151 @@ +Author: Julien Cristau +Debian-Bug: #644788 + +Author: Axel Beckert +Debian-Bug: #684342 + +The following patch, while not all that pretty, seems to allow me to +attach to a screen started with either the squeeze or sid version. +I'm sure there's corner cases, but. + +Cheers, +Julien + +Index: screen/screen.h +=================================================================== +--- screen.orig/screen.h 2012-08-09 01:01:28.000000000 +0200 ++++ screen/screen.h 2012-08-09 01:01:28.000000000 +0200 +@@ -240,6 +240,57 @@ struct msg + } m; + }; + ++struct old_msg ++{ ++ int protocol_revision; /* reduce harm done by incompatible messages */ ++ int type; ++ char m_tty[MAXPATHLEN]; /* ttyname */ ++ union ++ { ++ struct ++ { ++ int lflag; ++ int aflag; ++ int flowflag; ++ int hheight; /* size of scrollback buffer */ ++ int nargs; ++ char line[MAXPATHLEN]; ++ char dir[MAXPATHLEN]; ++ char screenterm[20]; /* is screen really "screen" ? */ ++ } ++ create; ++ struct ++ { ++ char auser[20 + 1]; /* username */ ++ int apid; /* pid of frontend */ ++ int adaptflag; /* adapt window size? */ ++ int lines, columns; /* display size */ ++ char preselect[20]; ++ int esc; /* his new escape character unless -1 */ ++ int meta_esc; /* his new meta esc character unless -1 */ ++ char envterm[20 + 1]; /* terminal type */ ++ int encoding; /* encoding of display */ ++ } ++ attach; ++ struct ++ { ++ char duser[20 + 1]; /* username */ ++ int dpid; /* pid of frontend */ ++ } ++ detach; ++ struct ++ { ++ char auser[20 + 1]; /* username */ ++ int nargs; ++ char cmd[MAXPATHLEN]; /* command */ ++ int apid; /* pid of frontend */ ++ char preselect[20]; ++ } ++ command; ++ char message[MAXPATHLEN * 2]; ++ } m; ++}; ++ + /* + * And the signals the attacher receives from the backend + */ +Index: screen/socket.c +=================================================================== +--- screen.orig/socket.c 2012-08-09 01:01:28.000000000 +0200 ++++ screen/socket.c 2012-08-09 01:01:29.000000000 +0200 +@@ -1067,7 +1067,9 @@ ReceiveMsg() + } + if (left > 0) + { +- if (left != sizeof(m)) ++ if (left == sizeof(struct msg) - sizeof(struct old_msg)) ++ ;/* old format message, ignore */ ++ else if (left != sizeof(m)) + Msg(0, "Message %d of %d bytes too small", left, (int)sizeof(m)); + else + debug("No data on socket.\n"); +Index: screen/attacher.c +=================================================================== +--- screen.orig/attacher.c 2012-08-09 01:01:28.000000000 +0200 ++++ screen/attacher.c 2012-08-09 01:32:08.000000000 +0200 +@@ -133,6 +133,48 @@ struct msg *m; + return 0; + } + ++int ++WriteOldMessage(struct msg *m) ++{ ++ sleep(1); /* give the server some time to reopen the pipe */ ++ if (m->type == MSG_ATTACH && (m->m.attach.detachfirst == MSG_ATTACH || ++ m->m.attach.detachfirst == MSG_DETACH || ++ m->m.attach.detachfirst == MSG_POW_DETACH)) ++ { ++ struct old_msg old_m; ++ int s; ++ int r, l = sizeof(old_m); ++ ++ s = MakeClientSocket(0); ++ if (s < 0) ++ return 0; ++ old_m.protocol_revision = (('m'<<24) | ('s'<<16) | ('g'<<8) | 0); ++ old_m.type = m->type; ++ memcpy(old_m.m_tty, m->m_tty, sizeof(old_m.m_tty)); ++ memcpy(old_m.m.attach.auser, m->m.attach.auser, sizeof(old_m.m.attach.auser)); ++ old_m.m.attach.apid = m->m.attach.apid; ++ old_m.m.attach.adaptflag = m->m.attach.adaptflag; ++ old_m.m.attach.lines = m->m.attach.lines; ++ old_m.m.attach.columns = m->m.attach.columns; ++ memcpy(old_m.m.attach.preselect, m->m.attach.preselect, sizeof(old_m.m.attach.preselect)); ++ old_m.m.attach.esc = m->m.attach.esc; ++ old_m.m.attach.meta_esc = m->m.attach.meta_esc; ++ memcpy(old_m.m.attach.envterm, m->m.attach.envterm, sizeof(old_m.m.attach.envterm)); ++ old_m.m.attach.encoding = m->m.attach.encoding; ++ while(l > 0) ++ { ++ r = write(s, (char *)&old_m + (sizeof(struct old_msg) - l), l); ++ if (r == -1 && errno == EINTR) ++ continue; ++ if (r == -1 || r == 0) ++ return -1; ++ l -= r; ++ } ++ close(s); ++ } ++ return 0; ++} ++ + + int + Attach(how) +@@ -397,6 +439,7 @@ int how; + if (WriteMessage(lasts, &m)) + Panic(errno, "WriteMessage"); + close(lasts); ++ WriteOldMessage(&m); + debug1("Attach(%d): sent\n", m.type); + #ifdef MULTIUSER + if (multi && (how == MSG_ATTACH || how == MSG_CONT)) diff -Nru screen-4.0.3/debian/patches/60-byobu-pointer.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/60-byobu-pointer.dpatch --- screen-4.0.3/debian/patches/60-byobu-pointer.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/60-byobu-pointer.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 60-byobu-pointer.dpatch by Dustin Kirkland -## DP: screen-profiles previously provided a diversion of /usr/bin/screen -## DP: to its own script. This is no longer the case, out of respect for -## DP: traditional screen users. However, screen-profiles and byobu users -## DP: will wonder what happened. This pointer in the help text is intended -## DP: to direct these users to the new binary name. - -@DPATCH@ ---- screen-4.0.3.orig/help.c -+++ screen-4.0.3/help.c -@@ -502,7 +502,9 @@ - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\ - \n\ - Send bugreports, fixes, enhancements, t-shirts, money, beer & pizza to \ --screen@uni-erlangen.de\n"; -+screen@uni-erlangen.de\n\ -+\n\ -+To use byobu (formerly screen-profiles), exit screen and run 'byobu'.\n"; - - - static void diff -Nru screen-4.0.3/debian/patches/61-silence_command_from_echo.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/61-silence_command_from_echo.dpatch --- screen-4.0.3/debian/patches/61-silence_command_from_echo.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/61-silence_command_from_echo.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 61-silence_command_from_echo.dpatch by Dustin Kirkland -## DP: print "command from..." when command is "echo" is unnecessary, annoying - -@DPATCH@ - ---- a/process.c 2004-09-03 15:15:33 +0000 -+++ b/process.c 2010-11-05 16:20:36 +0000 -@@ -1368,7 +1368,7 @@ - continue; - debug1("AT display %s\n", D_usertty); - DoCommand(args + 1, argl + 1); -- if (display) -+ if (display && strncmp(args[1], "echo", 4) != 0) - Msg(0, "command from %s: %s %s", - s, args[1], args[2] ? args[2] : ""); - display = NULL; -@@ -1397,7 +1397,7 @@ - continue; - debug1("AT display %s\n", D_usertty); - DoCommand(args + 1, argl + 1); -- if (display) -+ if (display && strncmp(args[1], "echo", 4) != 0) - Msg(0, "command from %s: %s %s", - s, args[1], args[2] ? args[2] : ""); - display = NULL; -@@ -1443,8 +1443,9 @@ - if (fore && fore->w_layer.l_cvlist) - { - display = fore->w_layer.l_cvlist->c_display; -- Msg(0, "command from %s: %s %s", -- s, args[1], args[2] ? args[2] : ""); -+ if (display && strncmp(args[1], "echo", 4) != 0) -+ Msg(0, "command from %s: %s %s", -+ s, args[1], args[2] ? args[2] : ""); - } - } - display = NULL; -@@ -1464,8 +1465,9 @@ - if (fore && fore->w_layer.l_cvlist) - { - display = fore->w_layer.l_cvlist->c_display; -- Msg(0, "command from %s: %s %s", -- s, args[1], args[2] ? args[2] : ""); -+ if (display && strncmp(args[1], "echo", 4) != 0) -+ Msg(0, "command from %s: %s %s", -+ s, args[1], args[2] ? args[2] : ""); - } - display = NULL; - fore = NULL; - diff -Nru screen-4.0.3/debian/patches/62-fix-term-length.dpatch screen-4.1.0~20120320gitdb59704/debian/patches/62-fix-term-length.dpatch --- screen-4.0.3/debian/patches/62-fix-term-length.dpatch 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/62-fix-term-length.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 62-fix-term-length.dpatch by Daniel Hahler -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: This patch is taken from the upstream bug tracker at -## DP: http://savannah.gnu.org/bugs/?30880#comment4 -## DP: Author: Dmitry V. Levin - -@DPATCH@ - ---- screen-4.0.3.orig/display.h -+++ screen-4.0.3/display.h -@@ -85,7 +85,7 @@ - struct win *d_fore; /* pointer to fore window */ - struct win *d_other; /* pointer to other window */ - int d_nonblock; /* -1 don't block if obufmax reached */ - /* >0: block after nonblock secs */ -- char d_termname[20 + 1]; /* $TERM */ -+ char d_termname[31 + 1]; /* $TERM */ - char *d_tentry; /* buffer for tgetstr */ - char d_tcinited; /* termcap inited flag */ ---- screen-4.0.3.orig/screen.h -+++ screen-4.0.3/screen.h -@@ -202,7 +202,7 @@ - char preselect[20]; - int esc; /* his new escape character unless -1 */ - int meta_esc; /* his new meta esc character unless -1 */ -- char envterm[20 + 1]; /* terminal type */ -+ char envterm[31 + 1]; /* terminal type */ - int encoding; /* encoding of display */ - } - attach; - char preselect[20]; - diff -Nru screen-4.0.3/debian/patches/80EXP_session_creation_time.patch screen-4.1.0~20120320gitdb59704/debian/patches/80EXP_session_creation_time.patch --- screen-4.0.3/debian/patches/80EXP_session_creation_time.patch 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/80EXP_session_creation_time.patch 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,329 @@ +Author: +Description: Add lookup code for the creation time of each session. Requires +digging in /proc/$pid and /proc/uptime, though, so it's definitely +no candidate for the Beautiful C contest. +Affects screen's behaviour in the following situations: +* 'screen -ls' lists available sessions sorted chronologically +* 'screen -RR' now picks the youngest session instead of an +arbitrary one +Index: screen/doc/screen.1 +=================================================================== +--- screen.orig/doc/screen.1 2012-03-20 22:41:13.000000000 +0100 ++++ screen/doc/screen.1 2012-03-20 22:41:52.000000000 +0100 +@@ -242,7 +242,7 @@ + .IR screen , + but prints a list of + .I pid.tty.host +-strings identifying your ++strings and creation timestamps identifying your + .I screen + sessions. + Sessions marked `detached' can be resumed with \*Qscreen \-r\*U. Those marked +@@ -340,7 +340,7 @@ + sessions in another user's directory. This requires setuid-root. + .TP 5 + .B \-R +-attempts to resume the first detached ++attempts to resume the youngest (in terms of creation time) detached + .I screen + session it finds. If successful, all other command-line options are ignored. + If no detached session exists, starts a new session using the specified +@@ -350,6 +350,8 @@ + .I screen + is run as a login-shell (actually screen uses \*Q\-xRR\*U in that case). + For combinations with the \fB\-d\fP/\fB\-D\fP option see there. ++.B Note: ++Time-based session selection is a Debian addition. + .TP 5 + .BI "\-s " program + sets the default shell to the program specified, instead of the value +Index: screen/doc/screen.texinfo +=================================================================== +--- screen.orig/doc/screen.texinfo 2012-03-20 22:41:10.000000000 +0100 ++++ screen/doc/screen.texinfo 2012-03-20 22:41:52.000000000 +0100 +@@ -318,7 +318,8 @@ + @itemx -list [@var{match}] + Do not start @code{screen}, but instead print a list of session + identification strings (usually of the form @var{pid.tty.host}; +-@pxref{Session Name}). Sessions marked @samp{detached} can be resumed ++@pxref{Session Name}) and the corresponding creation timestamps. ++Sessions marked @samp{detached} can be resumed + with @code{screen -r}. Those marked @samp{attached} are running and + have a controlling terminal. If the session runs in multiuser mode, + it is marked @samp{multi}. Sessions marked as @samp{unreachable} either +@@ -404,14 +405,15 @@ + sessions in another user's directory. This requires setuid-root. + + @item -R +-Resume the first appropriate detached @code{screen} session. If +-successful, all other command-line options are ignored. If no detached ++Resume the most-recently created appropriate detached @code{screen} session. ++If successful, all other command-line options are ignored. If no detached + session exists, start a new session using the specified options, just as + if @samp{-R} had not been specified. This option is set by default if + screen is run as a login-shell (actually screen uses @samp{-xRR} in + that case). + For combinations with the + @samp{-D}/@samp{-d} option see there. ++@samp{Note:} Time-based session selection is a Debian addition. + + @item -s @var{program} + Set the default shell to be @var{program}. By default, @code{screen} +Index: screen/extern.h +=================================================================== +--- screen.orig/extern.h 2012-03-20 22:41:13.000000000 +0100 ++++ screen/extern.h 2012-03-20 22:41:52.000000000 +0100 +@@ -390,6 +390,8 @@ + #else + extern int xsnprintf __P(()); + #endif ++extern time_t SessionCreationTime __P((const char *)); ++extern time_t GetUptime __P((void)); + + + /* acl.c */ +Index: screen/misc.c +=================================================================== +--- screen.orig/misc.c 2012-03-20 22:14:48.000000000 +0100 ++++ screen/misc.c 2012-03-20 22:41:52.000000000 +0100 +@@ -29,6 +29,7 @@ + #include + #include /* mkdir() declaration */ + #include ++#include + + #include "config.h" + #include "screen.h" +@@ -769,3 +770,40 @@ + } + + #endif ++ ++time_t SessionCreationTime(const char *fifo) { ++ char ppath[20]; ++ int pfd; ++ char pdata[512]; ++ char *jiffies; ++ ++ int pid = atoi(fifo); ++ if (pid <= 0) return 0; ++ sprintf(ppath, "/proc/%u/stat", pid); ++ pfd = open(ppath, O_RDONLY); ++ if (pfd < 0) return 0; ++ while (1) { ++ int R=0, RR; ++ RR = read(pfd, pdata + R, 512-R); ++ if (RR < 0) {close(pfd); return 0;} ++ else if (RR == 0) break; ++ } ++ close(pfd); ++ ++ for (pfd=21, jiffies=pdata; pfd; --pfd) { ++ jiffies = strchr(jiffies, ' '); ++ if (!jiffies) break; else ++jiffies; ++ } ++ if (!jiffies) return 0; ++ ++ return atol(jiffies) / 100; ++} ++ ++time_t GetUptime(void) { ++ char uptimestr[32]; ++ int fd = open("/proc/uptime", O_RDONLY); ++ if (fd < 0) return 0; ++ (void)read(fd, uptimestr, 32); ++ close(fd); ++ return atol(uptimestr); ++} +Index: screen/socket.c +=================================================================== +--- screen.orig/socket.c 2012-03-20 22:41:12.000000000 +0100 ++++ screen/socket.c 2012-03-20 22:41:52.000000000 +0100 +@@ -125,16 +125,18 @@ + int sdirlen; + int matchlen = 0; + char *name, *n; +- int firsts = -1, sockfd; +- char *firstn = NULL; ++ int sockfd = -1; + int nfound = 0, ngood = 0, ndead = 0, nwipe = 0, npriv = 0; + int nperfect = 0; ++ time_t sysboot = time(NULL) - GetUptime(); + struct sent + { + struct sent *next; + int mode; + char *name; +- } *slist, **slisttail, *sent, *nsent; ++ time_t created; ++ int good; ++ } *slist, **slisttail, *sent, *nsent, *schosen = NULL; + + if (match) + { +@@ -161,7 +163,6 @@ + Panic(errno, "Cannot opendir %s", SockPath); + + slist = 0; +- slisttail = &slist; + while ((dp = readdir(dirp))) + { + int cmatch = 0; +@@ -173,7 +174,7 @@ + { + n = name; + /* if we don't want to match digits. Skip them */ +- if ((*match <= '0' || *match > '9') && (*n > '0' && *n <= '9')) ++ if ((*match < '0' || *match > '9') && (*n >= '0' && *n <= '9')) + { + while (*n >= '0' && *n <= '9') + n++; +@@ -252,12 +253,24 @@ + debug(" store it.\n"); + if ((sent = (struct sent *)malloc(sizeof(struct sent))) == 0) + continue; +- sent->next = 0; + sent->name = SaveStr(name); + sent->mode = mode; ++ sent->created = sysboot + SessionCreationTime(name); ++ sent->good = 0; ++ ++ for (slisttail = &slist; *slisttail; slisttail = &((*slisttail)->next)) ++ { ++ if ((*slisttail)->created < sent->created) break; ++ } ++ ++ sent->next = *slisttail; + *slisttail = sent; +- slisttail = &sent->next; + nfound++; ++ if (sockfd >= 0) ++ { ++ close(sockfd); ++ sockfd = -1; ++ } + sockfd = MakeClientSocket(0); + #ifdef USE_SETEUID + /* MakeClientSocket sets ids back to eff */ +@@ -316,6 +329,7 @@ + (!dflag && !rflag && !xflag)) + { + close(sockfd); ++ sockfd = -1; + debug(" no!\n"); + npriv++; /* a good socket that was not for us */ + continue; +@@ -323,19 +337,8 @@ + ngood++; + if (cmatch) + nperfect++; +- if (fdp && (firsts == -1 || (cmatch && nperfect == 1))) +- { +- if (firsts != -1) +- close(firsts); +- firsts = sockfd; +- firstn = sent->name; +- debug(" taken.\n"); +- } +- else +- { +- debug(" discarded.\n"); +- close(sockfd); +- } ++ sent->good = 1; ++ debug(" added to list.\n"); + } + (void)closedir(dirp); + if (!lsflag && nperfect == 1) +@@ -356,34 +359,42 @@ + } + for (sent = slist; sent; sent = sent->next) + { ++ char timestr[64]; ++ if (sent->created == 0) ++ { ++ sprintf(timestr, "???"); ++ } else { ++ strftime(timestr, 64, "%x %X", localtime(&sent->created)); ++ } ++ printf("\t%s\t(%s)", sent->name, timestr); + switch (sent->mode) + { + case 0700: +- printf("\t%s\t(Attached)\n", sent->name); ++ printf("\t(Attached)\n"); + break; + case 0600: +- printf("\t%s\t(Detached)\n", sent->name); ++ printf("\t(Detached)\n"); + break; + #ifdef MULTIUSER + case 0701: +- printf("\t%s\t(Multi, attached)\n", sent->name); ++ printf("\t(Multi, attached)\n"); + break; + case 0601: +- printf("\t%s\t(Multi, detached)\n", sent->name); ++ printf("\t(Multi, detached)\n"); + break; + #endif + case -1: + /* No trigraphs here! */ +- printf("\t%s\t(Dead ?%c?)\n", sent->name, '?'); ++ printf("\t(Dead ?%c?)\n", '?'); + break; + case -2: +- printf("\t%s\t(Removed)\n", sent->name); ++ printf("\t(Removed)\n"); + break; + case -3: +- printf("\t%s\t(Remote or dead)\n", sent->name); ++ printf("\t(Remote or dead)\n"); + break; + case -4: +- printf("\t%s\t(Private)\n", sent->name); ++ printf("\t(Private)\n"); + break; + } + } +@@ -396,13 +407,37 @@ + else + Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */ + } +- if (firsts != -1) ++ for (sent = slist; sent; sent = sent->next) + { +- sprintf(SockPath + sdirlen, "/%s", firstn); +- *fdp = firsts; ++ if (sent->good) ++ { ++ schosen = sent; ++ break; ++ } ++ } ++ if (schosen && fdp) ++ { ++ if (sockfd >= 0 && !strcmp(SockPath + sdirlen + 1, schosen->name)) ++ { ++ *fdp = sockfd; ++ sockfd = -1; ++ } ++ else ++ { ++ sprintf(SockPath + sdirlen, "/%s", schosen->name); ++ *fdp = MakeClientSocket(0); ++#ifdef USE_SETEUID ++ xseteuid(real_uid); ++ xsetegid(real_gid); ++#endif ++ } + } + else + SockPath[sdirlen] = 0; ++ if (sockfd >= 0) ++ { ++ close(sockfd); ++ } + for (sent = slist; sent; sent = nsent) + { + nsent = sent->next; diff -Nru screen-4.0.3/debian/patches/series screen-4.1.0~20120320gitdb59704/debian/patches/series --- screen-4.0.3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/patches/series 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1,31 @@ +# 01-08: fixes to configure, altering preprocessor macros etc. +01configure_fix_alpha_vsprintf.patch +03-fix-terminal-handling-on-kfreebsd.patch +05fix_osdef_include.patch +06-fix-parallel-build.patch +# 10-79: "regular" code and documentation fixes +10norootpassword.patch +11replace_doc_paths.patch +12kfreebsd_ctty.patch +13split_info_files.patch +14size_matters.patch +16fix_gcc_warnings.patch +22exchange_file_mode.patch +23exitcode_q_ls.patch +24option_parser.patch +26source_encoding.patch +32misc_minor_fixes.patch +45suppress_remap.patch +46fix-keybinding-typo-in-manpage.patch +47screen-cc.patch +48screen-ipv6.patch +49long-usernames.patch +50increase-max-TERM-length.patch +51fix-utf8-status-padding-bug.patch +#52fix_screen_utf8_nfd.patch +53fix-startup-race-condition.patch +58-show-encoding-hardstatus.patch +59-fix-manpage-warnings.patch +60-644788-screen-4.1.0-4.0.3-interoperability.patch +# 80-99: experimental patches, new features etc. +80EXP_session_creation_time.patch diff -Nru screen-4.0.3/debian/postinst screen-4.1.0~20120320gitdb59704/debian/postinst --- screen-4.0.3/debian/postinst 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/postinst 2012-09-16 10:43:08.000000000 +0000 @@ -1,6 +1,8 @@ #!/bin/sh set -e +. /usr/share/debconf/confmodule + if [ "$1" = configure ]; then if ! test -d /var/run/screen; then install -g utmp -m 0775 -d /var/run/screen diff -Nru screen-4.0.3/debian/rules screen-4.1.0~20120320gitdb59704/debian/rules --- screen-4.0.3/debian/rules 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/rules 2012-09-16 10:43:08.000000000 +0000 @@ -7,32 +7,34 @@ # Uncomment me to turn on debugging #export DH_VERBOSE=1 -include /usr/share/dpatch/dpatch.make - package := screen ROOT := $(CURDIR)/debian/$(package) # statically define this... sucko TTYGROUP := 5 +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + ifeq ($(findstring noopt,$(DEB_BUILD_OPTIONS)),noopt) CC_OPTFLAGS := -O0 -g3 else CC_OPTFLAGS := -O2 -g endif -clean: unpatch +clean: dh_testdir dh_testroot - rm -f configure-stamp build-stamp install-stamp test ! -s doc/Makefile || $(MAKE) -C doc realclean test ! -s Makefile || ! grep -q clean Makefile || $(MAKE) realclean - rm -f config.log config.status Makefile - dh_clean + dh_autoreconf_clean + dh_clean config.log config.status Makefile configure: configure-stamp -configure-stamp: patch-stamp +configure-stamp: dh_testdir + dh_autoreconf ./configure --prefix=/usr \ + $(shell dpkg-buildflags --export=configure) \ --infodir='$$(prefix)/share/info' \ --mandir='$$(prefix)/share/man' \ --with-socket-dir=/var/run/screen \ @@ -41,12 +43,17 @@ --with-pty-group=${TTYGROUP} \ --enable-rxvt_osc \ --with-sys-screenrc=/etc/screenrc \ - --enable-colors256 + --enable-colors256 \ + --enable-telnet \ + --enable-use-locale + # Assert the use of fifos instead of sockets grep -q "define.*NAMEDPIPE.*1" config.h || echo "#define NAMEDPIPE 1" >> config.h touch $@ -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp build-stamp: configure-stamp dh_testdir $(MAKE) CFLAGS+='$(CC_OPTFLAGS) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' @@ -70,9 +77,6 @@ # make it setgid utmp chown root:utmp $(ROOT)/usr/bin/screen chmod 2755 $(ROOT)/usr/bin/screen - # lintian overrides for the setgid bin etc - install -m 755 -d $(ROOT)/usr/share/lintian/overrides - install -m 644 debian/screen.lintian.overrides $(ROOT)/usr/share/lintian/overrides/screen touch $@ binary: binary-arch @@ -85,8 +89,10 @@ dh_installexamples dh_installman || true dh_installinfo + dh_installdebconf dh_installchangelogs -k patchlevel.h dh_installinit --no-start --init-script='screen-cleanup' --update-rcd-params='start 70 S .' + dh_lintian dh_strip dh_compress dh_fixperms -X/usr/bin/screen @@ -96,4 +102,4 @@ dh_md5sums dh_builddeb -.PHONY: patch configure build clean binary-indep binary-arch binary install +.PHONY: configure build clean binary-indep binary-arch binary install diff -Nru screen-4.0.3/debian/screen-cleanup.upstart screen-4.1.0~20120320gitdb59704/debian/screen-cleanup.upstart --- screen-4.0.3/debian/screen-cleanup.upstart 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/screen-cleanup.upstart 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -# screen - -description "GNU Screen Cleanup" -author "Dustin Kirkland " - -start on filesystem - -task - -script - SCREENDIR=/var/run/screen - if [ -L $SCREENDIR ] || [ ! -d $SCREENDIR ]; then - rm -f $SCREENDIR - mkdir $SCREENDIR - chown root:utmp $SCREENDIR - fi - find $SCREENDIR -type p -delete - # If the local admin has used dpkg-statoverride to install the screen - # binary with different set[ug]id bits, change the permissions of - # $SCREENDIR accordingly - BINARYPERM=`stat -c%a /usr/bin/screen` - if [ "$BINARYPERM" -ge 4000 ]; then - chmod 0755 $SCREENDIR - elif [ "$BINARYPERM" -ge 2000 ]; then - chmod 0775 $SCREENDIR - else - chmod 0777 $SCREENDIR - fi -end script diff -Nru screen-4.0.3/debian/screen.lintian.overrides screen-4.1.0~20120320gitdb59704/debian/screen.lintian.overrides --- screen-4.0.3/debian/screen.lintian.overrides 2013-02-27 12:12:50.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/screen.lintian.overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -screen: setgid-binary usr/bin/screen 2755 root/utmp diff -Nru screen-4.0.3/debian/source/format screen-4.1.0~20120320gitdb59704/debian/source/format --- screen-4.0.3/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/source/format 2013-02-27 12:12:50.516466147 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru screen-4.0.3/debian/source/options screen-4.1.0~20120320gitdb59704/debian/source/options --- screen-4.0.3/debian/source/options 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/debian/source/options 2012-09-16 10:43:08.000000000 +0000 @@ -0,0 +1 @@ +extend-diff-ignore=config\.h\.in diff -Nru screen-4.0.3/display.c screen-4.1.0~20120320gitdb59704/display.c --- screen-4.0.3/display.c 2003-12-05 13:45:41.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/display.c 2012-02-20 01:01:57.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,9 +19,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** */ @@ -32,12 +37,12 @@ #include "screen.h" #include "extern.h" #include "braille.h" +#include "canvas.h" static int CountChars __P((int)); static int DoAddChar __P((int)); static int BlankResize __P((int, int)); static int CallRewrite __P((int, int, int, int)); -static void FreeCanvas __P((struct canvas *)); static void disp_readev_fn __P((struct event *, char *)); static void disp_writeev_fn __P((struct event *, char *)); #ifdef linux @@ -46,7 +51,6 @@ static void disp_status_fn __P((struct event *, char *)); static void disp_hstatus_fn __P((struct event *, char *)); static void disp_blocked_fn __P((struct event *, char *)); -static void cv_winid_fn __P((struct event *, char *)); #ifdef MAPKEYS static void disp_map_fn __P((struct event *, char *)); #endif @@ -60,6 +64,7 @@ #ifdef COLOR static void SetBackColor __P((int)); #endif +static void RemoveStatusMinWait __P((void)); extern struct layer *flayer; @@ -115,12 +120,15 @@ */ int defobuflimit = OBUF_MAX; int defnonblock = -1; +int defmousetrack = 0; #ifdef AUTO_NUKE int defautonuke = 0; #endif int captionalways; int hardstatusemu = HSTATUS_IGNORE; +int focusminwidth, focusminheight; + /* * Default layer management */ @@ -191,7 +199,8 @@ DefClearLine, DefRewrite, BlankResize, - DefRestore + DefRestore, + 0 }; /*ARGSUSED*/ @@ -304,6 +313,7 @@ D_termname[sizeof(D_termname) - 1] = 0; D_user = *u; D_processinput = ProcessInput; + D_mousetrack = defmousetrack; return display; } @@ -312,7 +322,6 @@ FreeDisplay() { struct win *p; - struct canvas *cv, *cvp; #ifdef MULTI struct display *d, **dp; #endif @@ -325,7 +334,7 @@ #endif if (D_userfd >= 0) { - Flush(); + Flush(3); if (!display) return; SetTTY(D_userfd, &D_OldMode); @@ -379,15 +388,16 @@ if (D_obuf) free(D_obuf); *dp = display->d_next; - cv = display->d_cvlist; #else /* MULTI */ ASSERT(display == displays); ASSERT(display == &TheDisplay); - cv = display->d_cvlist; - display->d_cvlist = 0; displays = 0; #endif /* MULTI */ + while (D_canvas.c_slperp) + FreeCanvas(D_canvas.c_slperp); + D_cvlist = 0; + for (p = windows; p; p = p->w_next) { if (p->w_pdisplay == display) @@ -397,320 +407,22 @@ if (p->w_readev.condneg == &D_status || p->w_readev.condneg == &D_obuflenmax) p->w_readev.condpos = p->w_readev.condneg = 0; } - for (; cv; cv = cvp) - { - cvp = cv->c_next; - FreeCanvas(cv); - } #ifdef ZMODEM for (p = windows; p; p = p->w_next) if (p->w_zdisplay == display) zmodem_abort(p, 0); #endif + if (D_mousetrack) + { + D_mousetrack = 0; + MouseMode(0); + } #ifdef MULTI free((char *)display); #endif display = 0; } -int -MakeDefaultCanvas() -{ - struct canvas *cv; - - ASSERT(display); - if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) - return -1; - cv->c_xs = 0; - cv->c_xe = D_width - 1; - cv->c_ys = 0; - cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; - cv->c_xoff = 0; - cv->c_yoff = 0; - cv->c_next = 0; - cv->c_display = display; - cv->c_vplist = 0; - cv->c_captev.type = EV_TIMEOUT; - cv->c_captev.data = (char *)cv; - cv->c_captev.handler = cv_winid_fn; - - cv->c_blank.l_cvlist = cv; - cv->c_blank.l_width = cv->c_xe - cv->c_xs + 1; - cv->c_blank.l_height = cv->c_ye - cv->c_ys + 1; - cv->c_blank.l_x = cv->c_blank.l_y = 0; - cv->c_blank.l_layfn = &BlankLf; - cv->c_blank.l_data = 0; - cv->c_blank.l_next = 0; - cv->c_blank.l_bottom = &cv->c_blank; - cv->c_blank.l_blocking = 0; - cv->c_layer = &cv->c_blank; - cv->c_lnext = 0; - - D_cvlist = cv; - RethinkDisplayViewports(); - D_forecv = cv; /* default input focus */ - return 0; -} - -static void -FreeCanvas(cv) -struct canvas *cv; -{ - struct viewport *vp, *nvp; - struct win *p; - - p = Layer2Window(cv->c_layer); - SetCanvasWindow(cv, 0); - if (p) - WindowChanged(p, 'u'); - if (flayer == cv->c_layer) - flayer = 0; - for (vp = cv->c_vplist; vp; vp = nvp) - { - vp->v_canvas = 0; - nvp = vp->v_next; - vp->v_next = 0; - free(vp); - } - evdeq(&cv->c_captev); - free(cv); -} - -int -AddCanvas() -{ - int hh, h, i, j; - struct canvas *cv, **cvpp; - - for (cv = D_cvlist, j = 0; cv; cv = cv->c_next) - j++; - j++; /* new canvas */ - h = D_height - (D_has_hstatus == HSTATUS_LASTLINE); - if (h / j <= 1) - return -1; - - for (cv = D_cvlist; cv; cv = cv->c_next) - if (cv == D_forecv) - break; - ASSERT(cv); - cvpp = &cv->c_next; - - if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) - return -1; - - cv->c_xs = 0; - cv->c_xe = D_width - 1; - cv->c_ys = 0; - cv->c_ye = D_height - 1; - cv->c_xoff = 0; - cv->c_yoff = 0; - cv->c_display = display; - cv->c_vplist = 0; - cv->c_captev.type = EV_TIMEOUT; - cv->c_captev.data = (char *)cv; - cv->c_captev.handler = cv_winid_fn; - - cv->c_blank.l_cvlist = cv; - cv->c_blank.l_width = cv->c_xe - cv->c_xs + 1; - cv->c_blank.l_height = cv->c_ye - cv->c_ys + 1; - cv->c_blank.l_x = cv->c_blank.l_y = 0; - cv->c_blank.l_layfn = &BlankLf; - cv->c_blank.l_data = 0; - cv->c_blank.l_next = 0; - cv->c_blank.l_bottom = &cv->c_blank; - cv->c_blank.l_blocking = 0; - cv->c_layer = &cv->c_blank; - cv->c_lnext = 0; - - cv->c_next = *cvpp; - *cvpp = cv; - - i = 0; - for (cv = D_cvlist; cv; cv = cv->c_next) - { - hh = h / j-- - 1; - cv->c_ys = i; - cv->c_ye = i + hh - 1; - cv->c_yoff = i; - i += hh + 1; - h -= hh + 1; - } - - RethinkDisplayViewports(); - ResizeLayersToCanvases(); - return 0; -} - -void -RemCanvas() -{ - int hh, h, i, j; - struct canvas *cv, **cvpp; - int did = 0; - - h = D_height - (D_has_hstatus == HSTATUS_LASTLINE); - for (cv = D_cvlist, j = 0; cv; cv = cv->c_next) - j++; - if (j == 1) - return; - i = 0; - j--; - for (cvpp = &D_cvlist; (cv = *cvpp); cvpp = &cv->c_next) - { - if (cv == D_forecv && !did) - { - *cvpp = cv->c_next; - FreeCanvas(cv); - cv = *cvpp; - D_forecv = cv ? cv : D_cvlist; - D_fore = Layer2Window(D_forecv->c_layer); - flayer = D_forecv->c_layer; - if (cv == 0) - break; - did = 1; - } - hh = h / j-- - 1; - if (!captionalways && i == 0 && j == 0) - hh++; - cv->c_ys = i; - cv->c_ye = i + hh - 1; - cv->c_yoff = i; - i += hh + 1; - h -= hh + 1; - } - RethinkDisplayViewports(); - ResizeLayersToCanvases(); -} - -void -OneCanvas() -{ - struct canvas *mycv = D_forecv; - struct canvas *cv, **cvpp; - - for (cvpp = &D_cvlist; (cv = *cvpp);) - { - if (cv == mycv) - { - cv->c_ys = 0; - cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; - cv->c_yoff = 0; - cvpp = &cv->c_next; - } - else - { - *cvpp = cv->c_next; - FreeCanvas(cv); - } - } - RethinkDisplayViewports(); - ResizeLayersToCanvases(); -} - -int -RethinkDisplayViewports() -{ - struct canvas *cv; - struct viewport *vp, *vpn; - - /* free old viewports */ - for (cv = display->d_cvlist; cv; cv = cv->c_next) - { - for (vp = cv->c_vplist; vp; vp = vpn) - { - vp->v_canvas = 0; - vpn = vp->v_next; - bzero((char *)vp, sizeof(*vp)); - free(vp); - } - cv->c_vplist = 0; - } - display->d_vpxmin = -1; - display->d_vpxmax = -1; - - for (cv = display->d_cvlist; cv; cv = cv->c_next) - { - if ((vp = (struct viewport *)malloc(sizeof *vp)) == 0) - return -1; -#ifdef HOLE - vp->v_canvas = cv; - vp->v_xs = cv->c_xs; - vp->v_ys = (cv->c_ys + cv->c_ye) / 2; - vp->v_xe = cv->c_xe; - vp->v_ye = cv->c_ye; - vp->v_xoff = cv->c_xoff; - vp->v_yoff = cv->c_yoff; - vp->v_next = cv->c_vplist; - cv->c_vplist = vp; - - if ((vp = (struct viewport *)malloc(sizeof *vp)) == 0) - return -1; - vp->v_canvas = cv; - vp->v_xs = (cv->c_xs + cv->c_xe) / 2; - vp->v_ys = (3 * cv->c_ys + cv->c_ye) / 4; - vp->v_xe = cv->c_xe; - vp->v_ye = (cv->c_ys + cv->c_ye) / 2 - 1; - vp->v_xoff = cv->c_xoff; - vp->v_yoff = cv->c_yoff; - vp->v_next = cv->c_vplist; - cv->c_vplist = vp; - - if ((vp = (struct viewport *)malloc(sizeof *vp)) == 0) - return -1; - vp->v_canvas = cv; - vp->v_xs = cv->c_xs; - vp->v_ys = (3 * cv->c_ys + cv->c_ye) / 4; - vp->v_xe = (3 * cv->c_xs + cv->c_xe) / 4 - 1; - vp->v_ye = (cv->c_ys + cv->c_ye) / 2 - 1; - vp->v_xoff = cv->c_xoff; - vp->v_yoff = cv->c_yoff; - vp->v_next = cv->c_vplist; - cv->c_vplist = vp; - - if ((vp = (struct viewport *)malloc(sizeof *vp)) == 0) - return -1; - vp->v_canvas = cv; - vp->v_xs = cv->c_xs; - vp->v_ys = cv->c_ys; - vp->v_xe = cv->c_xe; - vp->v_ye = (3 * cv->c_ys + cv->c_ye) / 4 - 1; - vp->v_xoff = cv->c_xoff; - vp->v_yoff = cv->c_yoff; - vp->v_next = cv->c_vplist; - cv->c_vplist = vp; -#else - vp->v_canvas = cv; - vp->v_xs = cv->c_xs; - vp->v_ys = cv->c_ys; - vp->v_xe = cv->c_xe; - vp->v_ye = cv->c_ye; - vp->v_xoff = cv->c_xoff; - vp->v_yoff = cv->c_yoff; - vp->v_next = cv->c_vplist; - cv->c_vplist = vp; -#endif - - if (cv->c_xs < display->d_vpxmin || display->d_vpxmin == -1) - display->d_vpxmin = cv->c_xs; - if (cv->c_xe > display->d_vpxmax || display->d_vpxmax == -1) - display->d_vpxmax = cv->c_xe; - } - return 0; -} - -void -RethinkViewportOffsets(cv) -struct canvas *cv; -{ - struct viewport *vp; - - for (vp = cv->c_vplist; vp; vp = vp->v_next) - { - vp->v_xoff = cv->c_xoff; - vp->v_yoff = cv->c_yoff; - } -} - /* * if the adaptflag is on, we keep the size of this display, else * we may try to restore our old window sizes. @@ -722,8 +434,8 @@ ASSERT(display); ASSERT(D_tcinited); D_top = D_bot = -1; - AddCStr(D_TI); AddCStr(D_IS); + AddCStr(D_TI); /* Check for toggle */ if (D_IM && strcmp(D_IM, D_EI)) AddCStr(D_EI); @@ -749,7 +461,7 @@ ResizeDisplay(D_defwidth, D_defheight); ChangeScrollRegion(0, D_height - 1); D_x = D_y = 0; - Flush(); + Flush(3); ClearAll(); debug1("we %swant to adapt all our windows to the display\n", (adapt) ? "" : "don't "); @@ -772,6 +484,8 @@ KeypadMode(0); CursorkeysMode(0); CursorVisibility(0); + if (D_mousetrack) + D_mousetrack = 0; MouseMode(0); SetRendition(&mchar_null); SetFlow(FLOW_NOW); @@ -790,7 +504,7 @@ AddChar('\n'); AddCStr(D_TE); } - Flush(); + Flush(3); } @@ -903,7 +617,15 @@ AddCStr(D_CE0); goto addedutf8; } - AddUtf8(c); + if (c < 0x80) + { + if (D_xtable && D_xtable[(int)(unsigned char)D_rend.font] && D_xtable[(int)(unsigned char)D_rend.font][(int)(unsigned char)c]) + AddStr(D_xtable[(int)(unsigned char)D_rend.font][(int)(unsigned char)c]); + else + AddChar(c); + } + else + AddUtf8(c); goto addedutf8; } # endif @@ -1089,7 +811,13 @@ MouseMode(mode) int mode; { - if (display && D_mouse != mode) + if (!display) + return; + + if (mode < D_mousetrack) + mode = D_mousetrack; + + if (D_mouse != mode) { char mousebuf[20]; if (!D_CXT) @@ -2102,6 +1830,7 @@ { if (!display) return; +#ifdef COLOR if (nattr2color && D_hascolor && (mc->attr & nattr2color) != 0) { static struct mchar mmc; @@ -2122,6 +1851,7 @@ mc = &mmc; debug2("SetRendition: mapped to %02x %02x\n", (unsigned char)mc->attr, 0x99 - (unsigned char)mc->color); } +# ifdef COLORS16 if (D_hascolor && D_CC8 && (mc->attr & (A_BFG|A_BBG))) { int a = mc->attr; @@ -2132,8 +1862,12 @@ if (D_rend.attr != a) SetAttr(a); } - else if (D_rend.attr != mc->attr) + else +# endif /* COLORS16 */ +#endif /* COLOR */ + if (D_rend.attr != mc->attr) SetAttr(mc->attr); + #ifdef COLOR if (D_rend.color != mc->color # ifdef COLORS256 @@ -2158,6 +1892,7 @@ { if (!display) return; +#ifdef COLOR if (nattr2color && D_hascolor && (ml->attr[x] & nattr2color) != 0) { struct mchar mc; @@ -2165,6 +1900,7 @@ SetRendition(&mc); return; } +# ifdef COLORS16 if (D_hascolor && D_CC8 && (ml->attr[x] & (A_BFG|A_BBG))) { int a = ml->attr[x]; @@ -2175,7 +1911,10 @@ if (D_rend.attr != a) SetAttr(a); } - else if (D_rend.attr != ml->attr[x]) + else +# endif /* COLORS16 */ +#endif /* COLOR */ + if (D_rend.attr != ml->attr[x]) SetAttr(ml->attr[x]); #ifdef COLOR if (D_rend.color != ml->color[x] @@ -2217,7 +1956,7 @@ return; /* XXX: better */ AddStr(msg); AddStr("\r\n"); - Flush(); + Flush(0); return; } if (!use_hardstatus || !D_HS) @@ -2234,19 +1973,11 @@ if (strcmp(msg, D_status_lastmsg) == 0) { debug("same message - increase timeout"); - SetTimeout(&D_statusev, MsgWait); + if (!D_status_obufpos) + SetTimeout(&D_statusev, MsgWait); return; } - if (!D_status_bell) - { - struct timeval now; - int ti; - gettimeofday(&now, NULL); - ti = (now.tv_sec - D_status_time.tv_sec) * 1000 + (now.tv_usec - D_status_time.tv_usec) / 1000; - if (ti < MsgMinWait) - DisplaySleep1000(MsgMinWait - ti, 0); - } - RemoveStatus(); + RemoveStatusMinWait(); } for (s = t = msg; *s && t - msg < max; ++s) if (*s == BELL) @@ -2303,15 +2034,15 @@ D_status = STATUS_ON_HS; ShowHStatus(msg); } - Flush(); - if (!display) - return; + + D_status_obufpos = D_obufp - D_obuf; + ASSERT(D_status_obufpos > 0); + if (D_status == STATUS_ON_WIN) { struct display *olddisplay = display; struct layer *oldflayer = flayer; - ASSERT(D_obuffree == D_obuflen); /* this is copied over from RemoveStatus() */ D_status = 0; GotoPos(0, STATLINE); @@ -2322,17 +2053,8 @@ LaySetCursor(); display = olddisplay; flayer = oldflayer; - D_status_obuflen = D_obuflen; - D_status_obuffree = D_obuffree; - D_obuffree = D_obuflen = 0; D_status = STATUS_ON_WIN; } - gettimeofday(&D_status_time, NULL); - SetTimeout(&D_statusev, MsgWait); - evenq(&D_statusev); -#ifdef HAVE_BRAILLE - RefreshBraille(); /* let user see multiple Msg()s */ -#endif } void @@ -2346,28 +2068,28 @@ return; if (!(where = D_status)) return; - + debug("RemoveStatus\n"); if (D_status_obuffree >= 0) { D_obuflen = D_status_obuflen; D_obuffree = D_status_obuffree; D_status_obuffree = -1; - D_status = 0; - D_status_bell = 0; - evdeq(&D_statusev); - return; } D_status = 0; + D_status_obufpos = 0; D_status_bell = 0; evdeq(&D_statusev); olddisplay = display; oldflayer = flayer; if (where == STATUS_ON_WIN) { - GotoPos(0, STATLINE); - RefreshLine(STATLINE, 0, D_status_len - 1, 0); - GotoPos(D_status_lastx, D_status_lasty); + if (captionalways || (D_canvas.c_slperp && D_canvas.c_slperp->c_slnext)) + { + GotoPos(0, STATLINE); + RefreshLine(STATLINE, 0, D_status_len - 1, 0); + GotoPos(D_status_lastx, D_status_lasty); + } } else RefreshHStatus(); @@ -2378,12 +2100,91 @@ flayer = oldflayer; } +/* Remove the status but make sure that it is seen for MsgMinWait ms */ +static void +RemoveStatusMinWait() +{ + /* XXX: should flush output first if D_status_obufpos is set */ + if (!D_status_bell && !D_status_obufpos) + { + struct timeval now; + int ti; + gettimeofday(&now, NULL); + ti = (now.tv_sec - D_status_time.tv_sec) * 1000 + (now.tv_usec - D_status_time.tv_usec) / 1000; + if (ti < MsgMinWait) + DisplaySleep1000(MsgMinWait - ti, 0); + } + RemoveStatus(); +} + +#ifdef UTF8 +static int +strlen_onscreen(unsigned char *c, unsigned char *end) +{ + int len = 0; + while (*c && (!end || c < end)) + { + int v, dec = 0; + do + { + v = FromUtf8(*c++, &dec); + if (v == -2) + c--; + } + while (v < 0 && (!end || c < end)); + if (!utf8_iscomb(v)) + { + if (utf8_isdouble(v)) + len++; + len++; + } + } + + return len; +} + +static int +PrePutWinMsg(s, start, max) +char *s; +int start, max; +{ + /* Avoid double-encoding problem for a UTF-8 message on a UTF-8 locale. + Ideally, this would not be necessary. But fixing it the Right Way will + probably take way more time. So this will have to do for now. */ + if (D_encoding == UTF8) + { + int chars = strlen_onscreen((unsigned char *)(s + start), (unsigned char *)(s + max)); + D_encoding = 0; + PutWinMsg(s, start, max); + D_encoding = UTF8; + D_x -= (max - chars); /* Yak! But this is necessary to count for + the fact that not every byte represents a + character. */ + return start + chars; + } + else + { + PutWinMsg(s, start, max); + return max; + } +} +#else +static int +PrePutWinMsg(s, start, max) +char *s; +int start, max; +{ + PutWinMsg(s, start, max); + return max; +} +#endif + /* refresh the display's hstatus line */ void ShowHStatus(str) char *str; { - int l, i, ox, oy, max; + int l, ox, oy, max; if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE == D_height-1) return; /* sorry, in use */ @@ -2422,9 +2223,7 @@ l = D_width; GotoPos(0, D_height - 1); SetRendition(captionalways || D_cvlist == 0 || D_cvlist->c_next ? &mchar_null: &mchar_so); - if (!PutWinMsg(str, 0, l)) - for (i = 0; i < l; i++) - PUTCHARLP(str[i]); + l = PrePutWinMsg(str, 0, l); if (!captionalways && D_cvlist && !D_cvlist->c_next) while (l++ < D_width) PUTCHARLP(' '); @@ -2510,7 +2309,7 @@ struct viewport *vp, *lvp; struct canvas *cv, *lcv, *cvlist, *cvlnext; struct layer *oldflayer; - int xx, yy; + int xx, yy, l; char *buf; struct win *p; @@ -2520,9 +2319,13 @@ debug2(" %d %d\n", to, isblank); if (D_status == STATUS_ON_WIN && y == STATLINE) - return; /* can't refresh status */ + { + if (to >= D_status_len) + D_status_len = to + 1; + return; /* can't refresh status */ + } - if (isblank == 0 && D_CE && to == D_width - 1 && from < to) + if (isblank == 0 && D_CE && to == D_width - 1 && from < to && D_status != STATUS_ON_HS) { GotoPos(from, y); if (D_UT || D_BE) @@ -2530,12 +2333,45 @@ AddCStr(D_CE); isblank = 1; } + + if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) + { + RefreshHStatus(); + return; + } + while (from <= to) { lcv = 0; lvp = 0; for (cv = display->d_cvlist; cv; cv = cv->c_next) { + if (y == cv->c_ye + 1 && from >= cv->c_xs && from <= cv->c_xe) + { + p = Layer2Window(cv->c_layer); + buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP), &cv->c_captev, 0); + if (cv->c_captev.timeout.tv_sec) + evenq(&cv->c_captev); + xx = to > cv->c_xe ? cv->c_xe : to; + l = strlen(buf); + GotoPos(from, y); + SetRendition(&mchar_so); + if (l > xx - cv->c_xs + 1) + l = xx - cv->c_xs + 1; + l = PrePutWinMsg(buf, from - cv->c_xs, l); + from = cv->c_xs + l; + for (; from <= xx; from++) + PUTCHARLP(' '); + break; + } + if (from == cv->c_xe + 1 && y >= cv->c_ys && y <= cv->c_ye + 1) + { + GotoPos(from, y); + SetRendition(&mchar_so); + PUTCHARLP(' '); + from++; + break; + } if (y < cv->c_ys || y > cv->c_ye || to < cv->c_xs || from > cv->c_xe) continue; debug2("- canvas hit: %d %d", cv->c_xs, cv->c_ys); @@ -2552,6 +2388,8 @@ } } } + if (cv) + continue; /* we advanced from */ if (lvp == 0) break; if (from < lvp->v_xs) @@ -2565,6 +2403,13 @@ yy = y - lvp->v_yoff; xx = to < lvp->v_xe ? to : lvp->v_xe; + if (lcv->c_layer && lcv->c_xoff + lcv->c_layer->l_width == from) + { + GotoPos(from, y); + SetRendition(&mchar_blank); + PUTCHARLP('|'); + from++; + } if (lcv->c_layer && yy == lcv->c_layer->l_height) { GotoPos(from, y); @@ -2600,44 +2445,8 @@ from = xx + 1; } - if (from > to) - return; /* all done */ - - if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) - { - RefreshHStatus(); - return; - } - - for (cv = display->d_cvlist; cv; cv = cv->c_next) - if (y == cv->c_ye + 1) - break; - if (cv == 0) - { - if (!isblank) - DisplayLine(&mline_null, &mline_blank, y, from, to); - return; - } - - p = Layer2Window(cv->c_layer); - buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev, 0); - if (cv->c_captev.timeout.tv_sec) - evenq(&cv->c_captev); - xx = strlen(buf); - GotoPos(from, y); - SetRendition(&mchar_so); - if (PutWinMsg(buf, from, to + 1)) - from = xx > to + 1 ? to + 1 : xx; - else - { - while (from <= to && from < xx) - { - PUTCHARLP(buf[from]); - from++; - } - } - while (from++ <= to) - PUTCHARLP(' '); + if (!isblank && from <= to) + DisplayLine(&mline_null, &mline_blank, y, from, to); } /*********************************************************************/ @@ -2713,7 +2522,7 @@ DisplayLine(oml, &mline_blank, y, from, to); return; } - bcechar = mchar_blank; + bcechar = mchar_null; rend_setbg(&bcechar, bce); for (x = from; x <= to; x++) copy_mchar2mline(&bcechar, &mline_old, x); @@ -3048,12 +2857,19 @@ } #ifdef RXVT_OSC +#define WT_FLAG "2" /* change to "0" to set both title and icon */ + void SetXtermOSC(i, s) int i; char *s; { - static char oscs[] = "1;\000\00020;\00039;\00049;\000"; + static char *oscs[][2] = { + { WT_FLAG ";", "screen" }, /* set window title */ + { "20;", "" }, /* background */ + { "39;", "black" }, /* default foreground (black?) */ + { "49;", "white" } /* default background (white?) */ + }; ASSERT(display); if (!D_CXT) @@ -3062,17 +2878,13 @@ s = ""; if (!D_xtermosc[i] && !*s) return; - if (i == 0 && !*s) - s = "screen"; /* always set icon name */ - if (i == 1 && !*s) - s = ""; /* no background */ - if (i == 2 && !*s) - s = "black"; /* black text */ - if (i == 3 && !*s) - s = "white"; /* on white background */ + if (i == 0 && !D_xtermosc[0]) + AddStr("\033[22;" WT_FLAG "t"); /* stack titles (xterm patch #251) */ + if (!*s) + s = oscs[i][1]; D_xtermosc[i] = 1; AddStr("\033]"); - AddStr(oscs + i * 4); + AddStr(oscs[i][0]); AddStr(s); AddChar(7); } @@ -3083,7 +2895,10 @@ int i; for (i = 3; i >= 0; i--) SetXtermOSC(i, 0); + if (D_xtermosc[0]) + AddStr("\033[23;" WT_FLAG "t"); /* unstack titles (xterm patch #251) */ } +#undef WT_FLAG #endif /* @@ -3133,9 +2948,11 @@ } void -Flush() +Flush(progress) +int progress; { register int l; + int wr; register char *p; ASSERT(display); @@ -3151,29 +2968,57 @@ return; } p = D_obuf; - if (fcntl(D_userfd, F_SETFL, 0)) - debug1("Warning: BLOCK fcntl failed: %d\n", errno); + if (!progress) + { + if (fcntl(D_userfd, F_SETFL, 0)) + debug1("Warning: BLOCK fcntl failed: %d\n", errno); + } while (l) { - register int wr; + if (progress) + { + fd_set w; + FD_ZERO(&w); + FD_SET(D_userfd, &w); + struct timeval t; + t.tv_sec = progress; + t.tv_usec = 0; + wr = select(FD_SETSIZE, (fd_set *)0, &w, (fd_set *)0, &t); + if (wr == -1) + { + if (errno == EINTR) + continue; + debug1("Warning: select failed: %d\n", errno); + break; + } + if (wr == 0) + { + /* no progress after 3 seconds. sorry. */ + debug1("Warning: no progress after %d seconds\n", progress); + break; + } + } wr = write(D_userfd, p, l); - if (wr <= 0) + if (wr <= 0) { - if (errno == EINTR) + if (errno == EINTR) continue; debug1("Writing to display: %d\n", errno); - wr = l; + break; } - if (!display) - return; D_obuffree += wr; p += wr; l -= wr; } + if (l) + debug1("Warning: Flush could not write %d bytes\n", l); D_obuffree += l; D_obufp = D_obuf; - if (fcntl(D_userfd, F_SETFL, FNBLOCK)) - debug1("Warning: NBLOCK fcntl failed: %d\n", errno); + if (!progress) + { + if (fcntl(D_userfd, F_SETFL, FNBLOCK)) + debug1("Warning: NBLOCK fcntl failed: %d\n", errno); + } if (D_blocked == 1) D_blocked = 0; D_blocked_fuzz = 0; @@ -3211,16 +3056,7 @@ if (D_status_obuffree >= 0) { ASSERT(D_obuffree == -1); - if (!D_status_bell) - { - struct timeval now; - int ti; - gettimeofday(&now, NULL); - ti = (now.tv_sec - D_status_time.tv_sec) * 1000 + (now.tv_usec - D_status_time.tv_usec) / 1000; - if (ti < MsgMinWait) - DisplaySleep1000(MsgMinWait - ti, 0); - } - RemoveStatus(); + RemoveStatusMinWait(); if (--D_obuffree > 0) /* redo AddChar decrement */ return; } @@ -3302,8 +3138,8 @@ D_obufp = D_obuf; D_obuffree += len; D_top = D_bot = -1; - AddCStr(D_TI); AddCStr(D_IS); + AddCStr(D_TI); /* Turn off all attributes. (Tim MacKenzie) */ if (D_ME) AddCStr(D_ME); @@ -3388,6 +3224,8 @@ len = D_obufp - D_obuf; if (len < size) size = len; + if (D_status_obufpos && size > D_status_obufpos) + size = D_status_obufpos; ASSERT(len >= 0); size = write(D_userfd, D_obuf, size); if (size >= 0) @@ -3400,6 +3238,30 @@ } D_obufp -= size; D_obuffree += size; + if (D_status_obufpos) + { + D_status_obufpos -= size; + if (!D_status_obufpos) + { + debug("finished writing the status message\n"); + /* we're finished displaying the message! */ + if (D_status == STATUS_ON_WIN) + { + /* setup continue trigger */ + D_status_obuflen = D_obuflen; + D_status_obuffree = D_obuffree; + /* setting obbuffree to 0 will make AddChar call + * ResizeObuf */ + D_obuffree = D_obuflen = 0; + } + gettimeofday(&D_status_time, NULL); + SetTimeout(&D_statusev, MsgWait); + evenq(&D_statusev); +#ifdef HAVE_BRAILLE + RefreshBraille(); /* let user see multiple Msg()s */ +#endif + } + } if (D_blocked_fuzz) { D_blocked_fuzz -= size; @@ -3427,7 +3289,7 @@ Activate(D_fore ? D_fore->w_norefresh : 0); D_blocked_fuzz = D_obufp - D_obuf; } - } + } else { #ifdef linux @@ -3561,15 +3423,29 @@ y = bp[4] - 33; if (x >= D_forecv->c_xs && x <= D_forecv->c_xe && y >= D_forecv->c_ys && y <= D_forecv->c_ye) { - x -= D_forecv->c_xoff; - y -= D_forecv->c_yoff; - if (x >= 0 && x < D_forecv->c_layer->l_width && y >= 0 && y < D_forecv->c_layer->l_height) + if ((D_fore && D_fore->w_mouse) || (D_mousetrack && D_forecv->c_layer->l_mode == 1)) { - bp[3] = x + 33; - bp[4] = y + 33; - i -= 4; - bp += 4; - continue; + /* Send clicks only if the window is expecting clicks */ + x -= D_forecv->c_xoff; + y -= D_forecv->c_yoff; + if (x >= 0 && x < D_forecv->c_layer->l_width && y >= 0 && y < D_forecv->c_layer->l_height) + { + bp[3] = x + 33; + bp[4] = y + 33; + i -= 4; + bp += 4; + continue; + } + } + } + else if (D_mousetrack && bp[2] == '#') + { + /* 'focus' to the clicked region, only on mouse up */ + struct canvas *cv = FindCanvas(x, y); + if (cv) + { + SetForeCanvas(display, cv); + /* XXX: Do we want to reset the input buffer? */ } } if (bp[0] == '[') @@ -3666,29 +3542,6 @@ } } -static void -cv_winid_fn(ev, data) -struct event *ev; -char *data; -{ - int ox, oy; - struct canvas *cv = (struct canvas *)data; - - display = cv->c_display; - if (D_status == STATUS_ON_WIN) - { - SetTimeout(ev, 1); - evenq(ev); - return; - } - ox = D_x; - oy = D_y; - if (cv->c_ye + 1 < D_height) - RefreshLine(cv->c_ye + 1, 0, D_width - 1, 0); - if (ox != -1 && oy != -1) - GotoPos(ox, oy); -} - #ifdef MAPKEYS static void disp_map_fn(ev, data) @@ -3872,7 +3725,10 @@ displays = 0; #ifdef DEBUG if (dfp && dfp != stderr) - fclose(dfp); + { + fclose(dfp); + dfp = 0; + } #endif if (setgid(real_gid) || setuid(real_uid)) Panic(errno, "setuid/setgid"); @@ -3900,7 +3756,7 @@ (void)ioctl(0, TIOCSWINSZ, (char *)&glwz); #else sprintf(libuf, "LINES=%d", D_height); - sprintf(libuf, "COLUMNS=%d", D_width); + sprintf(cobuf, "COLUMNS=%d", D_width); *np++ = libuf; *np++ = cobuf; #endif @@ -3909,7 +3765,7 @@ #endif display = 0; execvpe(*cmdv, cmdv, NewEnv + 3); - Panic(errno, *cmdv); + Panic(errno, "%s", *cmdv); default: break; } @@ -3919,4 +3775,6 @@ ClearAll(); } -#endif +#endif /* BLANKER_PRG */ + + diff -Nru screen-4.0.3/display.h screen-4.1.0~20120320gitdb59704/display.h --- screen-4.0.3/display.h 2003-07-01 14:01:42.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/display.h 2011-10-04 22:32:21.000000000 +0000 @@ -1,11 +1,16 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 2008, 2009 + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + * Micah Cowan (micah@cowan.name) + * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) + * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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) + * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, @@ -14,19 +19,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * along with this program (see the file COPYING); if not, see + * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * **************************************************************** - * $Id: display.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU + * $Id$ GNU */ +#ifndef SCREEN_DISPLAY_H +#define SCREEN_DISPLAY_H + +#include "layout.h" +#include "canvas.h" +#include "viewport.h" + #ifdef MAPKEYS #define KMAP_KEYS (T_OCAPS-T_CAPS) #define KMAP_AKEYS (T_OCAPS-T_CURSOR) -#define KMAP_EXT 50 #define KMAP_NOTIMEOUT 0x4000 @@ -39,45 +50,22 @@ struct action mm; }; -#endif +#else -struct win; /* forward declaration */ +#define KMAP_KEYS 0 -struct canvas -{ - struct canvas *c_next; /* next canvas on display */ - struct display *c_display; /* back pointer to display */ - struct viewport *c_vplist; - struct layer *c_layer; /* layer on this canvas */ - struct canvas *c_lnext; /* next canvas that displays layer */ - struct layer c_blank; /* bottom layer, always blank */ - int c_xoff; /* canvas x offset on display */ - int c_yoff; /* canvas y offset on display */ - int c_xs; - int c_xe; - int c_ys; - int c_ye; - struct event c_captev; /* caption changed event */ -}; +#endif -struct viewport -{ - struct viewport *v_next; /* next vp on canvas */ - struct canvas *v_canvas; /* back pointer to canvas */ - int v_xoff; /* layer x offset on display */ - int v_yoff; /* layer y offset on display */ - int v_xs; /* vp upper left */ - int v_xe; /* vp upper right */ - int v_ys; /* vp lower left */ - int v_ye; /* vp lower right */ -}; +struct win; /* forward declaration */ struct display { struct display *d_next; /* linked list */ - struct acluser *d_user; /* user who owns that display */ + struct acluser *d_user; /* user who owns that display */ + struct canvas d_canvas; /* our canvas slice */ struct canvas *d_cvlist; /* the canvases of this display */ struct canvas *d_forecv; /* current input focus */ + struct layout *d_layout; /* layout we're using */ void (*d_processinput) __P((char *, int)); char *d_processinputdata; /* data for processinput */ int d_vpxmin, d_vpxmax; /* min/max used position on display */ @@ -112,6 +100,8 @@ int d_hstatus; /* hardstatus used */ int d_lp_missing; /* last character on bot line missing */ int d_mouse; /* mouse mode */ + int d_mousetrack; /* set when user wants to use mouse even when the window + does not */ #ifdef RXVT_OSC int d_xtermosc[4]; /* osc used */ #endif @@ -126,6 +116,7 @@ int d_status_lasty; /* before status was displayed */ int d_status_obuflen; /* saved obuflen */ int d_status_obuffree; /* saved obuffree */ + int d_status_obufpos; /* end of status position in obuf */ struct event d_statusev; /* timeout event */ struct event d_hstatusev; /* hstatus changed event */ int d_kaablamm; /* display kaablamm msg */ @@ -198,7 +189,9 @@ #define D_user DISPLAY(d_user) #define D_username (DISPLAY(d_user) ? DISPLAY(d_user)->u_name : 0) +#define D_canvas DISPLAY(d_canvas) #define D_cvlist DISPLAY(d_cvlist) +#define D_layout DISPLAY(d_layout) #define D_forecv DISPLAY(d_forecv) #define D_processinput DISPLAY(d_processinput) #define D_processinputdata DISPLAY(d_processinputdata) @@ -234,6 +227,7 @@ #define D_hstatus DISPLAY(d_hstatus) #define D_lp_missing DISPLAY(d_lp_missing) #define D_mouse DISPLAY(d_mouse) +#define D_mousetrack DISPLAY(d_mousetrack) #define D_xtermosc DISPLAY(d_xtermosc) #define D_lpchar DISPLAY(d_lpchar) #define D_status DISPLAY(d_status) @@ -246,6 +240,7 @@ #define D_status_lasty DISPLAY(d_status_lasty) #define D_status_obuflen DISPLAY(d_status_obuflen) #define D_status_obuffree DISPLAY(d_status_obuffree) +#define D_status_obufpos DISPLAY(d_status_obufpos) #define D_statusev DISPLAY(d_statusev) #define D_hstatusev DISPLAY(d_hstatusev) #define D_kaablamm DISPLAY(d_kaablamm) @@ -317,23 +312,6 @@ } \ while (0) -#define CV_CALL(cv, cmd) \ -{ \ - struct display *olddisplay = display; \ - struct layer *oldflayer = flayer; \ - struct layer *l = cv->c_layer; \ - struct canvas *cvlist = l->l_cvlist; \ - struct canvas *cvlnext = cv->c_lnext; \ - flayer = l; \ - l->l_cvlist = cv; \ - cv->c_lnext = 0; \ - cmd; \ - flayer = oldflayer; \ - l->l_cvlist = cvlist; \ - cv->c_lnext = cvlnext; \ - display = olddisplay; \ -} - #define STATUS_OFF 0 #define STATUS_ON_WIN 1 #define STATUS_ON_HS 2 @@ -343,3 +321,6 @@ #define HSTATUS_MESSAGE 2 #define HSTATUS_HS 3 #define HSTATUS_ALWAYS (1<<2) + +#endif /* SCREEN_DISPLAY_H */ + diff -Nru screen-4.0.3/doc/.gitignore screen-4.1.0~20120320gitdb59704/doc/.gitignore --- screen-4.0.3/doc/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/.gitignore 2011-10-04 22:32:21.000000000 +0000 @@ -0,0 +1,2 @@ +Makefile +screen.info* diff -Nru screen-4.0.3/doc/Makefile.in screen-4.1.0~20120320gitdb59704/doc/Makefile.in --- screen-4.0.3/doc/Makefile.in 2006-10-23 13:06:32.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/Makefile.in 2011-10-04 22:32:21.000000000 +0000 @@ -6,6 +6,7 @@ DESTDIR = prefix = @prefix@ +datarootdir = @datarootdir@ mandir = @mandir@ infodir = @infodir@ diff -Nru screen-4.0.3/doc/screen.1 screen-4.1.0~20120320gitdb59704/doc/screen.1 --- screen-4.0.3/doc/screen.1 2003-12-05 13:51:57.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/screen.1 2012-03-20 21:11:49.000000000 +0000 @@ -97,7 +97,9 @@ manager (specified in the $STY environment variable) who will use it to create the new window. The above example would start the emacs editor (editing prog.c) and switch -to its window. +to its window. - Note that you cannot transport environment variables from +the invoking shell to the application (emacs in this case), because it is +forked from the parent screen process, not from the invoking shell. .PP If \*Q/etc/utmp\*U is writable by .IR screen , @@ -231,7 +233,11 @@ turns login mode on or off (for /etc/utmp updating). This can also be defined through the \*Qdeflogin\*U .screenrc command. .TP 5 -.BR \-ls " and " \-list +.BR \-ls " [" \fImatch ] +.PD 0 +.TP 5 +.BR \-list " [" \fImatch ] +.PD does not start .IR screen , but prints a list of @@ -282,12 +288,14 @@ This can also be set in your .screenrc by specifying `OP' in a \*Qtermcap\*U command. .TP 5 -.BI "\-p " number_or_name -Preselect a window. This is usefull when you want to reattach to a -specific windor or you want to send a command via the \*Q-X\*U -option to a specific window. As with screen's select commant, \*Q-\*U +.BI "\-p " number_or_name|-|=|+ +Preselect a window. This is useful when you want to reattach to a +specific window or you want to send a command via the \*Q-X\*U +option to a specific window. As with screen's select command, \*Q-\*U selects the blank window. As a special case for reattach, \*Q=\*U -brings up the windowlist on the blank window. +brings up the windowlist on the blank window, while a \*Q+\*U +will create a new window. The command will not be +executed if the specified window could not be found. .TP 5 .B \-q Suppress printing of error messages. In combination with \*Q-ls\*U the exit @@ -299,6 +307,23 @@ more) sessions to resume and you should specify which one to choose. In all other cases \*Q-q\*U has no effect. .TP 5 +.B \-Q +Some commands now can be queried from a remote session using this +flag, e.g. 'screen -Q windows'. The commands will send the +response to the stdout of the querying process. If there was an +error in the command, then the querying process will exit with +a non-zero status. + +The commands that can be queried now are: + \fBecho\fP + \fBinfo\fP + \fBlastmsg\fP + \fBnumber\fP + \fBselect\fP + \fBtime\fP + \fBtitle\fP + \fBwindows\fP +.TP 5 .BR \-r " [" \fIpid.tty.host ] .PD 0 .TP 5 @@ -326,7 +351,7 @@ is run as a login-shell (actually screen uses \*Q-xRR\*U in that case). For combinations with the \fB\-d\fP/\fB\-D\fP option see there. .TP 5 -.B \-s +.BI "\-s " program sets the default shell to the program specified, instead of the value in the environment variable $SHELL (or \*Q/bin/sh\*U if not defined). This can also be defined through the \*Qshell\*U .screenrc command. @@ -341,6 +366,10 @@ sets the title (a.\|k.\|a.) for the default shell or specified program. See also the \*Qshelltitle\*U .screenrc command. .TP 5 +.BI "\-T " term +Set the $TERM enviroment varible using the spcified term as +opposed to the defualt setting of \fBscreen\fP. +.TP 5 .B \-U Run screen in UTF-8 mode. This option tells screen that your terminal sends and understands UTF-8 encoded characters. It also sets the default @@ -360,6 +389,9 @@ Attach to a not detached .I screen session. (Multi display mode). +.I Screen +refuses to attach from within itself. +But when cascading multiple screens, loops are not detected; take care. .TP 5 .B \-X Send the specified command to a running screen session. You can use @@ -367,7 +399,6 @@ attached or detached screen sessions. Note that this command doesn't work if the session is password protected. - .SH "DEFAULT KEY BINDINGS" .ta 12n 26n As mentioned, each @@ -396,6 +427,7 @@ .IP "\fBC-a tab\fP (focus)" .PD Switch the input focus to the next region. +See also \fIsplit, remove, only\fP. .IP "\fBC-a C-a\fP (other)" Toggle to the window displayed previously. Note that this binding defaults to the command character typed twice, @@ -492,6 +524,7 @@ Send a control-q to the current window. .IP "\fBC-a Q\fP (only)" Delete all regions but the current one. +See also \fIsplit, remove, focus\fP. .IP "\fBC-a r\fP" .PD 0 .IP "\fBC-a C-r\fP (wrap)" @@ -504,7 +537,8 @@ .PD Send a control-s to the current window. .IP "\fBC-a S\fP (split)" -Split the current region into two new ones. +Split the current region horizontally into two new ones. +See also \fIonly, remove, focus\fP. .IP "\fBC-a t\fP" .PD 0 .IP "\fBC-a C-t\fP (time)" @@ -530,6 +564,7 @@ Lock this terminal. .IP "\fBC-a X\fP (remove)" Kill the current region. +See also \fIsplit, only, focus\fP. .IP "\fBC-a z\fP" .PD 0 .IP "\fBC-a C-z\fP (suspend)" @@ -554,6 +589,8 @@ .IP "\fBC-a esc\fP (copy)" .PD Enter copy/scrollback mode. +.IP "\fBC-a C-]\fP" +.PD 0 .IP "\fBC-a ]\fP (paste .)" .PD Write the contents of the paste buffer to the stdin queue of the @@ -575,6 +612,8 @@ comes from, where it went to and why you can use it. .IP "\fBC-a _\fP (silence)" Start/stop monitoring the current window for inactivity. +.IP "\fBC-a |\fP (split -v)" +Split the current region vertically into two new ones. .IP "\fBC-a *\fP (displays)" Show a listing of all currently attached displays. @@ -1044,7 +1083,7 @@ This key-binding makes \*Q^T\*U an escape character for key-bindings. If you did the above \*Qstuff barfoo\*U binding, you can enter the word \*Qfoo\*U by typing \*Q^Tfoo\*U. If you want to insert a \*Q^T\*U -you have to press the key twice (i.e. escape the escape binding). +you have to press the key twice (i.e., escape the escape binding). .sp .nf bindkey -k F1 command @@ -1077,7 +1116,8 @@ .B blankerprg .RI [ "program args" ] .PP -Defines a blanker program. Disables the blanker program if no +Defines a blanker program. Disables the blanker program if an +empty argument is given. Shows the currently set blanker program if no arguments are given. .sp .ne 3 @@ -1234,44 +1274,67 @@ .br .in +4n .ti -2n -\fBh\fP, \fBj\fP, \fBk\fP, \fBl\fP move the cursor line by line or -column by column. +\fBh\fP, \fBC-h\fP, or \fBleft arrow\fP move the cursor left. .br .ti -2n -\fB0\fP, \fB^\fP and \fB$\fP move to the leftmost column, to the first or last -non-whitespace character on the line. +\fBj\fP, \fBC-n\fP, or \fBdown arrow\fP move the cursor down. +.br +.ti -2n +\fBk\fP, \fBC-p\fP, or \fBup arrow\fP move the cursor up. +.br +.ti -2n +\fBl\fP ('el') or \fBright arrow\fP move the cursor right. +.br +.ti -2n +\fB0\fP (zero) or \fBC-a\fP move to the leftmost column. +.br +.ti -2n +\fB+\fP and \fB\-\fP positions one line up and down. .br .ti -2n \fBH\fP, \fBM\fP and \fBL\fP move the cursor to the leftmost column of the top, center or bottom line of the window. .br .ti -2n -\fB+\fP and \fB\-\fP positions one line up and down. +\fB|\fP moves to the specified absolute column. .br .ti -2n -\fBG\fP moves to the specified absolute line (default: end of buffer). +\fBg\fP or \fBhome\fP moves to the beginning of the buffer. +.br +.ti -2n +\fBG\fP or \fBend\fP moves to the specified absolute line (default: end of buffer). .br .ti -2n -\fB|\fP moves to the specified absolute column. +\fB%\fP jumps to the specified percentage of the buffer. .br .ti -2n -\fBw\fP, \fBb\fP, \fBe\fP move the cursor word by word. +\fB^\fP or \fB$\fP move to the leftmost column, to the first or last +non-whitespace character on the line. +.br +.ti -2n +\fBw\fP, \fBb\fP, and \fBe\fP move the cursor word by word. .br .ti -2n \fBB\fP, \fBE\fP move the cursor WORD by WORD (as in vi). .br .ti -2n -\fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of -lines while preserving the cursor position. (Default: half screen-full). +.\"\fBf\fP,\fBt\fP, \fBF\fP, \fBT\fP move the cursor forward/backward to the next occurence of the target. +\fBf/F\fP, \fBt/T\fP move the cursor forward/backward to the next occurence of the target. (eg, '3fy' will +move the cursor to the 3rd 'y' to the right.) .br .ti -2n -\fBC-b\fP and \fBC-f\fP scroll the display up/down a full screen. +\fB;\fP and \fB,\fP Repeat the last f/F/t/T command in the same/opposite direction. .br .ti -2n -\fBg\fP moves to the beginning of the buffer. +\fBC-e\fP and \fBC-y\fP scroll the display up/down by one line +while preserving the cursor position. .br .ti -2n -\fB%\fP jumps to the specified percentage of the buffer. +\fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of +lines while preserving the cursor position. (Default: half screen-full). +.br +.ti -2n +\fBC-b\fP and \fBC-f\fP scroll the display up/down a full screen. .br .ti -4n @@ -1286,11 +1349,12 @@ .IR Marking : .br The copy range is specified by setting two marks. The text between these marks -will be highlighted. Press +will be highlighted. Press: .br .ti -2n -\fBspace\fP to set the first or second mark -respectively. +\fBspace\fP or \fBenter\fP to set the first or second mark +respectively. If \fBmousetrack\fP is set to `on', marks can also be set using +\fPleft mouse click\fP. .br .ti -2n \fBY\fP and \fBy\fP used to mark one whole line or to mark from @@ -1322,6 +1386,10 @@ \fBC-a s\fP \fIEmacs\fP style incremental search forward. .ti -2n \fBC-r\fP \fIEmacs\fP style reverse i-search. +.ti -2n +\fBn\fP Find next search pattern. +.ti -2n +\fBN\fP Find previous search pattern. .ti -4n .IR Specials : .br @@ -1330,7 +1398,7 @@ .I Vi does not allow one to yank rectangular blocks of text, but .I screen -does. Press +does. Press: .br .ti -2n \fBc\fP or \fBC\fP to set the left or right margin respectively. If no repeat count is @@ -1355,7 +1423,7 @@ character with a carriage return character, by issuing a \*Qcrlf on\*U. .br .ti -2n -\fBv\fP is for all the +\fBv\fP or \fBV\fP is for all the .I vi users with \*Q:set numbers\*U \- it toggles the left margin between column 9 and 1. Press @@ -1379,10 +1447,13 @@ \fBC-g\fP gives information about the current line and column. .br .ti -2n -\fBx\fP exchanges the first mark and the current cursor position. You +\fBx\fP or \fBo\fP exchanges the first mark and the current cursor position. You can use this to adjust an already placed mark. .br .ti -2n +\fBC-l\fP ('el') will redraw the screen. +.br +.ti -2n \fB@\fP does nothing. Does not even exit copy mode. .br .ti -2n @@ -1448,7 +1519,7 @@ of the break, but it may be the only way to generate long breaks. .IR Tcsendbreak " and " TIOCSBRK may or may not produce long breaks with spikes (e.g. 4 per -second). This is not only system dependant, this also differs between +second). This is not only system-dependent, this also differs between serial board drivers. Calling \*Qdefbreaktype\*U with no parameter displays the current setting. .sp @@ -1535,6 +1606,12 @@ windows is changed. Initial setting is `off'. .sp .ne 3 +.BR "defmousetrack on" | off +.PP +Same as the \fBmousetrack\fP command except that the default setting for new +windows is changed. Initial setting is `off'. +.sp +.ne 3 .B defnonblock .BR on | off | \fInumsecs .PP @@ -1628,9 +1705,93 @@ .PP Shows a tabular listing of all currently connected user front-ends (displays). This is most useful for multiuser sessions. +The following keys can be used in displays list: +.br +.in +4n +.ti -2n +\fBk\fP, \fBC-p\fP, or \fBup\fP Move up one line. +.br +.ti -2n +\fBj\fP, \fBC-n\fP, or \fBdown\fP Move down one line. +.br +.ti -2n +\fBC-a\fP or \fBhome\fP Move to the first line. +.br +.ti -2n +\fBC-e\fP or \fBend\fP Move to the last line. +.br +.ti -2n +\fBC-u\fP or \fBC-d\fP Move one half page up or down. +.br +.ti -2n +\fBC-b\fP or \fBC-f\fP Move one full page up or down. +.br +.ti -2n +\fBmouseclick\fP Move to the selected line. Available +when \*Qmousetrack\*U is set to on. +.br +.ti -2n +\fBspace\fP Refresh the list +.br +.ti -2n +\fBd\fP Detach that display +.br +.ti -2n +\fBD\fP Power detach that display +.br +.ti -2n +\fBC-g\fP, \fBenter\fP, or \fBescape\fP Exit the list +.br +.ti -4n +.PP +The following is an example of what \*Qdisplays\*U could look like: +.IP +xterm 80x42 jnweiger@/dev/ttyp4 0(m11) &rWx +.br +facit 80x24 mlschroe@/dev/ttyhf nb 11(tcsh) rwx +.br +xterm 80x42 jnhollma@/dev/ttyp5 0(m11) &R.x +.br + (A) (B) (C) (D) (E) (F)(G) (H)(I) +.PP +The legend is as follows: +.br +(A) The terminal type known by screen for this display. +.br +(B) Displays geometry as width x height. +.br +(C) Username who is logged in at the display. +.br +(D) Device name of the display or the attached device +.br +(E) Display is in blocking or nonblocking mode. The available modes are "nb", "NB", +"Z<", "Z>", and "BL". +.br +(F) Number of the window +.br +(G) Name/title of window +.br +(H) Whether the window is shared +.br +(I) Window permissions. Made up of three characters: + (1st character) + ‘-’ : no read + ‘r’ : read + ‘R’ : read only due to foreign wlock + (2nd character) + ‘-’ : no write + ‘.’ : write suppressed by foreign wlock + ‘w’ : write + ‘W’ : own wlock + (3rd character) + ‘-’ : no execute + ‘x’ : execute + +\*QDisplays\*U needs a region size of at least 10 characters wide and 5 characters high in +order to display. .sp .ne 3 -.BR "digraph " [ \fIpreset ] +.BR "digraph " [ \fIpreset [ \fI unicode-value ] ] .PP This command prompts the user for a digraph sequence. The next two characters typed are looked up in a builtin table and the @@ -1644,6 +1805,11 @@ is treated as user input, thus one can create an \*Qumlaut\*U key. For example the command "bindkey ^K digraph '"'" enables the user to generate an a-umlaut by typing CTRL-K a. +When a non-zero +.I unicode-value +is specified, a new digraph is created with the specified preset. The digraph is unset +if a zero value is provided for the +.I unicode-value. .sp .ne 3 .B dumptermcap @@ -1724,7 +1890,7 @@ optional arguments) in the current window. The flow of data between newcommands stdin/stdout/stderr, the process originally started in the window (let us call it "application-process") and screen itself (window) is -controlled by the filedescriptor pattern fdpat. +controlled by the file descriptor pattern fdpat. This pattern is basically a three character sequence representing stdin, stdout and stderr of newcommand. A dot (.) connects the file descriptor to @@ -1837,6 +2003,21 @@ bind t focus top bind b focus bottom .fi +Note that \fBk\fP is traditionally bound to the \fIkill\fP command. +.sp +.ne 3 +.BI "focusminsize [ ( " width "|max|_ ) ( " height "|max|_ ) ]" +.PP +This forces any currently selected region to be automatically +resized at least a certain \fIwidth\fP and \fIheight\fP. All +other surrounding regions will be resized in order to accommodate. +This constraint follows everytime the \*Qfocus\*U command is +used. The \*Qresize\*U command can be used to increase either +dimension of a region, but never below what is set with +\*Qfocusminsize\*U. The underscore `_' is a synonym for +\fBmax\fP. Setting a \fIwidth\fP and \fIheight\fP of `0 0' +(zero zero) will undo any constraints and allow for manual resizing. +Without any parameters, the minimum width and height is shown. .sp .ne 3 .BR "gr " [ on | off ] @@ -1848,6 +2029,15 @@ otherwise the ISO88591 charset would not work. .sp .ne 3 +.BI group +.RI [ grouptitle ] +.PP +Change or show the group the current window belongs to. Windows can +be moved around between different groups by specifying the name of +the destination group. Without specifying a group, the title of the +current group is displayed. +.sp +.ne 3 .B hardcopy .RB [ -h ] .RI [ file ] @@ -1914,7 +2104,7 @@ will use the type even if the terminal supports a hardstatus. .P The third form specifies the contents of the hardstatus line. '%h' is -used as default string, i.e. the stored hardstatus of the current +used as default string, i.e., the stored hardstatus of the current window (settable via \*QESC]0;^G\*U or \*QESC_ESC\e\*U) is displayed. You can customize this to any string you like including the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave out @@ -1986,14 +2176,14 @@ inactivity is reached. This command will normally be the \*Qblanker\*U command to create a screen blanker, but it can be any screen command. If no command is specified, only the timeout is set. A timeout of -zero (ot the special timeout \fBoff\fP) disables the timer. +zero (or the special timeout \fBoff\fP) disables the timer. If no arguments are given, the current settings are displayed. .sp .ne 3 .BR "ignorecase " [ on | off ] .PP Tell screen to ignore the case of characters in searches. Default is -`off'. +`off'. Without any options, the state of ignorecase is toggled. .sp .ne 3 .B info @@ -2069,6 +2259,123 @@ Refer to the commands \*Qmsgwait\*U and \*Qmsgminwait\*U for fine tuning. .sp .ne 3 +.BR "layout new " [\fItitle\fP] +.PP +Create a new layout. The screen will change to one whole region +and be switched to the blank window. From here, you build the +regions and the windows they show as you desire. The new layout +will be numbered with the smallest available integer, starting +with zero. You can optionally give a title to your new layout. +Otherwise, it will have a default title of \*Qlayout\*U. You +can always change the title later by using the command +\fBlayout title\fP. +.sp +.ne 3 +.BR "layout remove " [\fIn|title\fP] +.PP +Remove, or in other words, delete the specified layout. Either +the number or the title can be specified. Without either +specification, \fIscreen\fP will remove the current layout. + +Removing a layout does not affect your set windows or regions. +.sp +.ne 3 +.B layout next +.PP +Switch to the next layout available +.sp +.ne 3 +.B layout prev +.PP +Switch to the previous layout available +.sp +.ne 3 +.BR "layout select " [\fIn|title\fP] +.PP +Select the desired layout. Either the number or the title can +be specified. Without either specification, \fIscreen\fP will +prompt and ask which screen is desired. To see which layouts are +available, use the \fBlayout show\fP command. +.sp +.ne 3 +.B layout show +.PP +List on the message line the number(s) and title(s) of the available +layout(s). The current layout is flagged. +.sp +.ne 3 +.BR "layout title " [\fItitle\fP] +.PP +Change or display the title of the current layout. A string given +will be used to name the layout. Without any options, the current +title and number is displayed on the message line. +.sp +.ne 3 +.BR "layout number " [\fIn\fP] +.PP +Change or display the number of the current layout. An integer given +will be used to number the layout. Without any options, the current +number and title is displayed on the message line. +.sp +.ne 3 +.BR "layout attach " [\fItitle\fP|\fB:last\fP] +.PP +Change or display which layout to reattach back to. The default is +\fB:last\fP, which tells \fIscreen\fP to reattach back to the last +used layout just before detachment. By supplying a title, You can +instruct \fIscreen\fP to reattach to a particular layout regardless +which one was used at the time of detachment. Without any options, +the layout to reattach to will be shown in the message line. +.sp +.ne 3 +.BR "layout save " [\fIn|title\fP] +.PP +Remember the current arrangement of regions. When used, \fIscreen\fP +will remember the arrangement of vertically and horizontally split +regions. This arrangement is restored when a \fIscreen\fP session +is reattached or switched back from a different layout. If the +session ends or the \fIscreen\fP process dies, the layout +arrangements are lost. The \fBlayout dump\fP command should help +in this siutation. If a number +or title is supplied, \fIscreen\fP will remember the arrangement of +that particular layout. Without any options, \fIscreen\fP will +remember the current layout. + +Saving your regions can be done automatically by using the +\fBlayout autosave\fP command. +.sp +.ne 3 +.BR "layout autosave " [\fBon|off\fP] +.PP +Change or display the status of automatcally saving layouts. The +default is \fBon\fP, meaning when \fIscreen\fP is detached or +changed to a different layout, the arrangement of regions and windows +will be remembered at the time of change and restored upon return. +If autosave is set to \fBoff\fP, that arrangement will only be +restored to either to the last manual save, using \fBlayout save\fP, +or to when the layout was first created, to a single region with +a single window. Without either an \fBon\fP or \fBoff\fP, the +current status is displayed on the message line. +.sp +.ne 3 +.BR "layout dump " [\fIfilename\fP] +.PP +Write to a file the order of splits made in the current layout. This +is useful to recreate the order of your regions used in your current +layout. Only the current layout is recorded. While the order of the +regions are recorded, the sizes of those regions and which windows +correspond to which regions are not. If no filename is specified, +the default is \fIlayout-dump\fP, saved in the directory that the +\fIscreen\fP process was started in. If the file already exists, +\fBlayout dump\fP will append to that file. As an example: +.PP +.nf + C-a : layout dump /home/user/.screenrc +.fi +.PP +will save or append the layout to the user's \fI.screenrc\fP file. +.sp +.ne 3 .B license .PP Display the disclaimer page. This is done whenever @@ -2111,7 +2418,7 @@ .br .BI "logfile flush " secs .PP -Defines the name the logfiles will get. The default is +Defines the name the log files will get. The default is \*Qscreenlog.%n\*U. The second form changes the number of seconds .I screen will wait before flushing the logfile buffer to the file-system. The @@ -2172,11 +2479,11 @@ .sp .ne 3 .B maptimeout -.RI [ timo ] +.RI [ timeout ] .PP Set the inter-character timer for input sequence detection to a timeout of -.I timo +.I timeout ms. The default timeout is 300ms. Maptimeout with no arguments shows the current setting. See also \*Qbindkey\*U. @@ -2202,7 +2509,8 @@ .BI "maxwin " num .PP Set the maximum window number screen will create. Doesn't affect -already existing windows. The number may only be decreased. +already existing windows. The number can be increased only when there are no +existing windows. .sp .ne 3 .B meta @@ -2220,6 +2528,18 @@ Monitoring is initially off for all windows. .sp .ne 3 +.BR "mousetrack " [ on | off ] +.PP +This command determines whether +.I screen +will watch for +mouse clicks. When this command is enabled, regions that have +been split in various ways can be selected by pointing to them +with a mouse and left-clicking them. Without specifying \fBon\fP +or \fBoff\fP, the current state is displayed. The default state +is determined by the \*Qdefmousetrack\*U command. +.sp +.ne 3 .BI "msgminwait " sec .PP Defines the time @@ -2260,7 +2580,8 @@ .I screen was compiled with the NETHACK flag defined. The default setting is then determined by the presence of the environment -variable $NETHACKOPTIONS. +variable $NETHACKOPTIONS and the file ~/.nethackrc - if either one is present, +the default is \fBon\fP. .sp .ne 3 .B next @@ -2284,11 +2605,12 @@ the display and redisplay the updated window contents. .sp .ne 3 -.BR "number " [ \fIn ] +.BR "number " [[+|-] \fIn ] .PP -Change the current windows number. If the given number \fIn\fP is already +Change the current window's number. If the given number \fIn\fP is already used by another window, both windows exchange their numbers. If no argument is -specified, the current window number (and title) is shown. +specified, the current window number (and title) is shown. Using `+' or `-' +will change the window's number by the relative amount specified. .sp .ne 3 .BR "obuflimit " [ \fIlimit ] @@ -2502,6 +2824,15 @@ \*Qreadbuf\*U. .sp .ne 3 +.B "rendition bell" | monitor | silence | so +.RB "\fIattr\fR " [ \fIcolor ] +.PP +Change the way +.I screen +renders the titles of windows that have monitor or bell flags set in caption or hardstatus or windowlist. See the \*QSTRING ESCAPES\*U chapter for the syntax of the modifiers. +The default for monitor is currently \*Q=b \*U (bold, active colors), for bell \*Q=ub \*U (underline, bold and active colors), and \*Q=u \*U for silence. +.sp +.ne 3 .B "reset" .PP Reset the virtual terminal to its \*Qpower-on\*U values. Useful when strange @@ -2528,7 +2859,7 @@ .PP .sp .ne 3 -.B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]]" +.B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]|\fB//group\fP]" .PP Establish a new window. The flow-control options (\fB\-f\fP, \fB\-fn\fP and \fB\-fa\fP), @@ -2537,11 +2868,14 @@ and scrollback option (\fB-h\fP ) may be specified with each command. The option (\fB-M\fP) turns monitoring on for this window. The option (\fB-L\fP) turns output logging on for this window. -If an optional number \fIn\fP in the range 0..9 is given, the window -number \fIn\fP is assigned to the newly created window (or, if this -number is already in-use, the next available number). +If an optional number \fIn\fP in the range 0..MAXWIN-1 is given, +the window number \fIn\fP is assigned to the newly created window +(or, if this number is already in-use, the next available number). If a command is specified after \*Qscreen\*U, this command (with the given arguments) is started in the window; otherwise, a shell is created. +If \fB//group\fP is supplied, a container-type window is created in +which other windows may be created inside it. + Thus, if your \*Q.screenrc\*U contains the lines .sp .nf @@ -2571,8 +2905,9 @@ .PP Set the size of the scrollback buffer for the current windows to \fInum\fP lines. The default scrollback is 100 lines. -See also the \*Qdefscrollback\*U command and use \*QC-a i\*U to view the -current setting. +See also the \*Qdefscrollback\*U command and use \*Qinfo\*U to view the +current setting. To access and use the contents in the scrollback buffer, +use the \*Qcopy\*U command. .sp .ne 3 .BR "select " [ \fIWindowID ] @@ -2585,7 +2920,7 @@ is assigned to this window. Thus, the first window can be activated by \*Qselect 0\*U. The number of windows is limited at compile-time by the MAXWIN -configuration parameter. +configuration parameter (which defaults to 40). There are two special WindowIDs, \*Q-\*U selects the internal blank window and \*Q.\*U selects the current window. The latter is useful if used with screen's \*Q-X\*U option. @@ -2596,8 +2931,10 @@ Rename the current session. Note, that for \*Qscreen -list\*U the name shows up with the process-id prepended. If the argument \*Qname\*U is omitted, the name of this session is displayed. Caution: The $STY -environment variables still reflects the old name. This may result in -confusion. +environment variables will still reflect the old name in pre-existing +shells. This may result in confusion. Use of this command is generally +discouraged. Use the \*Q-S\*U command-line option if you want to +name a new session. The default is constructed from the tty and host names. .sp .ne 3 @@ -2689,19 +3026,17 @@ .B sorendition .RB [ "\fIattr\fR " [ \fIcolor ]] .PP -Change the way -.I screen -does highlighting for text marking and printing messages. -See the \*QSTRING ESCAPES\*U chapter for the syntax of the modifiers. -The default is currently \*Q=s dd\*U (standout, default colors). +This command is deprecated. See "rendition so" instead. .sp .ne 3 .B split +.RB [ -v ] .PP Split the current region into two new ones. All regions on the display are resized to make room for the new region. The blank -window is displayed on the new region. Use the \*Qremove\*U or the -\*Qonly\*U command to delete regions. +window is displayed on the new region. Splits are made horizontally +unless -v is used. Use the \*Qremove\*U or the \*Qonly\*U command +to delete regions. Use \*Qfocus\*U to toggle between regions. .sp .ne 3 .B "startup_message on\fP|\fBoff" @@ -2710,21 +3045,22 @@ Default is `on', as you probably noticed. .sp .ne 3 -.B stuff -.I string +.B stuff +.RB [ "\fIstring\fR" ] .PP Stuff the string .I string in the input buffer of the current window. This is like the \*Qpaste\*U command but with much less overhead. +Without a paramter, screen will prompt for a string to stuff. You cannot paste large buffers with the \*Qstuff\*U command. It is most useful for key bindings. See also \*Qbindkey\*U. .sp .ne 3 .B su -.RB [ username " [" password -.RB [ password2 ]] +.RI [ username " [" password +.RI [ password2 ]]] .PP Substitute the user of a display. The command prompts for all parameters that are omitted. If passwords are specified as parameters, they have to be @@ -2871,7 +3207,7 @@ .PP Uses the message line to display the time of day, the host name, and the load averages over 1, 5, and 15 minutes (if this is available on your system). -For window specific information use \*Qinfo\*U. +For window specific information, use \*Qinfo\*U. If a string is specified, it changes the format of the time report like it is described in the \*QSTRING ESCAPES\*U chapter. Screen uses a default of @@ -2887,6 +3223,14 @@ releases. .sp .ne 3 +.BI "unbindall " +.PP +Unbind all the bindings. This can be useful when +screen is used solely for its detaching abilities, such as when +letting a console application run as a daemon. If, for some reason, +it is necessary to bind commands after this, use 'screen -X'. +.sp +.ne 3 .BI "unsetenv " var .PP Unset an environment variable. @@ -2926,7 +3270,7 @@ the window receives a bell character (^G), vbell is set to \*Qon\*U, but the terminal does not support a visual bell. The default message is \*QWuff, Wuff!!\*U. -Without parameter, the current message is shown. +Without a parameter, the current message is shown. .sp .ne 3 .BI "vbellwait " sec @@ -2941,7 +3285,7 @@ .PP If verbose is switched on, the command name is echoed, whenever a window is created (or resurrected from zombie state). Default is off. -Without parameter, the current setting is shown. +Without a parameter, the current setting is shown. .sp .ne 3 .B version @@ -2975,6 +3319,7 @@ .B windowlist .RB [ -b ] .RB [ -m ] +.RB [ -g ] .br .B windowlist .B string @@ -2984,9 +3329,9 @@ .B title .RI [ title ] .PP -Display all windows in a table for visual window selection. The -desired window can be selected via the standard movement keys (see -the \*Qcopy\*U command) and activated via the return key. +Display all windows in a table for visual window selection. +If screen was in a window group, screen will +back out of the group and then display the windows in that group. If the .B -b option is given, screen will switch to the blank window before @@ -2995,6 +3340,76 @@ .B -m option changes the order of the windows, instead of sorting by window numbers screen uses its internal most-recently-used list. +The +.B -g +option will show the windows inside any groups in that level +and downwards. + +The following keys are used to navigate in \*Qwindowlist\*U: +.br +.in +4n +.ti -2n +\fBk\fP, \fBC-p\fP, or \fBup\fP Move up one line. +.br +.ti -2n +\fBj\fP, \fBC-n\fP, or \fBdown\fP Move down one line. +.br +.ti -2n +\fBC-g\fP or \fBescape\fP Exit windowlist. +.br +.ti -2n +\fBC-a\fP or \fBhome\fP Move to the first line. +.br +.ti -2n +\fBC-e\fP or \fBend\fP Move to the last line. +.br +.ti -2n +\fBC-u\fP or \fBC-d\fP Move one half page up or down. +.br +.ti -2n +\fBC-b\fP or \fBC-f\fP Move one full page up or down. +.br +.ti -2n +\fB0..9\fP Using the number keys, move to the selected line. +.br +.ti -2n +\fBmouseclick\fP Move to the selected line. Available when +\*Qmousetrack\*U is set to \*Qon\*U +.br +.ti -2n +\fB/\fP Search. +.br +.ti -2n +\fBn\fP Repeat search in the forward direction. +.br +.ti -2n +\fBN\fP Repeat search in the backward direction. +.br +.ti -2n +\fBm\fP Toggle MRU. +.br +.ti -2n +\fBg\fP Toggle group nesting. +.br +.ti -2n +\fBa\fP All window view. +.br +.ti -2n +\fBC-h\fP or backspace Back out the group. +.br +.ti -2n +\fB,\fP Switch numbers with the previous window. +.br +.ti -2n +\fB.\fP Switch numbers with the next window. +.br +.ti -2n +\fBK\fP Kill that window. +.br +.ti -2n +\fBspace\fP or \fBenter\fP Select that window. +.br +.in -4n The table format can be changed with the \fBstring\fP and \fBtitle\fP option, the title is displayed as table heading, while @@ -3003,6 +3418,9 @@ for the lines. See the \*QSTRING ESCAPES\*U chapter for more codes (e.g. color settings). + +\*QWindowlist\*U needs a region size of at least 10 characters wide +and 6 characters high in order to display. .sp .ne 3 .B windows @@ -3030,7 +3448,7 @@ the last column of a line will wrap to the start of the following line. As an added feature, backspace (^H) will also wrap through the left margin to the previous line. -Default is `on'. +Default is `on'. Without any options, the state of wrap is toggled. .sp .ne 3 .B writebuf @@ -3091,7 +3509,7 @@ Note also that this is an experimental feature. .sp .ne 3 -.BR "zombie " [\fIkeys\fP] +.BR "zombie " [\fIkeys\fP [ onerror ] ] .br .BR "defzombie " [\fIkeys\fP] .PP @@ -3113,6 +3531,10 @@ should only be called \fBdefzombie\fP. Until we need this as a per window setting, the commands \fBzombie\fP and \fBdefzombie\fP are synonymous. +Optionally you can put the word \*Qonerror\*U after the keys. This will cause screen +to monitor exit status of the process running in the window. If it exits normally ('0'), +the window disappears. Any other exit value causes the window to become a zombie. + .SH "THE MESSAGE LINE" .I Screen displays informational messages and other diagnostics in a \fImessage line\fP. @@ -3172,14 +3594,14 @@ Specify the transmission of eight (or seven) bits per byte. .IP "ixon or -ixon" Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data. -.IP "ixoff or -ixon" +.IP "ixoff or -ixoff" Enables (or disables) software flow-control for receiving data. .IP "istrip or -istrip" Clear (or keep) the eight bit in each received byte. .PP You may want to specify as many of these options as applicable. Unspecified options cause the terminal driver to make up the parameter values of the -connection. These values are system dependant and may be in defaults or values +connection. These values are system dependent and may be in defaults or values saved from a previous connection. .PP For tty windows, the @@ -3192,13 +3614,12 @@ an exclamation mark (!), otherwise the signal is logical high (active). Signals not supported by the hardware but available to the ioctl() interface are usually shown low. -.br +.PP When the CLOCAL status bit is true, the whole set of modem signals is placed inside curly braces ({ and }). When the CRTSCTS or TIOCSOFTCAR bit is set, the signals `CTS' or `CD' are shown in parenthesis, respectively. - - +.PP For tty windows, the command .B break causes the Data transmission line (TxD) to go low for a specified period of @@ -3207,6 +3628,7 @@ .B break is issued. .RE + .IP \(bu If the first parameter is \*Q//telnet\*U, the second parameter is expected to be a host name, and an optional third parameter may specify a TCP port number @@ -3270,8 +3692,10 @@ day number .IP D weekday name +.IP E +sets %? to true if the escape character has been pressed. .IP f -flags of the window +flags of the window, see \*Qwindows\*U for meanings of the various flags .IP F sets %? to true if the window has the focus .IP h @@ -3286,6 +3710,10 @@ month name .IP n window number +.IP P +sets %? to true if the current region is in copy/paste mode +.IP S +session name .IP s seconds .IP t @@ -3293,7 +3721,7 @@ .IP u all other users on this window .IP w -all window numbers and names. With '-' quailifier: up to the current +all window numbers and names. With '-' qualifier: up to the current window; with '+' qualifier: starting with the window after the current one. .IP W @@ -3345,7 +3773,7 @@ color settings. Its format is \*Q[attribute modifier] [color description]\*U. The attribute modifier must be prefixed by a change type indicator if it can be confused with -a color desciption. The following change types are known: +a color description. The following change types are known: .IP + add the specified set to the current attributes .IP - @@ -3403,14 +3831,14 @@ unchanged. .br A one digit/letter color description is treated as foreground or -background color dependant on the current attributes: if reverse mode is +background color dependent on the current attributes: if reverse mode is set, the background color is changed instead of the foreground color. If you don't like this, prefix the color with a \*Q.\*U. If you want -the same behaviour for two-letter color descriptions, also prefix them +the same behavior for two-letter color descriptions, also prefix them with a \*Q.\*U. .br As a special case, \*Q%{-}\*U restores the attributes and colors that -were set before the last change was made (i.e. pops one level of the +were set before the last change was made (i.e., pops one level of the color-change stack). .PP Examples: @@ -3616,7 +4044,7 @@ Bash users will probably want to echo the escape sequence in the PROMPT_COMMAND: .IP -PROMPT_COMMAND='echo -n -e "\e033k\e033\e134"' +PROMPT_COMMAND='printf "\e033k\e033\e134"' .PP (I used \*Q\134\*U to output a `\e' because of a bug in bash v1.04). @@ -4329,7 +4757,7 @@ A \fI\fP tells .I screen how to map characters -in font \fI\fP ('B': Ascii, 'A': UK, 'K': german, etc.) +in font \fI\fP ('B': Ascii, 'A': UK, 'K': German, etc.) to strings. Every \fI\fP describes to what string a single character will be translated. A template mechanism is used, as most of the time the codes have a lot in common (for example @@ -4349,7 +4777,7 @@ .I screen how to translate ISOlatin1 (charset 'B') upper case umlaut characters on a hp700 terminal that has a -german charset. '\e304' gets translated to '\eE(K[\eE(B' and so on. +German charset. '\e304' gets translated to '\eE(K[\eE(B' and so on. Note that this line gets parsed *three* times before the internal lookup table is built, therefore a lot of quoting is needed to create a single '\e'. @@ -4367,7 +4795,7 @@ termcap xterm 'XC=K%,%\eE(B,[\e304,\e\e\e\e\e326,]\e334' -Here, a part of the german ('K') charset is emulated on an xterm. +Here, a part of the German ('K') charset is emulated on an xterm. If .I screen has to change to the 'K' charset, '\eE(B' will be sent @@ -4454,10 +4882,19 @@ .SH AUTHORS Originally created by Oliver Laumann, this latest version was -produced by Wayne Davison, Juergen Weigert and Michael Schroeder. +produced by Juergen Weigert, Michael Schroeder, Micah Cowan and +Sadrul Habib Chowdhury. .SH COPYLEFT .nf +Copyright (c) 2010 + Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) +Copyright (c) 2008, 2009 + Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) + Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) + Micah Cowan (micah@cowan.name) + Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) Copyright (C) 1993-2003 Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) @@ -4466,7 +4903,7 @@ .PP 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) +the Free Software Foundation; either version 3, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, @@ -4512,7 +4949,7 @@ .SH VERSION -This is version 4.0.2. Its roots are a merge of a custom version +This is version 4.1.0. Its roots are a merge of a custom version 2.3PR7 by Wayne Davison and several enhancements to Oliver Laumann's version 2.0. Note that all versions numbered 2.x are copyright by Oliver Laumann. diff -Nru screen-4.0.3/doc/screen.info screen-4.1.0~20120320gitdb59704/doc/screen.info --- screen-4.0.3/doc/screen.info 2003-12-05 13:52:07.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/screen.info 1970-01-01 00:00:00.000000000 +0000 @@ -1,198 +0,0 @@ -This is screen.info, produced by makeinfo version 4.5 from -./screen.texinfo. - -INFO-DIR-SECTION General Commands -START-INFO-DIR-ENTRY -* Screen: (screen). Full-screen window manager. -END-INFO-DIR-ENTRY - - This file documents the `Screen' virtual terminal manager. - - Copyright (c) 1993-2003 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Foundation. - - -Indirect: -screen.info-1: 995 -screen.info-2: 46865 -screen.info-3: 92444 -screen.info-4: 140698 -screen.info-5: 190096 - -Tag Table: -(Indirect) -Node: Top995 -Node: Overview3003 -Node: Getting Started6633 -Node: Invoking Screen8387 -Node: Customization17073 -Node: Startup Files17619 -Node: Source19265 -Node: Colon19950 -Node: Commands20564 -Node: Default Key Bindings21521 -Node: Command Summary27200 -Node: New Window41325 -Node: Chdir42126 -Node: Screen Command43097 -Node: Setenv44798 -Node: Shell45318 -Node: Term46084 -Node: Window Types46865 -Node: Selecting51188 -Node: Next and Previous51818 -Node: Other Window52348 -Node: Select52756 -Node: Windowlist53571 -Node: Session Management54666 -Node: Detach55495 -Node: Power Detach56882 -Node: Lock57523 -Node: Multiuser Session58409 -Node: Multiuser59371 -Node: Acladd59758 -Node: Aclchg60323 -Node: Acldel61730 -Node: Aclgrp62065 -Node: Displays62716 -Node: Umask63010 -Node: Wall63959 -Node: Writelock64196 -Node: Su65092 -Node: Session Name65892 -Node: Suspend66439 -Node: Quit66771 -Node: Regions67195 -Node: Split67762 -Node: Focus68052 -Node: Only68630 -Node: Remove68794 -Node: Resize69002 -Node: Caption69650 -Node: Fit70407 -Node: Window Settings70709 -Node: Naming Windows71444 -Node: Title Command72945 -Node: Dynamic Titles73219 -Node: Title Prompts74755 -Node: Title Screenrc75836 -Node: Console77475 -Node: Kill77918 -Node: Login78807 -Node: Mode79624 -Node: Monitor80022 -Node: Windows81433 -Node: Hardstatus82493 -Node: Virtual Terminal83686 -Node: Control Sequences84744 -Node: Input Translation92444 -Node: Digraph96915 -Node: Bell97707 -Node: Clear99586 -Node: Info99789 -Node: Redisplay101818 -Node: Wrap103121 -Node: Reset103872 -Node: Window Size104190 -Node: Character Processing105043 -Node: Copy and Paste109368 -Node: Copy109973 -Node: Line Termination110820 -Node: Scrollback111229 -Node: Copy Mode Keys111966 -Node: Movement112780 -Node: Marking113985 -Node: Repeat count114360 -Node: Searching114674 -Node: Specials115066 -Node: Paste117020 -Node: Registers120075 -Node: Screen Exchange120868 -Node: History122273 -Node: Subprocess Execution123013 -Node: Exec123377 -Node: Using Exec125123 -Node: Key Binding126962 -Node: Bind127605 -Node: Bind Examples128849 -Node: Command Character129905 -Node: Help131540 -Node: Bindkey132148 -Node: Bindkey Examples133698 -Node: Bindkey Control134587 -Node: Flow Control135184 -Node: Flow Control Summary135760 -Node: Flow138694 -Node: XON/XOFF139468 -Node: Termcap139841 -Node: Window Termcap140698 -Node: Dump Termcap146059 -Node: Termcap Syntax146773 -Node: Termcap Examples148939 -Node: Special Capabilities150980 -Node: Autonuke153755 -Node: Obuflimit154405 -Node: Character Translation155234 -Node: Message Line157848 -Node: Privacy Message158759 -Node: Hardware Status Line159256 -Node: Last Message160959 -Node: Message Wait161386 -Node: Logging161812 -Node: Hardcopy162136 -Node: Log163071 -Node: Startup164848 -Node: echo165255 -Node: sleep165663 -Node: Startup Message166004 -Node: Miscellaneous166277 -Node: At167716 -Node: Break169686 -Node: Debug171332 -Node: License171809 -Node: Nethack172074 -Node: Nonblock172751 -Node: Number173730 -Node: Silence174100 -Node: Time175036 -Node: Verbose175628 -Node: Version175962 -Node: Zombie176171 -Node: Printcmd177225 -Node: Sorendition177931 -Node: Attrcolor178361 -Node: Setsid179411 -Node: Eval179928 -Node: Maxwin180137 -Node: Backtick180407 -Node: Screen Saver181654 -Node: Zmodem182779 -Node: String Escapes183664 -Node: Environment189000 -Node: Files190096 -Node: Credits191184 -Node: Bugs193195 -Node: Known Bugs193665 -Node: Reporting Bugs195759 -Node: Availability196525 -Node: Installation197069 -Node: Socket Directory197459 -Node: Compiling Screen197989 -Node: Concept Index199376 -Node: Command Index201468 -Node: Keystroke Index210715 - -End Tag Table diff -Nru screen-4.0.3/doc/screen.info-1 screen-4.1.0~20120320gitdb59704/doc/screen.info-1 --- screen-4.0.3/doc/screen.info-1 2003-12-05 13:52:07.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/screen.info-1 1970-01-01 00:00:00.000000000 +0000 @@ -1,1447 +0,0 @@ -This is screen.info, produced by makeinfo version 4.5 from -./screen.texinfo. - -INFO-DIR-SECTION General Commands -START-INFO-DIR-ENTRY -* Screen: (screen). Full-screen window manager. -END-INFO-DIR-ENTRY - - This file documents the `Screen' virtual terminal manager. - - Copyright (c) 1993-2003 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Foundation. - - -File: screen.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) - -Screen -****** - - This file documents the `Screen' virtual terminal manager, version -4.0.2. - -* Menu: - -* Overview:: Preliminary information. -* Getting Started:: An introduction to `screen'. -* Invoking Screen:: Command line options for `screen'. -* Customization:: The `.screenrc' file. -* Commands:: List all of the commands. -* New Window:: Running a program in a new window. -* Selecting:: Selecting a window to display. -* Session Management:: Suspend/detach, grant access, connect sessions. -* Regions:: Split-screen commands. -* Window Settings:: Titles, logging, etc. -* Virtual Terminal:: Controlling the `screen' VT100 emulation. -* Copy and Paste:: Exchanging text between windows and sessions. -* Subprocess Execution:: I/O filtering with `exec'. -* Key Binding:: Binding commands to keys. -* Flow Control:: Trap or pass flow control characters. -* Termcap:: Tweaking your terminal's termcap entry. -* Message Line:: The `screen' message line. -* Logging:: Keeping a record of your session. -* Startup:: Functions only useful at `screen' startup. -* Miscellaneous:: Various other commands. -* String Escapes:: Inserting current information into strings -* Environment:: Environment variables used by `screen'. -* Files:: Files used by `screen'. -* Credits:: Who's who of `screen'. -* Bugs:: What to do if you find a bug. -* Installation:: Getting `screen' running on your system. -* Concept Index:: Index of concepts. -* Command Index:: Index of all `screen' commands. -* Keystroke Index:: Index of default key bindings. - - -File: screen.info, Node: Overview, Next: Getting Started, Prev: Top, Up: Top - -Overview -******** - - Screen is a full-screen window manager that multiplexes a physical -terminal between several processes, typically interactive shells. Each -virtual terminal provides the functions of the DEC VT100 terminal and, -in addition, several control functions from the ISO 6429 (ECMA 48, ANSI -X3.64) and ISO 2022 standards (e.g. insert/delete line and support for -multiple character sets). There is a scrollback history buffer for -each virtual terminal and a copy-and-paste mechanism that allows the -user to move text regions between windows. - - When `screen' is called, it creates a single window with a shell in -it (or the specified command) and then gets out of your way so that you -can use the program as you normally would. Then, at any time, you can -create new (full-screen) windows with other programs in them (including -more shells), kill the current window, view a list of the active -windows, turn output logging on and off, copy text between windows, view -the scrollback history, switch between windows, etc. All windows run -their programs completely independent of each other. Programs continue -to run when their window is currently not visible and even when the -whole screen session is detached from the user's terminal. - - When a program terminates, `screen' (per default) kills the window -that contained it. If this window was in the foreground, the display -switches to the previously displayed window; if none are left, `screen' -exits. - - Everything you type is sent to the program running in the current -window. The only exception to this is the one keystroke that is used to -initiate a command to the window manager. By default, each command -begins with a control-a (abbreviated `C-a' from now on), and is -followed by one other keystroke. The command character (*note Command -Character::) and all the key bindings (*note Key Binding::) can be fully -customized to be anything you like, though they are always two -characters in length. - - `Screen' does not understand the prefix `C-' to mean control. -Please use the caret notation (`^A' instead of `C-a') as arguments to -e.g. the `escape' command or the `-e' option. `Screen' will also print -out control characters in caret notation. - - The standard way to create a new window is to type `C-a c'. This -creates a new window running a shell and switches to that window -immediately, regardless of the state of the process running in the -current window. Similarly, you can create a new window with a custom -command in it by first binding the command to a keystroke (in your -`.screenrc' file or at the `C-a :' command line) and then using it just -like the `C-a c' command. In addition, new windows can be created by -running a command like: - - screen emacs prog.c - -from a shell prompt within a previously created window. This will not -run another copy of `screen', but will instead supply the command name -and its arguments to the window manager (specified in the $STY -environment variable) who will use it to create the new window. The -above example would start the `emacs' editor (editing `prog.c') and -switch to its window. - - If `/etc/utmp' is writable by `screen', an appropriate record will -be written to this file for each window, and removed when the window is -closed. This is useful for working with `talk', `script', `shutdown', -`rsend', `sccs' and other similar programs that use the utmp file to -determine who you are. As long as `screen' is active on your terminal, -the terminal's own record is removed from the utmp file. *Note Login::. - - -File: screen.info, Node: Getting Started, Next: Invoking Screen, Prev: Overview, Up: Top - -Getting Started -*************** - - Before you begin to use `screen' you'll need to make sure you have -correctly selected your terminal type, just as you would for any other -termcap/terminfo program. (You can do this by using `tset', `qterm', -or just `set term=mytermtype', for example.) - - If you're impatient and want to get started without doing a lot more -reading, you should remember this one command: `C-a ?' (*note Key -Binding::). Typing these two characters will display a list of the -available `screen' commands and their bindings. Each keystroke is -discussed in the section on keystrokes (*note Default Key Bindings::). -Another section (*note Customization::) deals with the contents of your -`.screenrc'. - - If your terminal is a "true" auto-margin terminal (it doesn't allow -the last position on the screen to be updated without scrolling the -screen) consider using a version of your terminal's termcap that has -automatic margins turned _off_. This will ensure an accurate and -optimal update of the screen in all circumstances. Most terminals -nowadays have "magic" margins (automatic margins plus usable last -column). This is the VT100 style type and perfectly suited for -`screen'. If all you've got is a "true" auto-margin terminal `screen' -will be content to use it, but updating a character put into the last -position on the screen may not be possible until the screen scrolls or -the character is moved into a safe position in some other way. This -delay can be shortened by using a terminal with insert-character -capability. - - *Note Special Capabilities::, for more information about telling -`screen' what kind of terminal you have. - - -File: screen.info, Node: Invoking Screen, Next: Customization, Prev: Getting Started, Up: Top - -Invoking `Screen' -***************** - - Screen has the following command-line options: - -`-a' - Include _all_ capabilities (with some minor exceptions) in each - window's termcap, even if `screen' must redraw parts of the display - in order to implement a function. - -`-A' - Adapt the sizes of all windows to the size of the display. By - default, `screen' may try to restore its old window sizes when - attaching to resizable terminals (those with `WS' in their - descriptions, e.g. `suncmd' or some varieties of `xterm'). - -`-c FILE' - Use FILE as the user's configuration file instead of the default - of `$HOME/.screenrc'. - -`-d [PID.SESSIONNAME]' -`-D [PID.SESSIONNAME]' - Do not start `screen', but instead detach a `screen' session - running elsewhere (*note Detach::). `-d' has the same effect as - typing `C-a d' from the controlling terminal for the session. - `-D' is the equivalent to the power detach key. If no session can - be detached, this option is ignored. In combination with the - `-r'/`-R' option more powerful effects can be achieved: - - `-d -r' - Reattach a session and if necessary detach it first. - - `-d -R' - Reattach a session and if necessary detach or even create - it first. - - `-d -RR' - Reattach a session and if necessary detach or create it. Use - the first session if more than one session is available. - - `-D -r' - Reattach a session. If necessary detach and logout remotely - first. - - `-D -R' - Attach here and now. In detail this means: If a session is - running, then reattach. If necessary detach and logout - remotely first. If it was not running create it and notify - the user. This is the author's favorite. - - `-D -RR' - Attach here and now. Whatever that means, just do it. - - _Note_: It is a good idea to check the status of your sessions - with `screen -list' before using this option. - -`-e XY' - Set the command character to X, and the character generating a - literal command character (when typed after the command character) - to Y. The defaults are `C-a' and `a', which can be specified as - `-e^Aa'. When creating a `screen' session, this option sets the - default command character. In a multiuser session all users added - will start off with this command character. But when attaching to - an already running session, this option only changes the command - character of the attaching user. This option is equivalent to the - commands `defescape' or `escape' respectively. (*note Command - Character::). - -`-f' -`-fn' -`-fa' - Set flow-control to on, off, or automatic switching mode, - respectively. This option is equivalent to the `defflow' command - (*note Flow Control::). - -`-h NUM' - Set the history scrollback buffer to be NUM lines high. - Equivalent to the `defscrollback' command (*note Copy::). - -`-i' - Cause the interrupt key (usually `C-c') to interrupt the display - immediately when flow control is on. This option is equivalent to - the `interrupt' argument to the `defflow' command (*note Flow - Control::). Its use is discouraged. - -`-l' -`-ln' - Turn login mode on or off (for `/etc/utmp' updating). This option - is equivalent to the `deflogin' command (*note Login::). - -`-ls [MATCH]' -`-list [MATCH]' - Do not start `screen', but instead print a list of session - identification strings (usually of the form PID.TTY.HOST; *note - Session Name::). Sessions marked `detached' can be resumed with - `screen -r'. Those marked `attached' are running and have a - controlling terminal. If the session runs in multiuser mode, it - is marked `multi'. Sessions marked as `unreachable' either live - on a different host or are dead. An unreachable session is - considered dead, when its name matches either the name of the - local host, or the specified parameter, if any. See the `-r' flag - for a description how to construct matches. Sessions marked as - `dead' should be thoroughly checked and removed. Ask your system - administrator if you are not sure. Remove sessions with the - `-wipe' option. - -`-L' - Tell `screen' to turn on automatic output logging for the windows. - -`-m' - Tell `screen' to ignore the `$STY' environment variable. When - this option is used, a new session will always be created, - regardless of whether `screen' is being called from within another - `screen' session or not. This flag has a special meaning in - connection with the `-d' option: - `-d -m' - Start `screen' in _detached_ mode. This creates a new session - but doesn't attach to it. This is useful for system startup - scripts. - - `-D -m' - This also starts `screen' in _detached_ mode, but doesn't fork - a new process. The command exits if the session terminates. - -`-p NAME_OR_NUMBER' - Preselect a window. This is usefull when you want to reattach to a - specific windor or you want to send a command via the `-X' option - to a specific window. As with screen's select commant, `-' selects - the blank window. As a special case for reattach, `=' brings up - the windowlist on the blank window. - -`-q' - Suppress printing of error messages. In combination with `-ls' the - exit value is set as follows: 9 indicates a directory without - sessions. 10 indicates a directory with running but not attachable - sessions. 11 (or more) indicates 1 (or more) usable sessions. In - combination with `-r' the exit value is as follows: 10 indicates - that there is no session to resume. 12 (or more) indicates that - there are 2 (or more) sessions to resume and you should specify - which one to choose. In all other cases `-q' has no effect. - -`-r [PID.SESSIONNAME]' -`-r SESSIONOWNER/[PID.SESSIONNAME]' - Resume a detached `screen' session. No other options (except - combinations with `-d' or `-D') may be specified, though the - session name (*note Session Name::) may be needed to distinguish - between multiple detached `screen' sessions. The second form is - used to connect to another user's screen session which runs in - multiuser mode. This indicates that screen should look for - sessions in another user's directory. This requires setuid-root. - -`-R' - Resume the first appropriate detached `screen' session. If - successful, all other command-line options are ignored. If no - detached session exists, start a new session using the specified - options, just as if `-R' had not been specified. This option is - set by default if screen is run as a login-shell (actually screen - uses `-xRR' in that case). For combinations with the `-D'/`-d' - option see there. - -`-s PROGRAM' - Set the default shell to be PROGRAM. By default, `screen' uses - the value of the environment variable `$SHELL', or `/bin/sh' if it - is not defined. This option is equivalent to the `shell' command - (*note Shell::). - -`-S SESSIONNAME' - Set the name of the new session to SESSIONNAME. This option can - be used to specify a meaningful name for the session in place of - the default TTY.HOST suffix. This name identifies the session for - the `screen -list' and `screen -r' commands. This option is - equivalent to the `sessionname' command (*note Session Name::). - -`-t NAME' - Set the title (name) for the default shell or specified program. - This option is equivalent to the `shelltitle' command (*note - Shell::). - -`-U' - Run screen in UTF-8 mode. This option tells screen that your - terminal sends and understands UTF-8 encoded characters. It also - sets the default encoding for new windows to `utf8'. - -`-v' - Print the version number. - -`-wipe [MATCH]' - List available screens like `screen -ls', but remove destroyed - sessions instead of marking them as `dead'. An unreachable - session is considered dead, when its name matches either the name - of the local host, or the explicitly given parameter, if any. See - the `-r' flag for a description how to construct matches. - -`-x' - Attach to a session which is already attached elsewhere - (multi-display mode). - -`-X' - Send the specified command to a running screen session. You can use - the `-d' or `-r' option to tell screen to look only for attached - or detached screen sessions. Note that this command doesn't work - if the session is password protected. - - - -File: screen.info, Node: Customization, Next: Commands, Prev: Invoking Screen, Up: Top - -Customizing `Screen' -******************** - - You can modify the default settings for `screen' to fit your tastes -either through a personal `.screenrc' file which contains commands to -be executed at startup, or on the fly using the `colon' command. - -* Menu: - -* Startup Files:: The `.screenrc' file. -* Source:: Read commands from a file. -* Colon:: Entering customization commands interactively. - - -File: screen.info, Node: Startup Files, Next: Source, Up: Customization - -The `.screenrc' file -==================== - - When `screen' is invoked, it executes initialization commands from -the files `.screenrc' in the user's home directory and -`/usr/local/etc/screenrc'. These defaults can be overridden in the -following ways: For the global screenrc file `screen' searches for the -environment variable `$SYSSCREENRC' (this override feature may be -disabled at compile-time). The user specific screenrc file is searched -for in `$SCREENRC', then ``$HOME'/.screenrc'. The command line option -`-c' specifies which file to use (*note Invoking Screen::. Commands in -these files are used to set options, bind commands to keys, and to -automatically establish one or more windows at the beginning of your -`screen' session. Commands are listed one per line, with empty lines -being ignored. A command's arguments are separated by tabs or spaces, -and may be surrounded by single or double quotes. A `#' turns the rest -of the line into a comment, except in quotes. Unintelligible lines are -warned about and ignored. Commands may contain references to -environment variables. The syntax is the shell-like `$VAR' or -`${VAR}'. Note that this causes incompatibility with previous `screen' -versions, as now the '$'-character has to be protected with '\' if no -variable substitution is intended. A string in single-quotes is also -protected from variable substitution. - - Two configuration files are shipped as examples with your screen -distribution: `etc/screenrc' and `etc/etcscreenrc'. They contain a -number of useful examples for various commands. - - -File: screen.info, Node: Source, Next: Colon, Prev: Startup Files, Up: Customization - -Source -====== - - - Command: source file - (none) - Read and execute commands from file FILE. Source commands may be - nested to a maximum recursion level of ten. If FILE is not an - absolute path and screen is already processing a source - command, the parent directory of the running source command file - is used to search for the new command file before screen's - current directory. - - Note that termcap/terminfo/termcapinfo commands only work at - startup and reattach time, so they must be reached via the - default screenrc files to have an effect. - - -File: screen.info, Node: Colon, Prev: Source, Up: Customization - -Colon -===== - - Customization can also be done online, with this command: - - - Command: colon - (`C-a :') - Allows you to enter `.screenrc' command lines. Useful for - on-the-fly modification of key bindings, specific window creation - and changing settings. Note that the `set' keyword no longer - exists, as of version 3.3. Change default settings with commands - starting with `def'. You might think of this as the `ex' command - mode of `screen', with `copy' as its `vi' command mode (*note Copy - and Paste::). - - -File: screen.info, Node: Commands, Next: New Window, Prev: Customization, Up: Top - -Commands -******** - - A command in `screen' can either be bound to a key, invoked from a -screenrc file, or called from the `colon' prompt (*note -Customization::). As of version 3.3, all commands can be bound to -keys, although some may be less useful than others. For a number of -real life working examples of the most important commands see the files -`etc/screenrc' and `etc/etcscreenrc' of your screen distribution. - - In this manual, a command definition looks like this: - -- Command: command [-n] ARG1 [ARG2] ... - (KEYBINDINGS) - This command does something, but I can't remember what. - - An argument in square brackets (`[]') is optional. Many commands -take an argument of `on' or `off', which is indicated as STATE in the -definition. - -* Menu: - -* Default Key Bindings:: `screen' keyboard commands. -* Command Summary:: List of all commands. - - -File: screen.info, Node: Default Key Bindings, Next: Command Summary, Up: Commands - -Default Key Bindings -==================== - - As mentioned previously, each keyboard command consists of a `C-a' -followed by one other character. For your convenience, all commands -that are bound to lower-case letters are also bound to their control -character counterparts (with the exception of `C-a a'; see below). -Thus, both `C-a c' and `C-a C-c' can be used to create a window. - - The following table shows the default key bindings: - -`C-a '' - (select) - Prompt for a window identifier and switch. *Note Selecting::. - -`C-a "' - (windowlist -b) - Present a list of all windows for selection. *Note Selecting::. - -`C-a 0...9, -' - (select 0...select 9, select -) - Switch to window number 0...9, or the blank window. *Note - Selecting::. - -`C-a ' - (focus) - Switch the input focus to the next region. *Note Regions::. - -`C-a C-a' - (other) - Toggle to the window displayed previously. If this window does no - longer exist, `other' has the same effect as `next'. *Note - Selecting::. - -`C-a a' - (meta) - Send the command character (C-a) to window. See `escape' command. - *Note Command Character::. - -`C-a A' - (title) - Allow the user to enter a title for the current window. *Note - Naming Windows::. - -`C-a b' -`C-a C-b' - (break) - Send a break to the tty. *Note Break::. - -`C-a B' - (pow_break) - Close and reopen the tty-line. *Note Break::. - -`C-a c' -`C-a C-c' - (screen) - Create a new window with a shell and switch to that window. *Note - Screen Command::. - -`C-a C' - (clear) - Clear the screen. *Note Clear::. - -`C-a d' -`C-a C-d' - (detach) - Detach `screen' from this terminal. *Note Detach::. - -`C-a D D' - (pow_detach) - Detach and logout. *Note Power Detach::. - -`C-a f' -`C-a C-f' - (flow) - Cycle flow among `on', `off' or `auto'. *Note Flow::. - -`C-a F' - (fit) - Resize the window to the current region size. *Note Window Size::. - -`C-a C-g' - (vbell) - Toggle visual bell mode. *Note Bell::. - -`C-a h' - (hardcopy) - Write a hardcopy of the current window to the file "hardcopy.N". - *Note Hardcopy::. - -`C-a H' - (log) - Toggle logging of the current window to the file "screenlog.N". - *Note Log::. - -`C-a i' -`C-a C-i' - (info) - Show info about the current window. *Note Info::. - -`C-a k' -`C-a C-k' - (kill) - Destroy the current window. *Note Kill::. - -`C-a l' -`C-a C-l' - (redisplay) - Fully refresh the current window. *Note Redisplay::. - -`C-a L' - (login) - Toggle the current window's login state. *Note Login::. - -`C-a m' -`C-a C-m' - (lastmsg) - Repeat the last message displayed in the message line. *Note Last - Message::. - -`C-a M' - (monitor) Toggle monitoring of the current window. *Note - Monitor::. - -`C-a ' -`C-a n' -`C-a C-n' - (next) - Switch to the next window. *Note Selecting::. - -`C-a N' - (number) - Show the number (and title) of the current window. *Note Number::. - -`C-a p' -`C-a C-p' -`C-a C-h' -`C-a ' - (prev) - Switch to the previous window (opposite of `C-a n'). *Note - Selecting::. - -`C-a q' -`C-a C-q' - (xon) - Send a ^Q (ASCII XON) to the current window. *Note XON/XOFF::. - -`C-a Q' - (only) - Delete all regions but the current one. *Note Regions::. - -`C-a r' -`C-a C-r' - (wrap) - Toggle the current window's line-wrap setting (turn the current - window's automatic margins on or off). *Note Wrap::. - -`C-a s' -`C-a C-s' - (xoff) - Send a ^S (ASCII XOFF) to the current window. *Note XON/XOFF::. - -`C-a S' - (split) - Split the current region into two new ones. *Note Regions::. - -`C-a t' -`C-a C-t' - (time) - Show the load average and xref. *Note Time::. - -`C-a v' - (version) - Display the version and compilation date. *Note Version::. - -`C-a C-v' - (digraph) - Enter digraph. *Note Digraph::. - -`C-a w' -`C-a C-w' - (windows) - Show a list of active windows. *Note Windows::. - -`C-a W' - (width) - Toggle between 80 and 132 columns. *Note Window Size::. - -`C-a x' -`C-a C-x' - (lockscreen) - Lock your terminal. *Note Lock::. - -`C-a X' - (remove) - Kill the current region. *Note Regions::. - -`C-a z' -`C-a C-z' - (suspend) - Suspend `screen'. *Note Suspend::. - -`C-a Z' - (reset) - Reset the virtual terminal to its "power-on" values. *Note - Reset::. - -`C-a .' - (dumptermcap) - Write out a `.termcap' file. *Note Dump Termcap::. - -`C-a ?' - (help) - Show key bindings. *Note Help::. - -`C-a C-\' - (quit) - Kill all windows and terminate `screen'. *Note Quit::. - -`C-a :' - (colon) - Enter a command line. *Note Colon::. - -`C-a [' -`C-a C-[' -`C-a ' - (copy) - Enter copy/scrollback mode. *Note Copy::. - -`C-a ]' -`C-a C-]' - (paste .) - Write the contents of the paste buffer to the stdin queue of the - current window. *Note Paste::. - -`C-a {' -`C-a }' - (history) - Copy and paste a previous (command) line. *Note History::. - -`C-a >' - (writebuf) - Write the paste buffer out to the screen-exchange file. *Note - Screen Exchange::. - -`C-a <' - (readbuf) - Read the screen-exchange file into the paste buffer. *Note Screen - Exchange::. - -`C-a =' - (removebuf) - Delete the screen-exchange file. *Note Screen Exchange::. - -`C-a _' - (silence) - Start/stop monitoring the current window for inactivity. *Note - Silence::, - -`C-a ,' - (license) - Show the copyright page. - -`C-a *' - (displays) - Show the listing of attached displays. - - -File: screen.info, Node: Command Summary, Prev: Default Key Bindings, Up: Commands - -Command Summary -=============== - -`acladd USERNAMES' - Allow other users in this session. *Note Multiuser Session::. - -`aclchg USERNAMES PERMBITS LIST' - Change a user's permissions. *Note Multiuser Session::. - -`acldel USERNAME' - Disallow other user in this session. *Note Multiuser Session::. - -`aclgrp USRNAME [GROUPNAME]' - Inherit permissions granted to a group leader. *Note Multiuser - Session::. - -`aclumask [USERS]+/-BITS ...' - Predefine access to new windows. *Note Umask::. - -`activity MESSAGE' - Set the activity notification message. *Note Monitor::. - -`addacl USERNAMES' - Synonym to `acladd'. *Note Multiuser Session::. - -`allpartial STATE' - Set all windows to partial refresh. *Note Redisplay::. - -`altscreen STATE' - Enables support for the "alternate screen" terminal capability. - *Note Redisplay::. - -`at [IDENT][#|*|%] COMMAND [ARGS]' - Execute a command at other displays or windows. *Note At::. - -`attrcolor ATTRIB [ATTRIBUTE/COLOR-MODIFIER]' - Map attributes to colors. *Note Attrcolor::. - -`autodetach STATE' - Automatically detach the session on SIGHUP. *Note Detach::. - -`autonuke STATE' - Enable a clear screen to discard unwritten output. *Note - Autonuke::. - -`backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]' - Define a command for the backtick string escape. *Note Backtick::. - -`bce [STATE]' - Change background color erase. *Note Character Processing::. - -`bell_msg [MESSAGE]' - Set the bell notification message. *Note Bell::. - -`bind [-c CLASS] KEY [COMMAND [ARGS]]' - Bind a command to a key. *Note Bind::. - -`bindkey [OPTS] [STRING [CMD ARGS]]' - Bind a string to a series of keystrokes. *Note Bindkey::. - -`blanker' - Blank the screen. *Note Screen Saver::. - -`blankerprg' - Define a blanker program. *Note Screen Saver::. - -`break [DURATION]' - Send a break signal to the current window. *Note Break::. - -`breaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]' - Specify how to generate breaks. *Note Break::. - -`bufferfile [EXCHANGE-FILE]' - Select a file for screen-exchange. *Note Screen Exchange::. - -`c1 [STATE]' - Change c1 code processing. *Note Character Processing::. - -`caption MODE [STRING]' - Change caption mode and string. *Note Regions::. - -`chacl USERNAMES PERMBITS LIST' - Synonym to `aclchg'. *Note Multiuser Session::. - -`charset SET' - Change character set slot designation. *Note Character - Processing::. - -`chdir [DIRECTORY]' - Change the current directory for future windows. *Note Chdir::. - -`clear' - Clear the window screen. *Note Clear::. - -`colon' - Enter a `screen' command. *Note Colon::. - -`command [-c CLASS]' - Simulate the screen escape key. *Note Command Character::. - -`compacthist [STATE]' - Selects compaction of trailing empty lines. *Note Scrollback::. - -`console [STATE]' - Grab or ungrab console output. *Note Console::. - -`copy' - Enter copy mode. *Note Copy::. - -`copy_reg [KEY]' - Removed. Use `paste' instead. *Note Registers::. - -`crlf STATE' - Select line break behavior for copying. *Note Line Termination::. - -`debug STATE' - Suppress/allow debugging output. *Note Debug::. - -`defautonuke STATE' - Select default autonuke behavior. *Note Autonuke::. - -`defbce STATE' - Select background color erase. *Note Character Processing::. - -`defbreaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]' - Specify the default for generating breaks. *Note Break::. - -`defc1 STATE' - Select default c1 processing behavior. *Note Character - Processing::. - -`defcharset [SET]' - Change defaul character set slot designation. *Note Character - Processing::. - -`defencoding ENC' - Select default window encoding. *Note Character Processing::. - -`defescape XY' - Set the default command and `meta' characters. *Note Command - Character::. - -`defflow FSTATE' - Select default flow control behavior. *Note Flow::. - -`defgr STATE' - Select default GR processing behavior. *Note Character - Processing::. - -`defhstatus [STATUS]' - Select default window hardstatus line. *Note Hardstatus::. - -`deflog STATE' - Select default window logging behavior. *Note Log::. - -`deflogin STATE' - Select default utmp logging behavior. *Note Login::. - -`defmode MODE' - Select default file mode for ptys. *Note Mode::. - -`defmonitor STATE' - Select default activity monitoring behavior. *Note Monitor::. - -`defnonblock STATE|NUMSECS' - Select default nonblock mode. *Note Nonblock::. - -`defobuflimit LIMIT' - Select default output buffer limit. *Note Obuflimit::. - -`defscrollback NUM' - Set default lines of scrollback. *Note Scrollback::. - -`defshell COMMAND' - Set the default program for new windows. *Note Shell::. - -`defsilence STATE' - Select default idle monitoring behavior. *Note Silence::. - -`defslowpaste MSEC' - Select the default inter-character timeout when pasting. *Note - Paste::. - -`defutf8 STATE' - Select default character encoding. *Note Character Processing::. - -`defwrap STATE' - Set default line-wrapping behavior. *Note Wrap::. - -`defwritelock ON|OFF|AUTO' - Set default writelock behavior. *Note Multiuser Session::. - -`defzombie [KEYS]' - Keep dead windows. *Note Zombie::. - -`detach [-h]' - Disconnect `screen' from the terminal. *Note Detach::. - -`digraph' - Enter digraph sequence. *Note Digraph::. - -`dinfo' - Display terminal information. *Note Info::. - -`displays' - List currently active user interfaces. *Note Displays::. - -`dumptermcap' - Write the window's termcap entry to a file. *Note Dump Termcap::. - -`echo [-n] MESSAGE' - Display a message on startup. *Note Startup::. - -`encoding ENC [DENC]' - Set the encoding of a window. *Note Character Processing::. - -`escape XY' - Set the command and `meta' characters. *Note Command Character::. - -`eval COMMAND1 [COMMAND2 ...]' - Parse and execute each argument. *Note Eval::. - -`exec [[FDPAT] COMMAND [ARGS ...]]' - Run a subprocess (filter). *Note Exec::. - -`fit' - Change window size to current display size. *Note Window Size::. - -`flow [FSTATE]' - Set flow control behavior. *Note Flow::. - -`focus' - Move focus to next region. *Note Regions::. - -`gr [STATE]' - Change GR charset processing. *Note Character Processing::. - -`hardcopy [-h] [FILE]' - Write out the contents of the current window. *Note Hardcopy::. - -`hardcopy_append STATE' - Append to hardcopy files. *Note Hardcopy::. - -`hardcopydir DIRECTORY' - Place, where to dump hardcopy files. *Note Hardcopy::. - -`hardstatus [STATE]' - Use the hardware status line. *Note Hardware Status Line::. - -`height [LINES [COLS]]' - Set display height. *Note Window Size::. - -`help [-c CLASS]' - Display current key bindings. *Note Help::. - -`history' - Find previous command beginning .... *Note History::. - -`hstatus STATUS' - Change the window's hardstatus line. *Note Hardstatus::. - -`idle [TIMEOUT [CMD ARGS]]' - Define a screen saver command. *Note Screen Saver::. - -`ignorecase [STATE]' - Ignore character case in searches. *Note Searching::. - -`info' - Display window settings. *Note Info::. - -`ins_reg [KEY]' - Removed, use `paste' instead. *Note Registers::. - -`kill' - Destroy the current window. *Note Kill::. - -`lastmsg' - Redisplay the last message. *Note Last Message::. - -`license' - Display licensing information. *Note Startup::. - -`lockscreen' - Lock the controlling terminal. *Note Lock::. - -`log [STATE]' - Log all output in the current window. *Note Log::. - -`logfile FILENAME' - Place where to collect logfiles. *Note Log::. - -`login [STATE]' - Log the window in `/etc/utmp'. *Note Login::. - -`logtstamp [STATE]' - Configure logfile time-stamps. *Note Log::. - -`mapdefault' - Use only the default mapping table for the next keystroke. *Note - Bindkey Control::. - -`mapnotnext' - Don't try to do keymapping on the next keystroke. *Note Bindkey - Control::. - -`maptimeout TIMO' - Set the inter-character timeout used for keymapping. *Note Bindkey - Control::. - -`markkeys STRING' - Rebind keys in copy mode. *Note Copy Mode Keys::. - -`maxwin N' - Set the maximum window number. *Note Maxwin::. - -`meta' - Insert the command character. *Note Command Character::. - -`monitor [STATE]' - Monitor activity in window. *Note Monitor::. - -`msgminwait SEC' - Set minimum message wait. *Note Message Wait::. - -`msgwait SEC' - Set default message wait. *Note Message Wait::. - -`multiuser STATE' - Go into single or multi user mode. *Note Multiuser Session::. - -`nethack STATE' - Use `nethack'-like error messages. *Note Nethack::. - -`next' - Switch to the next window. *Note Selecting::. - -`nonblock [STATE|NUMSECS]' - Disable flow control to the current display. *Note - Nonblock::.|NUMSECS] - -`number [N]' - Change/display the current window's number. *Note Number::. - -`obuflimit [LIMIT]' - Select output buffer limit. *Note Obuflimit::. - -`only' - Kill all other regions. *Note Regions::. - -`other' - Switch to the window you were in last. *Note Selecting::. - -`partial STATE' - Set window to partial refresh. *Note Redisplay::. - -`password [CRYPTED_PW]' - Set reattach password. *Note Detach::. - -`paste [SRC_REGS [DEST_REG]]' - Paste contents of paste buffer or registers somewhere. *Note - Paste::. - -`pastefont [STATE]' - Include font information in the paste buffer. *Note Paste::. - -`pow_break' - Close and Reopen the window's terminal. *Note Break::. - -`pow_detach' - Detach and hang up. *Note Power Detach::. - -`pow_detach_msg [MESSAGE]' - Set message displayed on `pow_detach'. *Note Power Detach::. - -`prev' - Switch to the previous window. *Note Selecting::. - -`printcmd [CMD]' - Set a command for VT100 printer port emulation. *Note Printcmd::. - -`process [KEY]' - Treat a register as input to `screen'. *Note Registers::. - -`quit' - Kill all windows and exit. *Note Quit::. - -`readbuf [-e ENCODING] [FILENAME]' - Read the paste buffer from the screen-exchange file. *Note Screen - Exchange::. - -`readreg [-e ENCODING] [REG [FILE]]' - Load a register from paste buffer or file. *Note Registers::. - -`redisplay' - Redisplay the current window. *Note Redisplay::. - -`register [-e ENCODING] KEY STRING' - Store a string to a register. *Note Registers::. - -`remove' - Kill current region. *Note Regions::. - -`removebuf' - Delete the screen-exchange file. *Note Screen Exchange::. - -`reset' - Reset the terminal settings for the window. *Note Reset::. - -`resize [(+/-)lines]' - Grow or shrink a region - -`screen [OPTS] [N] [CMD [ARGS]]' - Create a new window. *Note Screen Command::. - -`scrollback NUM' - Set size of scrollback buffer. *Note Scrollback::. - -`select [N]' - Switch to a specified window. *Note Selecting::. - -`sessionname [NAME]' - Name this session. *Note Session Name::. - -`setenv [VAR [STRING]]' - Set an environment variable for new windows. *Note Setenv::. - -`setsid STATE' - Controll process group creation for windows. *Note Setsid::. - -`shell COMMAND' - Set the default program for new windows. *Note Shell::. - -`shelltitle TITLE' - Set the default name for new windows. *Note Shell::. - -`silence [STATE|SECONDS]' - Monitor a window for inactivity. *Note Silence::. - -`silencewait SECONDS' - Default timeout to trigger an inactivity notify. *Note Silence::. - -`sleep NUM' - Pause during startup. *Note Startup::. - -`slowpaste MSEC' - Slow down pasting in windows. *Note Paste::. - -`source FILE' - Run commands from a file. *Note Source::. - -`sorendition [ATTR [COLOR]]' - Change text highlighting. *Note Sorendition::. - -`split' - Split region into two parts. *Note Regions::. - -`startup_message STATE' - Display copyright notice on startup. *Note Startup::. - -`stuff STRING' - Stuff a string in the input buffer of a window. *Note Paste::. - -`su [USERNAME [PASSWORD [PASSWORD2]]]' - Identify a user. *Note Multiuser Session::. - -`suspend' - Put session in background. *Note Suspend::. - -`term TERM' - Set `$TERM' for new windows. *Note Term::. - -`termcap TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]' - Tweak termcap entries for best performance. *Note Termcap - Syntax::. - -`terminfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]' - Ditto, for terminfo systems. *Note Termcap Syntax::. - -`termcapinfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]' - Ditto, for both systems. *Note Termcap Syntax::. - -`time [STRING]' - Display time and load average. *Note Time::. - -`title [WINDOWTITLE]' - Set the name of the current window. *Note Title Command::. - -`umask [USERS]+/-BITS ...' - Synonym to `aclumask'. *Note Umask::. - -`unsetenv VAR' - Unset environment variable for new windows. *Note Setenv::. - -`utf8 [STATE [DSTATE]]' - Select character encoding of the current window. *Note Character - Processing::. - -`vbell [STATE]' - Use visual bell. *Note Bell::. - -`vbell_msg [MESSAGE]' - Set vbell message. *Note Bell::. - -`vbellwait SEC' - Set delay for vbell message. *Note Bell::. - -`version' - Display `screen' version. *Note Version::. - -`wall MESSAGE' - Write a message to all displays. *Note Multiuser Session::. - -`width [COLS [LINES]]' - Set the width of the window. *Note Window Size::. - -`windowlist [-b] | string [STRING] | title [TITLE]' - Present a list of all windows for selection. *Note Windowlist::. - -`windows' - List active windows. *Note Windows::. - -`wrap [STATE]' - Control line-wrap behavior. *Note Wrap::. - -`writebuf [-e ENCODING] [FILENAME]' - Write paste buffer to screen-exchange file. *Note Screen - Exchange::. - -`writelock ON|OFF|AUTO' - Grant exclusive write permission. *Note Multiuser Session::. - -`xoff' - Send an XOFF character. *Note XON/XOFF::. - -`xon' - Send an XON character. *Note XON/XOFF::. - -`zmodem [off|auto|catch|pass]' - Define how screen treats zmodem requests. *Note Zmodem::. - -`zombie [KEYS]' - Keep dead windows. *Note Zombie::. - - -File: screen.info, Node: New Window, Next: Selecting, Prev: Commands, Up: Top - -New Window -********** - - This section describes the commands for creating a new window for -running programs. When a new window is created, the first available -number from the range 0...9 is assigned to it. The number of windows -is limited at compile-time by the MAXWIN configuration parameter. - -* Menu: - -* Chdir:: Change the working directory for new windows. -* Screen Command:: Create a new window. -* Setenv:: Set environment variables for new windows. -* Shell:: Parameters for shell windows. -* Term:: Set the terminal type for new windows. -* Window Types:: Creating different types of windows. - - -File: screen.info, Node: Chdir, Next: Screen Command, Up: New Window - -Chdir -===== - - - Command: chdir [directory] - (none) - Change the current directory of `screen' to the specified directory - or, if called without an argument, to your home directory (the - value of the environment variable `$HOME'). All windows that are - created by means of the `screen' command from within `.screenrc' - or by means of `C-a : screen ...' or `C-a c' use this as their - default directory. Without a `chdir' command, this would be the - directory from which `screen' was invoked. Hardcopy and log files - are always written to the _window's_ default directory, _not_ the - current directory of the process running in the window. You can - use this command multiple times in your `.screenrc' to start - various windows in different default directories, but the last - `chdir' value will affect all the windows you create interactively. - - -File: screen.info, Node: Screen Command, Next: Setenv, Prev: Chdir, Up: New Window - -Screen Command -============== - - - Command: screen [opts] [n] [cmd [args]] - (`C-a c', `C-a C-c') - Establish a new window. The flow-control options (`-f', `-fn' and - `-fa'), title option (`-t'), login options (`-l' and `-ln') , - terminal type option (`-T TERM'), the all-capability-flag (`-a') - and scrollback option (`-h NUM') may be specified with each - command. The option (`-M') turns monitoring on for this window. - The option (`-L') turns output logging on for this window. If an - optional number N in the range 0...9 is given, the window number N - is assigned to the newly created window (or, if this number is - already in-use, the next available number). If a command is - specified after `screen', this command (with the given arguments) - is started in the window; otherwise, a shell is created. - - Screen has built in some functionality of `cu' and `telnet'. - *Note Window Types::. - - Thus, if your `.screenrc' contains the lines - - # example for .screenrc: - screen 1 - screen -fn -t foobar 2 -L telnet foobar - -`screen' creates a shell window (in window #1) and a window with a -TELNET connection to the machine foobar (with no flow-control using the -title `foobar' in window #2) and will write a logfile `screenlog.2' of -the telnet session. If you do not include any `screen' commands in -your `.screenrc' file, then `screen' defaults to creating a single -shell window, number zero. When the initialization is completed, -`screen' switches to the last window specified in your .screenrc file -or, if none, it opens default window #0. - - -File: screen.info, Node: Setenv, Next: Shell, Prev: Screen Command, Up: New Window - -Setenv -====== - - - Command: setenv var string - (none) - Set the environment variable VAR to value STRING. If only VAR is - specified, the user will be prompted to enter a value. If no - parameters are specified, the user will be prompted for both - variable and value. The environment is inherited by all - subsequently forked shells. - - - Command: unsetenv var - (none) - Unset an environment variable. - - -File: screen.info, Node: Shell, Next: Term, Prev: Setenv, Up: New Window - -Shell -===== - - - Command: shell command - - Command: defshell command - (none) - Set the command to be used to create a new shell. This overrides - the value of the environment variable `$SHELL'. This is useful if - you'd like to run a tty-enhancer which is expecting to execute the - program specified in `$SHELL'. If the command begins with a `-' - character, the shell will be started as a login-shell. - - `defshell' is currently a synonym to the `shell' command. - - - Command: shelltitle title - (none) - Set the title for all shells created during startup or by the C-a - C-c command. *Note Naming Windows::, for details about what - titles are. - - -File: screen.info, Node: Term, Next: Window Types, Prev: Shell, Up: New Window - -Term -==== - - - Command: term term - (none) - In each window `screen' opens, it sets the `$TERM' variable to - `screen' by default, unless no description for `screen' is - installed in the local termcap or terminfo data base. In that - case it pretends that the terminal emulator is `vt100'. This - won't do much harm, as `screen' is VT100/ANSI compatible. The use - of the `term' command is discouraged for non-default purpose. - That is, one may want to specify special `$TERM' settings (e.g. - vt100) for the next `screen rlogin othermachine' command. Use the - command `screen -T vt100 rlogin othermachine' rather than setting - and resetting the default. - diff -Nru screen-4.0.3/doc/screen.info-2 screen-4.1.0~20120320gitdb59704/doc/screen.info-2 --- screen-4.0.3/doc/screen.info-2 2003-12-05 13:52:07.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/screen.info-2 1970-01-01 00:00:00.000000000 +0000 @@ -1,1171 +0,0 @@ -This is screen.info, produced by makeinfo version 4.5 from -./screen.texinfo. - -INFO-DIR-SECTION General Commands -START-INFO-DIR-ENTRY -* Screen: (screen). Full-screen window manager. -END-INFO-DIR-ENTRY - - This file documents the `Screen' virtual terminal manager. - - Copyright (c) 1993-2003 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Foundation. - - -File: screen.info, Node: Window Types, Prev: Term, Up: New Window - -Window Types -============ - - Screen provides three different window types. New windows are created -with `screen''s `screen' command (*note Screen Command::). The first -parameter to the `screen' command defines which type of window is -created. The different window types are all special cases of the normal -type. They have been added in order to allow `screen' to be used -efficiently as a console with 100 or more windows. - * The normal window contains a shell (default, if no parameter is - given) or any other system command that could be executed from a - shell. (e.g. `slogin', etc...). - - * If a tty (character special device) name (e.g. `/dev/ttya') is - specified as the first parameter, then the window is directly - connected to this device. This window type is similar to `screen - cu -l /dev/ttya'. Read and write access is required on the device - node, an exclusive open is attempted on the node to mark the - connection line as busy. An optional parameter is allowed - consisting of a comma separated list of flags in the notation used - by `stty(1)': - `' - Usually 300, 1200, 9600 or 19200. This affects transmission - as well as receive speed. - - `cs8 or cs7' - Specify the transmission of eight (or seven) bits per byte. - - `ixon or -ixon' - Enables (or disables) software flow-control (CTRL-S/CTRL-Q) - for sending data. - - `ixoff or -ixoff' - Enables (or disables) software flow-control for receiving - data. - - `istrip or -istrip' - Clear (or keep) the eight bit in each received byte. - - You may want to specify as many of these options as applicable. - Unspecified options cause the terminal driver to make up the - parameter values of the connection. These values are system - dependant and may be in defaults or values saved from a previous - connection. - - For tty windows, the `info' command shows some of the modem - control lines in the status line. These may include `RTS', `CTS', - `DTR', `CD' and more. This depends rather on on the available - `ioctl()''s and system header files than on the physical - capabilities of the serial board. The name of a logical low - (inactive) signal is preceded by an exclamation mark (`!'), - otherwise the signal is logical high (active). Unsupported but - shown signals are usually shown low. When the `CLOCAL' status bit - is true, the whole set of modem signals is placed inside curly - braces (`{' and `}'). When the `CRTSCTS' or `TIOCSOFTCAR' bit is - true, the signals `CTS' or `CD' are shown in parenthesis, - respectively. - - For tty windows, the command `break' causes the Data transmission - line (TxD) to go low for a specified period of time. This is - expected to be interpreted as break signal on the other side. No - data is sent and no modem control line is changed when a `break' - is issued. - - * If the first parameter is `//telnet', the second parameter is - expected to be a host name, and an optional third parameter may - specify a TCP port number (default decimal 23). Screen will - connect to a server listening on the remote host and use the - telnet protocol to communicate with that server. - - For telnet windows, the command `info' shows details about the - connection in square brackets (`[' and `]') at the end of the - status line. - `b' - BINARY. The connection is in binary mode. - - `e' - ECHO. Local echo is disabled. - - `c' - SGA. The connection is in `character mode' (default: `line - mode'). - - `t' - TTYPE. The terminal type has been requested by the remote - host. Screen sends the name `screen' unless instructed - otherwise (see also the command `term'). - - `w' - NAWS. The remote site is notified about window size changes. - - `f' - LFLOW. The remote host will send flow control information. - (Ignored at the moment.) - Additional flags for debugging are `x', `t' and `n' (XDISPLOC, - TSPEED and NEWENV). - - For telnet windows, the command `break' sends the telnet code `IAC - BREAK' (decimal 243) to the remote host. - - - -File: screen.info, Node: Selecting, Next: Session Management, Prev: New Window, Up: Top - -Selecting a Window -****************** - - This section describes the commands for switching between windows in -an `screen' session. The windows are numbered from 0 to 9, and are -created in that order by default (*note New Window::). - -* Menu: - -* Next and Previous:: Forward or back one window. -* Other Window:: Switch back and forth between two windows. -* Select:: Switch to a window (and to one after `kill'). -* Windowlist:: Present a list of all windows for selection. - - -File: screen.info, Node: Next and Previous, Next: Other Window, Up: Selecting - -Moving Back and Forth -===================== - - - Command: next - (`C-a ', `C-a n', `C-a C-n') - Switch to the next window. This command can be used repeatedly to - cycle through the list of windows. (On some terminals, C- - generates a NUL character, so you must release the control key - before pressing space.) - - - Command: prev - (`C-a p', `C-a C-p') - Switch to the previous window (the opposite of `C-a n'). - - -File: screen.info, Node: Other Window, Next: Select, Prev: Next and Previous, Up: Selecting - -Other Window -============ - - - Command: other - (`C-a C-a') - Switch to the last window displayed. Note that this command - defaults to the command character typed twice, unless overridden. - For instance, if you use the option `-e]x', this command becomes - `]]' (*note Command Character::). - - -File: screen.info, Node: Select, Next: Windowlist, Prev: Other Window, Up: Selecting - -Select -====== - - - Command: select [n] - (`C-a N', `C-a '') - Switch to the window with the number N. If no window number is - specified, you get prompted for an identifier. This can be a - window name (title) or a number. When a new window is - established, the lowest available number is assigned to this - window. Thus, the first window can be activated by `select 0'; - there can be no more than 10 windows present simultaneously - (unless screen is compiled with a higher MAXWIN setting). There - are two special arguments, `select -' switches to the internal - blank window and `select .' switches to the current window. The - latter is useful if used with screen's `-X' option. - - - -File: screen.info, Node: Windowlist, Prev: Select, Up: Selecting - -Windowlist -========== - - - Command: windowlist [-b] [-m] - - Command: windowlist string [STRING] - - Command: windowlist title [TITLE] - (`C-a "') - Display all windows in a table for visual window selection. The - desired window can be selected via the standard movement keys - (*note Movement::) and activated via the return key. If the `-b' - option is given, screen will switch to the blank window before - presenting the list, so that the current window is also selectable. - The `-m' option changes the order of the windows, instead of - sorting by window numbers screen uses its internal - most-recently-used list. - - The table format can be changed with the string and title option, - the title is displayed as table heading, while the lines are made - by using the string setting. The default setting is `Num - Name%=Flags' for the title and `%3n %t%=%f' for the lines. See the - string escapes chapter (*note String Escapes::) for more codes - (e.g. color settings). - - - -File: screen.info, Node: Session Management, Next: Regions, Prev: Selecting, Up: Top - -Session Management Commands -*************************** - - Perhaps the most useful feature of `screen' is the way it allows the -user to move a session between terminals, by detaching and reattaching. -This also makes life easier for modem users who have to deal with -unexpected loss of carrier. - -* Menu: - -* Detach:: Disconnect `screen' from your terminal. -* Power Detach:: Detach and log out. -* Lock:: Lock your terminal temporarily. -* Multiuser Session:: Changing number of allowed users. -* Session Name:: Rename your session for later reattachment. -* Suspend:: Suspend your session. -* Quit:: Terminate your session. - - -File: screen.info, Node: Detach, Next: Power Detach, Up: Session Management - -Detach -====== - - - Command: autodetach state - (none) - Sets whether `screen' will automatically detach upon hangup, which - saves all your running programs until they are resumed with a - `screen -r' command. When turned off, a hangup signal will - terminate `screen' and all the processes it contains. Autodetach is - on by default. - - - Command: detach - (`C-a d', `C-a C-d') - Detach the `screen' session (disconnect it from the terminal and - put it into the background). A detached `screen' can be resumed by - invoking `screen' with the `-r' option (*note Invoking Screen::). - The `-h' option tells screen to immediately close the connection - to the terminal (`hangup'). - - - Command: password [crypted_pw] - (none) - Present a crypted password in your `.screenrc' file and screen will - ask for it, whenever someone attempts to resume a detached - session. This is useful, if you have privileged programs running - under `screen' and you want to protect your session from reattach - attempts by users that managed to assume your uid. (I.e. any - superuser.) If no crypted password is specified, screen prompts - twice a password and places its encryption in the paste buffer. - Default is `none', which disables password checking. - - -File: screen.info, Node: Power Detach, Next: Lock, Prev: Detach, Up: Session Management - -Power Detach -============ - - - Command: pow_detach - (`C-a D D') - Mainly the same as `detach', but also sends a HANGUP signal to the - parent process of `screen'. - _Caution_: This will result in a logout if `screen' was started - from your login shell. - - - Command: pow_detach_msg [message] - (none) - The MESSAGE specified here is output whenever a power detach is - performed. It may be used as a replacement for a logout message or - to reset baud rate, etc. Without parameter, the current message - is shown. - - -File: screen.info, Node: Lock, Next: Multiuser Session, Prev: Power Detach, Up: Session Management - -Lock -==== - - - Command: lockscreen - (`C-a x', `C-a C-x') - Call a screenlock program (`/local/bin/lck' or `/usr/bin/lock' or - a builtin, if no other is available). Screen does not accept any - command keys until this program terminates. Meanwhile processes in - the windows may continue, as the windows are in the detached state. - The screenlock program may be changed through the environment - variable `$LOCKPRG' (which must be set in the shell from which - `screen' is started) and is executed with the user's uid and gid. - - Warning: When you leave other shells unlocked and have no password - set on `screen', the lock is void: One could easily re-attach from - an unlocked shell. This feature should rather be called - `lockterminal'. - - -File: screen.info, Node: Multiuser Session, Next: Session Name, Prev: Lock, Up: Session Management - -Multiuser Session -================= - - These commands allow other users to gain access to one single -`screen' session. When attaching to a multiuser `screen' the -sessionname is specified as `username/sessionname' to the `-S' command -line option. `Screen' must be compiled with multiuser support to -enable features described here. - -* Menu: - -* Multiuser:: Enable / Disable multiuser mode. -* Acladd:: Enable a specific user. -* Aclchg:: Change a users permissions. -* Acldel:: Disable a specific user. -* Aclgrp:: Grant a user permissions to other users. -* Displays:: List all active users at their displays. -* Umask:: Predefine access to new windows. -* Wall:: Write a message to all users. -* Writelock:: Grant exclusive window access. -* Su:: Substitute user. - - -File: screen.info, Node: Multiuser, Next: Acladd, Up: Multiuser Session - -Multiuser ---------- - - - Command: multiuser STATE - (none) - Switch between single-user and multi-user mode. Standard screen - operation is single-user. In multi-user mode the commands - `acladd', `aclchg' and `acldel' can be used to enable (and - disable) other users accessing this `screen'. - - -File: screen.info, Node: Acladd, Next: Aclchg, Prev: Multiuser, Up: Multiuser Session - -Acladd ------- - - - Command: acladd USERNAMES - - Command: addacl USERNAMES - (none) - Enable users to fully access this screen session. USERNAMES can be - one user or a comma separated list of users. This command enables - to attach to the `screen' session and performs the equivalent of - `aclchg USERNAMES +rwx "#?"'. To add a user with restricted access, - use the `aclchg' command below. `Addacl' is a synonym to `acladd'. - Multi-user mode only. - - -File: screen.info, Node: Aclchg, Next: Acldel, Prev: Acladd, Up: Multiuser Session - -Aclchg ------- - - - Command: aclchg USERNAMES PERMBITS LIST - - Command: chacl USERNAMES PERMBITS LIST - (none) - Change permissions for a comma separated list of users. - Permission bits are represented as `r', `w' and `x'. Prefixing - `+' grants the permission, `-' removes it. The third parameter is - a comma separated list of commands or windows (specified either by - number or title). The special list `#' refers to all windows, `?' - to all commands. If USERNAMES consists of a single `*', all known - users are affected. A command can be executed when the user has - the `x' bit for it. The user can type input to a window when he - has its `w' bit set and no other user obtains a writelock for this - window. Other bits are currently ignored. To withdraw the - writelock from another user in e.g. window 2: `aclchg USERNAME - -w+w 2'. To allow read-only access to the session: `aclchg - USERNAME -w "#"'. As soon as a user's name is known to screen, he - can attach to the session and (per default) has full permissions - for all command and windows. Execution permission for the acl - commands, `at' and others should also be removed or the user may - be able to regain write permission. `Chacl' is a synonym to - `aclchg'. Multi-user mode only. - - -File: screen.info, Node: Acldel, Next: Aclgrp, Prev: Aclchg, Up: Multiuser Session - -Acldel ------- - - - Command: acldel USERNAME - (none) - Remove a user from screen's access control list. If currently - attached, all the user's displays are detached from the session. - He cannot attach again. Multi-user mode only. - - -File: screen.info, Node: Aclgrp, Next: Displays, Prev: Acldel, Up: Multiuser Session - -Aclgrp ------- - - - Command: aclgrp USERNAME [GROUPNAME] - (none) - Creates groups of users that share common access rights. The name - of the group is the username of the group leader. Each member of - the group inherits the permissions that are granted to the - group leader. That means, if a user fails an access check, another - check is made for the group leader. A user is removed from all - groups the special value `none' is used for GROUPNAME. If the - second parameter is omitted all groups the user is in are listed. - - -File: screen.info, Node: Displays, Next: Umask, Prev: Aclgrp, Up: Multiuser Session - -Displays --------- - - - Command: displays - (`C-a *') - Shows a tabular listing of all currently connected user - front-ends (displays). This is most useful for multiuser - sessions. - - -File: screen.info, Node: Umask, Next: Wall, Prev: Displays, Up: Multiuser Session - -aclumask --------- - - - Command: aclumask [USERS]+/-BITS ... - - Command: umask [USERS]+/-BITS ... - (none) - This specifies the access other users have to windows that will - be created by the caller of the command. USERS may be no, one - or a comma separated list of known usernames. If no users are - specified, a list of all currently known users is assumed. BITS - is any combination of access control bits allowed defined - with the `aclchg' command. The special username `?' predefines the - access that not yet known users will be granted to any - window initially. The special username `??' predefines the access - that not yet known users are granted to any command. Rights of - the special username nobody cannot be changed (see the `su' - command). `Umask' is a synonym to `aclumask'. - - -File: screen.info, Node: Wall, Next: Writelock, Prev: Umask, Up: Multiuser Session - -Wall ----- - - - Command: wall MESSAGE - (none) - Write a message to all displays. The message will appear in the - terminal's status line. - - -File: screen.info, Node: Writelock, Next: Su, Prev: Wall, Up: Multiuser Session - -Writelock ---------- - - - Command: writelock ON|OFF|AUTO - (none) - In addition to access control lists, not all users may be able to - write to the same window at once. Per default, writelock is in - `auto' mode and grants exclusive input permission to the user who - is the first to switch to the particular window. When he leaves - the window, other users may obtain the writelock (automatically). - The writelock of the current window is disabled by the command - `writelock off'. If the user issues the command `writelock on' he - keeps the exclusive write permission while switching to other - windows. - - - Command: defwritelock ON|OFF|AUTO - (none) - Sets the default writelock behavior for new windows. Initially all - windows will be created with no writelocks. - - -File: screen.info, Node: Su, Prev: Writelock, Up: Multiuser Session - -Su --- - - - Command: su [USERNAME [PASSWORD [PASSWORD2]]] - (none) - Substitute the user of a display. The command prompts for all - parameters that are omitted. If passwords are specified as - parameters, they have to be specified un-crypted. The first - password is matched against the systems passwd database, the - second password is matched against the `screen' password as - set with the commands `acladd' or `password'. `Su' may be useful - for the `screen' administrator to test multiuser setups. When - the identification fails, the user has access to the commands - available for user `nobody'. These are `detach', `license', - `version', `help' and `displays'. - - -File: screen.info, Node: Session Name, Next: Suspend, Prev: Multiuser Session, Up: Session Management - -Session Name -============ - - - Command: sessionname [NAME] - (none) - Rename the current session. Note that for `screen -list' the name - shows up with the process-id prepended. If the argument NAME is - omitted, the name of this session is displayed. - _Caution_: The `$STY' environment variable still reflects the old - name. This may result in confusion. The default is constructed - from the tty and host names. - - -File: screen.info, Node: Suspend, Next: Quit, Prev: Session Name, Up: Session Management - -Suspend -======= - - - Command: suspend - (`C-a z', `C-a C-z') - Suspend `screen'. The windows are in the detached state while - `screen' is suspended. This feature relies on the parent shell - being able to do job control. - - -File: screen.info, Node: Quit, Prev: Suspend, Up: Session Management - -Quit -==== - - - Command: quit - (`C-a C-\') - Kill all windows and terminate `screen'. Note that on VT100-style - terminals the keys `C-4' and `C-\' are identical. So be careful - not to type `C-a C-4' when selecting window no. 4. Use the empty - bind command (as in `bind "^\"') to remove a key binding (*note - Key Binding::). - - -File: screen.info, Node: Regions, Next: Window Settings, Prev: Session Management, Up: Top - -Regions -******* - - Screen has the ability to display more than one window on the user's -display. This is done by splitting the screen in regions, which can -contain different windows. - -* Menu: - -* Split:: Split a region into two -* Focus:: Change to the next region -* Only:: Delete all other regions -* Remove:: Delete the current region -* Resize:: Grow or shrink a region -* Caption:: Control the window's caption -* Fit:: Resize a window to fit the region - - -File: screen.info, Node: Split, Next: Focus, Up: Regions - -Split -===== - - - Command: split - (`C-a S') - Split the current region into two new ones. All regions on the - display are resized to make room for the new region. The blank - window is displayed on the new region. - - -File: screen.info, Node: Focus, Next: Only, Prev: Split, Up: Regions - -Focus -===== - - - Command: focus - (`C-a ') - Move the input focus to the next region. This is done in a cyclic - way so that the top region is selected after the bottom one. If no - subcommand is given it defaults to `down'. `up' cycles in the - opposite order, `top' and `bottom' go to the top and bottom region - respectively. Useful bindings are (j and k as in vi) - bind j focus down - bind k focus up - bind t focus top - bind b focus bottom - - -File: screen.info, Node: Only, Next: Remove, Prev: Focus, Up: Regions - -Only -==== - - - Command: only - (`C-a Q') - Kill all regions but the current one. - - -File: screen.info, Node: Remove, Next: Resize, Prev: Only, Up: Regions - -Remove -====== - - - Command: remove - (`C-a X') - Kill the current region. This is a no-op if there is only one - region. - - -File: screen.info, Node: Resize, Next: Caption, Prev: Remove, Up: Regions - -Resize -====== - - - Command: resize [(+/-)LINES] - (none) - Resize the current region. The space will be removed from or added - to the region below or if there's not enough space from the region - above. - resize +N increase current region height by N - resize -N decrease current region height by N - resize N set current region height to N - resize = make all windows equally high - resize max maximize current region height - resize min minimize current region height - - -File: screen.info, Node: Caption, Next: Fit, Prev: Resize, Up: Regions - -Caption -======= - - - Command: caption `always'|`splitonly' [string] - - Command: caption `string' [string] - (none) - This command controls the display of the window captions. Normally - a caption is only used if more than one window is shown on the - display (split screen mode). But if the type is set to `always', - `screen' shows a caption even if only one window is displayed. The - default is `splitonly'. - - The second form changes the text used for the caption. You can use - all string escapes (*note String Escapes::). `Screen' uses a - default of `%3n %t'. - - You can mix both forms by providing the string as an additional - argument. - - -File: screen.info, Node: Fit, Prev: Caption, Up: Regions - -Fit -=== - - - Command: fit - (`C-a F') - Change the window size to the size of the current region. This - command is needed because screen doesn't adapt the window size - automatically if the window is displayed more than once. - - -File: screen.info, Node: Window Settings, Next: Virtual Terminal, Prev: Regions, Up: Top - -Window Settings -*************** - - These commands control the way `screen' treats individual windows in -a session. *Note Virtual Terminal::, for commands to control the -terminal emulation itself. - -* Menu: - -* Naming Windows:: Control the name of the window -* Console:: See the host's console messages -* Kill:: Destroy an unwanted window -* Login:: Control `/etc/utmp' logging -* Mode:: Control the file mode of the pty -* Monitor:: Watch for activity in a window -* Windows:: List the active windows -* Hardstatus:: Set a window's hardstatus line - - -File: screen.info, Node: Naming Windows, Next: Console, Up: Window Settings - -Naming Windows (Titles) -======================= - - You can customize each window's name in the window display (viewed -with the `windows' command (*note Windows::) by setting it with one of -the title commands. Normally the name displayed is the actual command -name of the program created in the window. However, it is sometimes -useful to distinguish various programs of the same name or to change -the name on-the-fly to reflect the current state of the window. - - The default name for all shell windows can be set with the -`shelltitle' command (*note Shell::). You can specify the name you -want for a window with the `-t' option to the `screen' command when the -window is created (*note Screen Command::). To change the name after -the window has been created you can use the title-string escape-sequence -(` k NAME \') and the `title' command (C-a A). The former -can be output from an application to control the window's name under -software control, and the latter will prompt for a name when typed. -You can also bind predefined names to keys with the `title' command to -set things quickly without prompting. - -* Menu: - -* Title Command:: The `title' command. -* Dynamic Titles:: Make shell windows change titles dynamically. -* Title Prompts:: Set up your shell prompt for dynamic Titles. -* Title Screenrc:: Set up Titles in your `.screenrc'. - - -File: screen.info, Node: Title Command, Next: Dynamic Titles, Up: Naming Windows - -Title Command -------------- - - - Command: title [windowtitle] - (`C-a A') - Set the name of the current window to WINDOWTITLE. If no name is - specified, screen prompts for one. - - -File: screen.info, Node: Dynamic Titles, Next: Title Prompts, Prev: Title Command, Up: Naming Windows - -Dynamic Titles --------------- - - `screen' has a shell-specific heuristic that is enabled by setting -the window's name to SEARCH|NAME and arranging to have a null title -escape-sequence output as a part of your prompt. The SEARCH portion -specifies an end-of-prompt search string, while the NAME portion -specifies the default shell name for the window. If the NAME ends in a -`:' `screen' will add what it believes to be the current command -running in the window to the end of the specified name (e.g. NAME:CMD). -Otherwise the current command name supersedes the shell name while it -is running. - - Here's how it works: you must modify your shell prompt to output a -null title-escape-sequence ( k \) as a part of your prompt. -The last part of your prompt must be the same as the string you -specified for the SEARCH portion of the title. Once this is set up, -`screen' will use the title-escape-sequence to clear the previous -command name and get ready for the next command. Then, when a newline -is received from the shell, a search is made for the end of the prompt. -If found, it will grab the first word after the matched string and use -it as the command name. If the command name begins with `!', `%', or -`^', `screen' will use the first word on the following line (if found) -in preference to the just-found name. This helps csh users get more -accurate titles when using job control or history recall commands. - - -File: screen.info, Node: Title Prompts, Next: Title Screenrc, Prev: Dynamic Titles, Up: Naming Windows - -Setting up your prompt for shell titles ---------------------------------------- - - One thing to keep in mind when adding a null title-escape-sequence -to your prompt is that some shells (like the csh) count all the -non-control characters as part of the prompt's length. If these -invisible characters aren't a multiple of 8 then backspacing over a tab -will result in an incorrect display. One way to get around this is to -use a prompt like this: - - set prompt='k\% ' - - The escape-sequence `' not only normalizes the character -attributes, but all the zeros round the length of the invisible -characters up to 8. - - Tcsh handles escape codes in the prompt more intelligently, so you -can specify your prompt like this: - - set prompt="%{\ek\e\\%}\% " - - Bash users will probably want to echo the escape sequence in the -PROMPT_COMMAND: - - PROMPT_COMMAND='echo -n -e "\033k\033\134"' - - (I used `\134' to output a `\' because of a bug in v1.04). - - -File: screen.info, Node: Title Screenrc, Prev: Title Prompts, Up: Naming Windows - -Setting up shell titles in your `.screenrc' -------------------------------------------- - - Here are some .screenrc examples: - - screen -t top 2 nice top - - Adding this line to your .screenrc would start a niced version of the -`top' command in window 2 named `top' rather than `nice'. - - shelltitle '> |csh' - screen 1 - - This file would start a shell using the given shelltitle. The title -specified is an auto-title that would expect the prompt and the typed -command to look something like the following: - - /usr/joe/src/dir> trn - - (it looks after the '> ' for the command name). The window status -would show the name `trn' while the command was running, and revert to -`csh' upon completion. - - bind R screen -t '% |root:' su - - Having this command in your .screenrc would bind the key sequence -`C-a R' to the `su' command and give it an auto-title name of `root:'. -For this auto-title to work, the screen could look something like this: - - % !em - emacs file.c - - Here the user typed the csh history command `!em' which ran the -previously entered `emacs' command. The window status would show -`root:emacs' during the execution of the command, and revert to simply -`root:' at its completion. - - bind o title - bind E title "" - bind u title (unknown) - - The first binding doesn't have any arguments, so it would prompt you -for a title when you type `C-a o'. The second binding would clear an -auto-titles current setting (C-a E). The third binding would set the -current window's title to `(unknown)' (C-a u). - - -File: screen.info, Node: Console, Next: Kill, Prev: Naming Windows, Up: Window Settings - -Console -======= - - - Command: console [STATE] - (none) - Grabs or un-grabs the machines console output to a window. When - the argument is omitted the current state is displayed. _Note_: - Only the owner of `/dev/console' can grab the console output. This - command is only available if the host supports the ioctl - `TIOCCONS'. - - -File: screen.info, Node: Kill, Next: Login, Prev: Console, Up: Window Settings - -Kill -==== - - - Command: kill - (`C-a k', `C-a C-k') - Kill the current window. - If there is an `exec' command running (*note Exec::) then it is - killed. Otherwise the process (e.g. shell) running in the window - receives a `HANGUP' condition, the window structure is removed and - screen (your display) switches to another window. When the last - window is destroyed, `screen' exits. After a kill screen switches - to the previously displayed window. - _Caution_: `emacs' users may find themselves killing their `emacs' - session when trying to delete the current line. For this reason, - it is probably wise to use a different command character (*note - Command Character::) or rebind `kill' to another key sequence, - such as `C-a K' (*note Key Binding::). - - -File: screen.info, Node: Login, Next: Mode, Prev: Kill, Up: Window Settings - -Login -===== - - - Command: deflogin state - (none) - Same as the `login' command except that the default setting for new - windows is changed. This defaults to `on' unless otherwise - specified at compile time (*note Installation::). Both commands - are only present when `screen' has been compiled with utmp support. - - - Command: login [state] - (`C-a L') - Adds or removes the entry in `/etc/utmp' for the current window. - This controls whether or not the window is "logged in". In - addition to this toggle, it is convenient to have "log in" and - "log out" keys. For instance, `bind I login on' and `bind O login - off' will map these keys to be `C-a I' and `C-a O' (*note Key - Binding::). - - -File: screen.info, Node: Mode, Next: Monitor, Prev: Login, Up: Window Settings - -Mode -==== - - - Command: defmode mode - (none) - The mode of each newly allocated pseudo-tty is set to MODE. MODE - is an octal number as used by chmod(1). Defaults to 0622 for - windows which are logged in, 0600 for others (e.g. when `-ln' was - specified for creation, *note Screen Command::). - - -File: screen.info, Node: Monitor, Next: Windows, Prev: Mode, Up: Window Settings - -Monitoring -========== - - - Command: activity message - (none) - When any activity occurs in a background window that is being - monitored, `screen' displays a notification in the message line. - The notification message can be redefined by means of the - `activity' command. Each occurrence of `%' in MESSAGE is replaced - by the number of the window in which activity has occurred, and - each occurrence of `^G' is replaced by the definition for bell in - your termcap (usually an audible bell). The default message is - - 'Activity in window %n' - - Note that monitoring is off for all windows by default, but can be - altered by use of the `monitor' command (`C-a M'). - - - Command: defmonitor state - (none) - Same as the `monitor' command except that the default setting for - new windows is changed. Initial setting is `off'. - - - Command: monitor [state] - (`C-a M') - Toggles monitoring of the current window. When monitoring is - turned on and the affected window is switched into the background, - the activity notification message will be displayed in the status - line at the first sign of output, and the window will also be - marked with an `@' in the window-status display (*note Windows::). - Monitoring defaults to `off' for all windows. - - -File: screen.info, Node: Windows, Next: Hardstatus, Prev: Monitor, Up: Window Settings - -Windows -======= - - - Command: windows - (`C-a w', `C-a C-w') - Uses the message line to display a list of all the windows. Each - window is listed by number with the name of the program running in - the window (or its title). - - The current window is marked with a `*'; the previous window is - marked with a `-'; all the windows that are logged in are marked - with a `$' (*note Login::); a background window that has received - a bell is marked with a `!'; a background window that is being - monitored and has had activity occur is marked with an `@' (*note - Monitor::); a window which has output logging turned on is marked - with `(L)'; windows occupied by other users are marked with `&' or - `&&' if the window is shared by other users; windows in the zombie - state are marked with `Z'. - - If this list is too long to fit on the terminal's status line only - the portion around the current window is displayed. - - -File: screen.info, Node: Hardstatus, Prev: Windows, Up: Window Settings - -Hardstatus -========== - - `Screen' maintains a hardstatus line for every window. If a window -gets selected, the display's hardstatus will be updated to match the -window's hardstatus line. The hardstatus line can be changed with the -ANSI Application Program Command (APC): `ESC_ESC\'. As a -convenience for xterm users the sequence `ESC]0..2;^G' is also -accepted. - - - Command: defhstatus [status] - (none) - The hardstatus line that all new windows will get is set to STATUS. - This command is useful to make the hardstatus of every window - display the window number or title or the like. STATUS may - contain the same directives as in the window messages, but the - directive escape character is `^E' (octal 005) instead of `%'. - This was done to make a misinterpretation of program generated - hardstatus lines impossible. If the parameter STATUS is omitted, - the current default string is displayed. Per default the - hardstatus line of new windows is empty. - - - Command: hstatus status - (none) - Changes the current window's hardstatus line to STATUS. - - -File: screen.info, Node: Virtual Terminal, Next: Copy and Paste, Prev: Window Settings, Up: Top - -Virtual Terminal -**************** - - Each window in a `screen' session emulates a VT100 terminal, with -some extra functions added. The VT100 emulator is hard-coded, no other -terminal types can be emulated. The commands described here modify the -terminal emulation. - -* Menu: - -* Control Sequences:: Details of the internal VT100 emulation. -* Input Translation:: How keystrokes are remapped. -* Digraph:: Entering digraph sequences. -* Bell:: Getting your attention. -* Clear:: Clear the window display. -* Info:: Terminal emulation statistics. -* Redisplay:: When the display gets confusing. -* Wrap:: Automatic margins. -* Reset:: Recovering from ill-behaved applications. -* Window Size:: Changing the size of your terminal. -* Character Processing:: Change the effect of special characters. - - -File: screen.info, Node: Control Sequences, Next: Input Translation, Up: Virtual Terminal - -Control Sequences -================= - - The following is a list of control sequences recognized by `screen'. -`(V)' and `(A)' indicate VT100-specific and ANSI- or ISO-specific -functions, respectively. - - ESC E Next Line - ESC D Index - ESC M Reverse Index - ESC H Horizontal Tab Set - ESC Z Send VT100 Identification String - ESC 7 (V) Save Cursor and Attributes - ESC 8 (V) Restore Cursor and Attributes - ESC [s (A) Save Cursor and Attributes - ESC [u (A) Restore Cursor and Attributes - ESC c Reset to Initial State - ESC g Visual Bell - ESC Pn p Cursor Visibility (97801) - Pn = 6 Invisible - 7 Visible - ESC = (V) Application Keypad Mode - ESC > (V) Numeric Keypad Mode - ESC # 8 (V) Fill Screen with E's - ESC \ (A) String Terminator - ESC ^ (A) Privacy Message String (Message Line) - ESC ! Global Message String (Message Line) - ESC k Title Definition String - ESC P (A) Device Control String - Outputs a string directly to the host - terminal without interpretation. - ESC _ (A) Application Program Command (Hardstatus) - ESC ] 0 ; string ^G (A) Operating System Command (Hardstatus, xterm - title hack) - ESC ] 83 ; cmd ^G (A) Execute screen command. This only works if - multi-user support is compiled into screen. - The pseudo-user ":window:" is used to check - the access control list. Use "addacl :window: - -rwx #?" to create a user with no rights and - allow only the needed commands. - Control-N (A) Lock Shift G1 (SO) - Control-O (A) Lock Shift G0 (SI) - ESC n (A) Lock Shift G2 - ESC o (A) Lock Shift G3 - ESC N (A) Single Shift G2 - ESC O (A) Single Shift G3 - ESC ( Pcs (A) Designate character set as G0 - ESC ) Pcs (A) Designate character set as G1 - ESC * Pcs (A) Designate character set as G2 - ESC + Pcs (A) Designate character set as G3 - ESC [ Pn ; Pn H Direct Cursor Addressing - ESC [ Pn ; Pn f same as above - ESC [ Pn J Erase in Display - Pn = None or 0 From Cursor to End of Screen - 1 From Beginning of Screen to Cursor - 2 Entire Screen - ESC [ Pn K Erase in Line - Pn = None or 0 From Cursor to End of Line - 1 From Beginning of Line to Cursor - 2 Entire Line - ESC [ Pn X Erase character - ESC [ Pn A Cursor Up - ESC [ Pn B Cursor Down - ESC [ Pn C Cursor Right - ESC [ Pn D Cursor Left - ESC [ Pn E Cursor next line - ESC [ Pn F Cursor previous line - ESC [ Pn G Cursor horizontal position - ESC [ Pn ` same as above - ESC [ Pn d Cursor vertical position - ESC [ Ps ;...; Ps m Select Graphic Rendition - Ps = None or 0 Default Rendition - 1 Bold - 2 (A) Faint - 3 (A) Standout Mode (ANSI: Italicized) - 4 Underlined - 5 Blinking - 7 Negative Image - 22 (A) Normal Intensity - 23 (A) Standout Mode off (ANSI: Italicized off) - 24 (A) Not Underlined - 25 (A) Not Blinking - 27 (A) Positive Image - 30 (A) Foreground Black - 31 (A) Foreground Red - 32 (A) Foreground Green - 33 (A) Foreground Yellow - 34 (A) Foreground Blue - 35 (A) Foreground Magenta - 36 (A) Foreground Cyan - 37 (A) Foreground White - 39 (A) Foreground Default - 40 (A) Background Black - ... ... - 49 (A) Background Default - ESC [ Pn g Tab Clear - Pn = None or 0 Clear Tab at Current Position - 3 Clear All Tabs - ESC [ Pn ; Pn r (V) Set Scrolling Region - ESC [ Pn I (A) Horizontal Tab - ESC [ Pn Z (A) Backward Tab - ESC [ Pn L (A) Insert Line - ESC [ Pn M (A) Delete Line - ESC [ Pn @ (A) Insert Character - ESC [ Pn P (A) Delete Character - ESC [ Pn S Scroll Scrolling Region Up - ESC [ Pn T Scroll Scrolling Region Down - ESC [ Pn ^ same as above - ESC [ Ps ;...; Ps h Set Mode - ESC [ Ps ;...; Ps l Reset Mode - Ps = 4 (A) Insert Mode - 20 (A) `Automatic Linefeed' Mode. - 34 Normal Cursor Visibility - ?1 (V) Application Cursor Keys - ?3 (V) Change Terminal Width to 132 columns - ?5 (V) Reverse Video - ?6 (V) `Origin' Mode - ?7 (V) `Wrap' Mode - ?9 X10 mouse tracking - ?25 (V) Visible Cursor - ?47 Alternate Screen (old xterm code) - ?1000 (V) VT200 mouse tracking - ?1047 Alternate Screen (new xterm code) - ?1049 Alternate Screen (new xterm code) - ESC [ 5 i (A) Start relay to printer (ANSI Media Copy) - ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy) - ESC [ 8 ; Ph ; Pw t Resize the window to `Ph' lines and - `Pw' columns (SunView special) - ESC [ c Send VT100 Identification String - ESC [ x (V) Send Terminal Parameter Report - ESC [ > c Send Secondary Device Attributes String - ESC [ 6 n Send Cursor Position Report - diff -Nru screen-4.0.3/doc/screen.info-3 screen-4.1.0~20120320gitdb59704/doc/screen.info-3 --- screen-4.0.3/doc/screen.info-3 2003-12-05 13:52:07.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/screen.info-3 1970-01-01 00:00:00.000000000 +0000 @@ -1,1255 +0,0 @@ -This is screen.info, produced by makeinfo version 4.5 from -./screen.texinfo. - -INFO-DIR-SECTION General Commands -START-INFO-DIR-ENTRY -* Screen: (screen). Full-screen window manager. -END-INFO-DIR-ENTRY - - This file documents the `Screen' virtual terminal manager. - - Copyright (c) 1993-2003 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Foundation. - - -File: screen.info, Node: Input Translation, Next: Digraph, Prev: Control Sequences, Up: Virtual Terminal - -Input Translation -================= - - In order to do a full VT100 emulation `screen' has to detect that a -sequence of characters in the input stream was generated by a keypress -on the user's keyboard and insert the VT100 style escape sequence. -`Screen' has a very flexible way of doing this by making it possible to -map arbitrary commands on arbitrary sequences of characters. For -standard VT100 emulation the command will always insert a string in the -input buffer of the window (see also command `stuff', *note Paste::). -Because the sequences generated by a keypress can change after a -reattach from a different terminal type, it is possible to bind -commands to the termcap name of the keys. `Screen' will insert the -correct binding after each reattach. See *Note Bindkey:: for further -details on the syntax and examples. - - Here is the table of the default key bindings. (A) means that the -command is executed if the keyboard is switched into application mode. - - Key name Termcap name Command - ----------------------------------------------------- - Cursor up ku stuff \033[A - stuff \033OA (A) - Cursor down kd stuff \033[B - stuff \033OB (A) - Cursor right kr stuff \033[C - stuff \033OC (A) - Cursor left kl stuff \033[D - stuff \033OD (A) - Function key 0 k0 stuff \033[10~ - Function key 1 k1 stuff \033OP - Function key 2 k2 stuff \033OQ - Function key 3 k3 stuff \033OR - Function key 4 k4 stuff \033OS - Function key 5 k5 stuff \033[15~ - Function key 6 k6 stuff \033[17~ - Function key 7 k7 stuff \033[18~ - Function key 8 k8 stuff \033[19~ - Function key 9 k9 stuff \033[20~ - Function key 10 k; stuff \033[21~ - Function key 11 F1 stuff \033[23~ - Function key 12 F2 stuff \033[24~ - Home kh stuff \033[1~ - End kH stuff \033[4~ - Insert kI stuff \033[2~ - Delete kD stuff \033[3~ - Page up kP stuff \033[5~ - Page down kN stuff \033[6~ - Keypad 0 f0 stuff 0 - stuff \033Op (A) - Keypad 1 f1 stuff 1 - stuff \033Oq (A) - Keypad 2 f2 stuff 2 - stuff \033Or (A) - Keypad 3 f3 stuff 3 - stuff \033Os (A) - Keypad 4 f4 stuff 4 - stuff \033Ot (A) - Keypad 5 f5 stuff 5 - stuff \033Ou (A) - Keypad 6 f6 stuff 6 - stuff \033Ov (A) - Keypad 7 f7 stuff 7 - stuff \033Ow (A) - Keypad 8 f8 stuff 8 - stuff \033Ox (A) - Keypad 9 f9 stuff 9 - stuff \033Oy (A) - Keypad + f+ stuff + - stuff \033Ok (A) - Keypad - f- stuff - - stuff \033Om (A) - Keypad * f* stuff * - stuff \033Oj (A) - Keypad / f/ stuff / - stuff \033Oo (A) - Keypad = fq stuff = - stuff \033OX (A) - Keypad . f. stuff . - stuff \033On (A) - Keypad , f, stuff , - stuff \033Ol (A) - Keypad enter fe stuff \015 - stuff \033OM (A) - - -File: screen.info, Node: Digraph, Next: Bell, Prev: Input Translation, Up: Virtual Terminal - -Digraph -======= - - - Command: digraph [preset] - (none) - This command prompts the user for a digraph sequence. The next two - characters typed are looked up in a builtin table and the - resulting character is inserted in the input stream. For example, - if the user enters `a"', an a-umlaut will be inserted. If the - first character entered is a 0 (zero), `screen' will treat the - following characters (up to three) as an octal number instead. - The optional argument PRESET is treated as user input, thus one - can create an "umlaut" key. For example the command `bindkey ^K - digraph '"'' enables the user to generate an a-umlaut by typing - `CTRL-K a'. - - -File: screen.info, Node: Bell, Next: Clear, Prev: Digraph, Up: Virtual Terminal - -Bell -==== - - - Command: bell_msg [message] - (none) - When a bell character is sent to a background window, `screen' - displays a notification in the message line. The notification - message can be re-defined by this command. Each occurrence of `%' - in MESSAGE is replaced by the number of the window to which a bell - has been sent, and each occurrence of `^G' is replaced by the - definition for bell in your termcap (usually an audible bell). - The default message is - - 'Bell in window %n' - - An empty message can be supplied to the `bell_msg' command to - suppress output of a message line (`bell_msg ""'). Without - parameter, the current message is shown. - - - Command: vbell [state] - (`C-a C-g') - Sets or toggles the visual bell setting for the current window. If - `vbell' is switched to `on', but your terminal does not support a - visual bell, the visual bell message is displayed in the status - line when the bell character is received. Visual bell support of - a terminal is defined by the termcap variable `vb'. *Note Visual - Bell: (termcap)Bell, for more information on visual bells. The - equivalent terminfo capability is `flash'. - - Per default, `vbell' is `off', thus the audible bell is used. - - - Command: vbell_msg [message] - (none) - Sets the visual bell message. MESSAGE is printed to the status - line if the window receives a bell character (^G), `vbell' is set - to `on' and the terminal does not support a visual bell. The - default message is `Wuff, Wuff!!'. Without parameter, the current - message is shown. - - - Command: vbellwait sec - (none) - Define a delay in seconds after each display of `screen' 's visual - bell message. The default is 1 second. - - -File: screen.info, Node: Clear, Next: Info, Prev: Bell, Up: Virtual Terminal - -Clear -===== - - - Command: clear - (`C-a C') - Clears the screen and saves its contents to the scrollback buffer. - - -File: screen.info, Node: Info, Next: Redisplay, Prev: Clear, Up: Virtual Terminal - -Info -==== - - - Command: info - (`C-a i', `C-a C-i') - Uses the message line to display some information about the current - window: the cursor position in the form `(COLUMN,ROW)' starting - with `(1,1)', the terminal width and height plus the size of the - scrollback buffer in lines, like in `(80,24)+50', the current - state of window XON/XOFF flow control is shown like this (*note - Flow Control::): - +flow automatic flow control, currently on. - -flow automatic flow control, currently off. - +(+)flow flow control enabled. Agrees with automatic control. - -(+)flow flow control disabled. Disagrees with automatic control. - +(-)flow flow control enabled. Disagrees with automatic control. - -(-)flow flow control disabled. Agrees with automatic control. - - The current line wrap setting (`+wrap' indicates enabled, `-wrap' - not) is also shown. The flags `ins', `org', `app', `log', `mon' - and `nored' are displayed when the window is in insert mode, - origin mode, application-keypad mode, has output logging, activity - monitoring or partial redraw enabled. - - The currently active character set (`G0', `G1', `G2', or `G3'), - and in square brackets the terminal character sets that are - currently designated as `G0' through `G3'. If the window is in - UTF-8 mode, the string `UTF-8' is shown instead. Additional modes - depending on the type of the window are displayed at the end of - the status line (*note Window Types::). - - If the state machine of the terminal emulator is in a non-default - state, the info line is started with a string identifying the - current state. - - For system information use `time'. - - - Command: dinfo - (none) - Show what screen thinks about your terminal. Useful if you want to - know why features like color or the alternate charset don't work. - - -File: screen.info, Node: Redisplay, Next: Wrap, Prev: Info, Up: Virtual Terminal - -Redisplay -========= - - - Command: allpartial state - (none) - If set to on, only the current cursor line is refreshed on window - change. This affects all windows and is useful for slow terminal - lines. The previous setting of full/partial refresh for each - window is restored with `allpartial off'. This is a global flag - that immediately takes effect on all windows overriding the - `partial' settings. It does not change the default redraw behavior - of newly created windows. - - - Command: altscreen state - (none) - If set to on, "alternate screen" support is enabled in virtual - terminals, just like in xterm. Initial setting is `off'. - - - Command: partial state - (none) - Defines whether the display should be refreshed (as with - `redisplay') after switching to the current window. This command - only affects the current window. To immediately affect all - windows use the `allpartial' command. Default is `off', of - course. This default is fixed, as there is currently no - `defpartial' command. - - - Command: redisplay - (`C-a l', `C-a C-l') - Redisplay the current window. Needed to get a full redisplay in - partial redraw mode. - - -File: screen.info, Node: Wrap, Next: Reset, Prev: Redisplay, Up: Virtual Terminal - -Wrap -==== - - - Command: wrap state - (`C-a r', `C-a C-r') - Sets the line-wrap setting for the current window. When line-wrap - is on, the second consecutive printable character output at the - last column of a line will wrap to the start of the following - line. As an added feature, backspace (^H) will also wrap through - the left margin to the previous line. Default is `on'. - - - Command: defwrap state - (none) - Same as the `wrap' command except that the default setting for new - windows is changed. Initially line-wrap is on and can be toggled - with the `wrap' command (`C-a r') or by means of "C-a : wrap - on|off". - - -File: screen.info, Node: Reset, Next: Window Size, Prev: Wrap, Up: Virtual Terminal - -Reset -===== - - - Command: reset - (`C-a Z') - Reset the virtual terminal to its "power-on" values. Useful when - strange settings (like scroll regions or graphics character set) - are left over from an application. - - -File: screen.info, Node: Window Size, Next: Character Processing, Prev: Reset, Up: Virtual Terminal - -Window Size -=========== - - - Command: width [`-w'|`-d'] [cols [lines]] - (`C-a W') - Toggle the window width between 80 and 132 columns, or set it to - COLS columns if an argument is specified. This requires a capable - terminal and the termcap entries `Z0' and `Z1'. See the `termcap' - command (*note Termcap::), for more information. You can also - specify a height if you want to change both values. The `-w' - option tells screen to leave the display size unchanged and just - set the window size, `-d' vice versa. - - - Command: height [`-w'|`-d'] [lines [cols]] - (none) - Set the display height to a specified number of lines. When no - argument is given it toggles between 24 and 42 lines display. - - -File: screen.info, Node: Character Processing, Prev: Window Size, Up: Virtual Terminal - -Character Processing -==================== - - - Command: c1 [state] - (none) - Change c1 code processing. `c1 on' tells screen to treat the input - characters between 128 and 159 as control functions. Such an - 8-bit code is normally the same as ESC followed by the - corresponding 7-bit code. The default setting is to process c1 - codes and can be changed with the `defc1' command. Users with - fonts that have usable characters in the c1 positions may want to - turn this off. - - - - Command: gr [state] - (none) - Turn GR charset switching on/off. Whenever screen sees an input - char with an 8th bit set, it will use the charset stored in the GR - slot and print the character with the 8th bit stripped. The - default (see also `defgr') is not to process GR switching because - otherwise the ISO88591 charset would not work. - - - Command: bce [state] - (none) - Change background-color-erase setting. If `bce' is set to on, all - characters cleared by an erase/insert/scroll/clear operation will - be displayed in the current background color. Otherwise the - default background color is used. - - - Command: encoding enc [denc] - (none) - Tell screen how to interpret the input/output. The first argument - sets the encoding of the current window. Each window can emulate - a different encoding. The optional second parameter overwrites the - encoding of the connected terminal. It should never be needed as - screen uses the locale setting to detect the encoding. There is - also a way to select a terminal encoding depending on the terminal - type by using the `KJ' termcap entry. *Note Special Capabilities::. - - Supported encodings are `eucJP', `SJIS', `eucKR', `eucCN', `Big5', - `GBK', `KOI8-R', `CP1251', `UTF-8', `ISO8859-2', `ISO8859-3', - `ISO8859-4', `ISO8859-5', `ISO8859-6', `ISO8859-7', `ISO8859-8', - `ISO8859-9', `ISO8859-10', `ISO8859-15', `jis'. - - See also `defencoding', which changes the default setting of a new - window. - - - Command: charset set - (none) - Change the current character set slot designation and charset - mapping. The first four character of SET are treated as charset - designators while the fifth and sixth character must be in range - `0' to `3' and set the GL/GR charset mapping. On every position a - `.' may be used to indicate that the corresponding charset/mapping - should not be changed (SET is padded to six characters internally - by appending `.' chars). New windows have `BBBB02' as default - charset, unless a `encoding' command is active. - - The current setting can be viewed with the *Note Info:: command. - - - Command: utf8 [state [dstate]] - (none) - Change the encoding used in the current window. If utf8 is - enabled, the strings sent to the window will be UTF-8 encoded and - vice versa. Omitting the parameter toggles the setting. If a - second parameter is given, the display's encoding is also changed - (this should rather be done with screen's `-U' option). See also - `defutf8', which changes the default setting of a new window. - - - Command: defc1 state - (none) - Same as the `c1' command except that the default setting for new - windows is changed. Initial setting is `on'. - - - Command: defgr state - (none) - Same as the `gr' command except that the default setting for new - windows is changed. Initial setting is `off'. - - - Command: defbce state - (none) - Same as the `bce' command except that the default setting for new - windows is changed. Initial setting is `off'. - - - Command: defencoding enc - (none) - Same as the `encoding' command except that the default setting for - new windows is changed. Initial setting is the encoding taken from - the terminal. - - - Command: defcharset [set] - Like the `charset' command except that the default setting for new - windows is changed. Shows current default if called without - argument. - - - Command: defutf8 state - (none) - Same as the `utf8' command except that the default setting for new - windows is changed. Initial setting is `on' if screen was started - with `-U', otherwise `off'. - - -File: screen.info, Node: Copy and Paste, Next: Subprocess Execution, Prev: Virtual Terminal, Up: Top - -Copy and Paste -************** - - For those confined to a hardware terminal, these commands provide a -cut and paste facility more powerful than those provided by most -windowing systems. - -* Menu: - -* Copy:: Copy from scrollback to buffer -* Paste:: Paste from buffer into window -* Registers:: Longer-term storage -* Screen Exchange:: Sharing data between screen users -* History:: Recalling previous input - - -File: screen.info, Node: Copy, Next: Paste, Up: Copy and Paste - -Copying -======= - - - Command: copy - (`C-a [', `C-a C-[', `C-a ') - Enter copy/scrollback mode. This allows you to copy text from the - current window and its history into the paste buffer. In this mode - a `vi'-like full screen editor is active, with controls as - outlined below. - -* Menu: - -* Line Termination:: End copied lines with CR/LF -* Scrollback:: Set the size of the scrollback buffer -* Copy Mode Keys:: Remap keys in copy mode -* Movement:: Move around in the scrollback buffer -* Marking:: Select the text you want -* Repeat count:: Repeat a command -* Searching:: Find the text you want -* Specials:: Other random keys - - -File: screen.info, Node: Line Termination, Next: Scrollback, Up: Copy - -CR/LF ------ - - - Command: crlf [state] - (none) - This affects the copying of text regions with the `C-a [' command. - If it is set to `on', lines will be separated by the two character - sequence `CR'/`LF'. Otherwise only `LF' is used. `crlf' is off - by default. When no parameter is given, the state is toggled. - - -File: screen.info, Node: Scrollback, Next: Copy Mode Keys, Prev: Line Termination, Up: Copy - -Scrollback ----------- - - - Command: defscrollback num - (none) - Same as the `scrollback' command except that the default setting - for new windows is changed. Defaults to 100. - - - Command: scrollback num - (none) - Set the size of the scrollback buffer for the current window to - NUM lines. The default scrollback is 100 lines. Use `C-a i' to - view the current setting. - - - Command: compacthist [state] - (none) - This tells screen whether to suppress trailing blank lines when - scrolling up text into the history buffer. Turn compacting `on' to - hold more useful lines in your scrollback buffer. - - -File: screen.info, Node: Copy Mode Keys, Next: Movement, Prev: Scrollback, Up: Copy - -markkeys --------- - - - Command: markkeys string - (none) - This is a method of changing the keymap used for copy/history - mode. The string is made up of OLDCHAR=NEWCHAR pairs which are - separated by `:'. Example: The command `markkeys h=^B:l=^F:$=^E' - would set some keys to be more familiar to `emacs' users. If your - terminal sends characters, that cause you to abort copy mode, then - this command may help by binding these characters to do nothing. - The no-op character is `a'nd is used like this: `markkeys @=L=H' - if you do not want to use the `H' or `L' commands any longer. As - shown in this example, multiple keys can be assigned to one - function in a single statement. - - -File: screen.info, Node: Movement, Next: Marking, Prev: Copy Mode Keys, Up: Copy - -Movement Keys -------------- - -`h', `j', `k', `l' move the cursor line by line or column by column. - -`0', `^' and `$' move to the leftmost column or to the first or last -non-whitespace character on the line. - -`H', `M' and `L' move the cursor to the leftmost column of the top, -center or bottom line of the window. - -`+' and `-' move the cursor to the leftmost column of the next or -previous line. - -`G' moves to the specified absolute line (default: end of buffer). - -`|' moves to the specified absolute column. - -`w', `b', `e' move the cursor word by word. - -`B', `E' move the cursor WORD by WORD (as in vi). - -`C-u' and `C-d' scroll the display up/down by the specified amount of -lines while preserving the cursor position. (Default: half screenfull). - -`C-b' and `C-f' move the cursor up/down a full screen. - -`g' moves to the beginning of the buffer. - -`%' jumps to the specified percentage of the buffer. - - Note that Emacs-style movement keys can be specified by a .screenrc -command. (`markkeys "h=^B:l=^F:$=^E"') There is no simple method for a -full emacs-style keymap, however, as this involves multi-character -codes. - - -File: screen.info, Node: Marking, Next: Repeat count, Prev: Movement, Up: Copy - -Marking -------- - - The copy range is specified by setting two marks. The text between -these marks will be highlighted. Press `space' to set the first or -second mark respectively. - -`Y' and `y' can be used to mark one whole line or to mark from start of -line. - -`W' marks exactly one word. - - -File: screen.info, Node: Repeat count, Next: Searching, Prev: Marking, Up: Copy - -Repeat Count ------------- - - Any command in copy mode can be prefixed with a number (by pressing -digits `0...9') which is taken as a repeat count. Example: `C-a C-[ H -10 j 5 Y' will copy lines 11 to 15 into the paste buffer. - - -File: screen.info, Node: Searching, Next: Specials, Prev: Repeat count, Up: Copy - -Searching ---------- - -`/' `vi'-like search forward. - -`?' `vi'-like search backward. - -`C-a s' `emacs' style incremental search forward. - -`C-r' `emacs' style reverse i-search. - - - Command: ignorecase [state] - (none) - Tell screen to ignore the case of characters in searches. Default - is `off'. - - -File: screen.info, Node: Specials, Prev: Searching, Up: Copy - -Specials --------- - - There are, however, some keys that act differently here from in -`vi'. `Vi' does not allow to yank rectangular blocks of text, but -`screen' does. Press - -`c' or `C' to set the left or right margin respectively. If no repeat -count is given, both default to the current cursor position. -Example: Try this on a rather full text screen: `C-a [ M 20 l SPACE c -10 l 5 j C SPACE'. - -This moves one to the middle line of the screen, moves in 20 columns -left, marks the beginning of the paste buffer, sets the left column, -moves 5 columns down, sets the right column, and then marks the end of -the paste buffer. Now try: -`C-a [ M 20 l SPACE 10 l 5 j SPACE' - -and notice the difference in the amount of text copied. - -`J' joins lines. It toggles between 4 modes: lines separated by a -newline character (012), lines glued seamless, lines separated by a -single space or comma separated lines. Note that you can prepend the -newline character with a carriage return character, by issuing a `set -crlf on'. - -`v' is for all the `vi' users who use `:set numbers' - it toggles the -left margin between column 9 and 1. - -`a' before the final space key turns on append mode. Thus the contents -of the paste buffer will not be overwritten, but appended to. - -`A' turns on append mode and sets a (second) mark. - -`>' sets the (second) mark and writes the contents of the paste buffer -to the screen-exchange file (`/tmp/screen-exchange' per default) once -copy-mode is finished. *Note Screen Exchange::. -This example demonstrates how to dump the whole scrollback buffer to -that file: -`C-a [ g SPACE G $ >'. - -`C-g' gives information about the current line and column. - -`x' exchanges the first mark and the current cursor position. You can -use this to adjust an already placed mark. - -`@' does nothing. Absolutely nothing. Does not even exit copy mode. - -All keys not described here exit copy mode. - - -File: screen.info, Node: Paste, Next: Registers, Prev: Copy, Up: Copy and Paste - -Paste -===== - - - Command: paste [registers [destination]] - (`C-a ]', `C-a C-]') - Write the (concatenated) contents of the specified registers to - the stdin stream of the current window. The register `.' is - treated as the paste buffer. If no parameter is specified the user - is prompted to enter a single register. The paste buffer can be - filled with the `copy', `history' and `readbuf' commands. Other - registers can be filled with the `register', `readreg' and `paste' - commands. If `paste' is called with a second argument, the - contents of the specified registers is pasted into the named - destination register rather than the window. If `.' is used as the - second argument, the display's paste buffer is the destination. - Note, that `paste' uses a wide variety of resources: Usually both, - a current window and a current display are required. But whenever - a second argument is specified no current window is needed. When - the source specification only contains registers (not the paste - buffer) then there need not be a current display (terminal - attached), as the registers are a global resource. The paste - buffer exists once for every user. - - - Command: stuff string - (none) - Stuff the string STRING in the input buffer of the current window. - This is like the `paste' command, but with much less overhead. - You cannot paste large buffers with the `stuff' command. It is most - useful for key bindings. *Note Bindkey::. - - - Command: pastefont [state] - Tell screen to include font information in the paste buffer. The - default is not to do so. This command is especially useful for - multi character fonts like kanji. - - - Command: slowpaste msec - - Command: defslowpaste msec - (none) - Define the speed text is inserted in the current window by the - `paste' command. If the slowpaste value is nonzero text is written - character by character. `screen' will pause for MSEC milliseconds - after each write to allow the application to process the input. - only use `slowpaste' if your underlying system exposes flow - control problems while pasting large amounts of text. - `defslowpaste' specifies the default for new windows. - - - Command: readreg [-e encoding] [register [filename]] - (none) - Does one of two things, dependent on number of arguments: with - zero or one arguments it it duplicates the paste buffer contents - into the register specified or entered at the prompt. With two - arguments it reads the contents of the named file into the - register, just as `readbuf' reads the screen-exchange file into - the paste buffer. You can tell screen the encoding of the file - via the `-e' option. The following example will paste the - system's password file into the screen window (using register p, - where a copy remains): - - C-a : readreg p /etc/passwd - C-a : paste p - - -File: screen.info, Node: Registers, Next: Screen Exchange, Prev: Paste, Up: Copy and Paste - -Registers -========= - - - Command: copy_reg [key] - (none) - Removed. Use `readreg' instead. - - - Command: ins_reg [key] - (none) - Removed. Use `paste' instead. - - - Command: process [key] - (none) - Stuff the contents of the specified register into the `screen' - input queue. If no argument is given you are prompted for a - register name. The text is parsed as if it had been typed in from - the user's keyboard. This command can be used to bind multiple - actions to a single key. - - - Command: register [-e encoding] key string - (none) - Save the specified STRING to the register KEY. The encoding of - the string can be specified via the `-e' option. - - -File: screen.info, Node: Screen Exchange, Next: History, Prev: Registers, Up: Copy and Paste - -Screen Exchange -=============== - - - Command: bufferfile [EXCHANGE-FILE] - (none) - Change the filename used for reading and writing with the paste - buffer. If the EXCHANGE-FILE parameter is omitted, `screen' - reverts to the default of `/tmp/screen-exchange'. The following - example will paste the system's password file into the screen - window (using the paste buffer, where a copy remains): - - C-a : bufferfile /etc/passwd - C-a < C-a ] - C-a : bufferfile - - - Command: readbuf [-e ENCODING] [FILENAME] - (`C-a <') - Reads the contents of the specified file into the paste buffer. - You can tell screen the encoding of the file via the `-e' option. - If no file is specified, the screen-exchange filename is used. - - - Command: removebuf - (`C-a =') - Unlinks the screen-exchange file. - - - Command: writebuf [-e ENCODING] [FILENAME] - (`C-a >') - Writes the contents of the paste buffer to the specified file, or - the public accessible screen-exchange file if no filename is given. - This is thought of as a primitive means of communication between - `screen' users on the same host. If an encoding is specified the - paste buffer is recoded on the fly to match the encoding. See also - `C-a ' (*note Copy::). - - -File: screen.info, Node: History, Prev: Screen Exchange, Up: Copy and Paste - -History -======= - - - Command: history - (`C-a {') - Usually users work with a shell that allows easy access to previous - commands. For example, `csh' has the command `!!' to repeat the - last command executed. `screen' provides a primitive way of - recalling "the command that started ...": You just type the first - letter of that command, then hit `C-a {' and `screen' tries to - find a previous line that matches with the prompt character to the - left of the cursor. This line is pasted into this window's input - queue. Thus you have a crude command history (made up by the - visible window and its scrollback buffer). - - -File: screen.info, Node: Subprocess Execution, Next: Key Binding, Prev: Copy and Paste, Up: Top - -Subprocess Execution -******************** - - Control Input or Output of a window by another filter process. Use -with care! - -* Menu: - -* Exec:: The `exec' command syntax. -* Using Exec:: Weird things that filters can do. - - -File: screen.info, Node: Exec, Next: Using Exec, Up: Subprocess Execution - -Exec -==== - - - Command: exec [[FDPAT] NEWCOMMAND [ARGS ... ]] - (none) - Run a unix subprocess (specified by an executable path NEWCOMMAND - and its optional arguments) in the current window. The flow of - data between newcommands stdin/stdout/stderr, the process - originally started (let us call it "application-process") and - screen itself (window) is controlled by the filedescriptor pattern - FDPAT. This pattern is basically a three character sequence - representing stdin, stdout and stderr of newcommand. A dot (`.') - connects the file descriptor to screen. An exclamation mark (`!') - causes the file descriptor to be connected to the - application-process. A colon (`:') combines both. - User input will go to newcommand unless newcommand receives the - application-process' output (FDPATs first character is `!' or `:') - or a pipe symbol (`|') is added to the end of FDPAT. - Invoking `exec' without arguments shows name and arguments of the - currently running subprocess in this window. Only one subprocess - can be running per window. - When a subprocess is running the `kill' command will affect it - instead of the windows process. Only one subprocess a time can be - running in each window. - Refer to the postscript file `doc/fdpat.ps' for a confusing - illustration of all 21 possible combinations. Each drawing shows - the digits 2, 1, 0 representing the three file descriptors of - newcommand. The box marked `W' is usual pty that has the - application-process on its slave side. The box marked `P' is the - secondary pty that now has screen at its master side. - - -File: screen.info, Node: Using Exec, Prev: Exec, Up: Subprocess Execution - -Using Exec -========== - -Abbreviations: - - * Whitespace between the word `exec' and FDPAT and the command name - can be omitted. - - * Trailing dots and a FDPAT consisting only of dots can be omitted. - - * A simple `|' is synonymous for the `!..|' pattern. - - * The word `exec' can be omitted when the `|' abbreviation is used. - - * The word `exec' can always be replaced by leading `!'. - -Examples: - -`!/bin/sh' -`exec /bin/sh' -`exec ... /bin/sh' - All of the above are equivalent. Creates another shell in the - same window, while the original shell is still running. Output of - both shells is displayed and user input is sent to the new - `/bin/sh'. - -`!!stty 19200' -`exec!stty 19200' -`exec !.. stty 19200' - All of the above are equivalent. Set the speed of the window's - tty. If your stty command operates on stdout, then add another - `!'. This is a useful command, when a screen window is directly - connected to a serial line that needs to be configured. - -`|less' -`exec !..| less' - Both are equivalent. This adds a pager to the window output. The - special character `|' is needed to give the user control over the - pager although it gets its input from the window's process. This - works, because `less' listens on stderr (a behavior that `screen' - would not expect without the `|') when its stdin is not a tty. - `Less' versions newer than 177 fail miserably here; good old `pg' - still works. - -`!:sed -n s/.*Error.*/\007/p' - Sends window output to both, the user and the sed command. The sed - inserts an additional bell character (oct. 007) to the window - output seen by screen. This will cause 'Bell in window x' - messages, whenever the string `Error' appears in the window. - - -File: screen.info, Node: Key Binding, Next: Flow Control, Prev: Subprocess Execution, Up: Top - -Key Binding -*********** - - You may disagree with some of the default bindings (I know I do). -The `bind' command allows you to redefine them to suit your preferences. - -* Menu: - -* Bind:: `bind' syntax. -* Bind Examples:: Using `bind'. -* Command Character:: The character used to start keyboard commands. -* Help:: Show current key bindings. -* Bindkey:: `bindkey' syntax. -* Bindkey Examples:: Some easy examples. -* Bindkey Control:: How to control the bindkey mechanism. - - -File: screen.info, Node: Bind, Next: Bind Examples, Up: Key Binding - -The `bind' command -================== - - - Command: bind [-c class] key [command [args]] - (none) - Bind a command to a key. The KEY argument is either a single - character, a two-character sequence of the form `^x' (meaning - `C-x'), a backslash followed by an octal number (specifying the - ASCII code of the character), or a backslash followed by a second - character, such as `\^' or `\\'. The argument can also be quoted, - if you like. If no further argument is given, any previously - established binding for this key is removed. The COMMAND argument - can be any command (*note Command Index::). - - If a command class is specified via the `-c' option, the key is - bound for the specified class. Use the `command' command to - activate a class. Command classes can be used to create multiple - command keys or multi-character bindings. - - By default, most suitable commands are bound to one or more keys - (*note Default Key Bindings::; for instance, the command to create - a new window is bound to `C-c' and `c'. The `bind' command can be - used to redefine the key bindings and to define new bindings. - - -File: screen.info, Node: Bind Examples, Next: Command Character, Prev: Bind, Up: Key Binding - -Examples of the `bind' command -============================== - -Some examples: - - bind ' ' windows - bind ^f screen telnet foobar - bind \033 screen -ln -t root -h 1000 9 su - -would bind the space key to the command that displays a list of windows -(so that the command usually invoked by `C-a C-w' would also be -available as `C-a space'), bind `C-f' to the command "create a window -with a TELNET connection to foobar", and bind to the command that -creates an non-login window with title `root' in slot #9, with a -superuser shell and a scrollback buffer of 1000 lines. - - bind -c demo1 0 select 10 - bind -c demo1 1 select 11 - bind -c demo1 2 select 12 - bindkey "^B" command -c demo1 - makes `C-b 0' select window 10, `C-b 1' window 11, etc. - - bind -c demo2 0 select 10 - bind -c demo2 1 select 11 - bind -c demo2 2 select 12 - bind - command -c demo2 - makes `C-a - 0' select window 10, `C-a - 1' window 11, etc. - - -File: screen.info, Node: Command Character, Next: Help, Prev: Bind Examples, Up: Key Binding - -Command Character -================= - - - Command: escape xy - (none) - Set the command character to X and the character generating a - literal command character (by triggering the `meta' command) to Y - (similar to the `-e' option). Each argument is either a single - character, a two-character sequence of the form `^x' (meaning - `C-x'), a backslash followed by an octal number (specifying the - ASCII code of the character), or a backslash followed by a second - character, such as `\^' or `\\'. The default is `^Aa', but ```' - is recommended by one of the authors. - - - Command: defescape xy - (none) - Set the default command characters. This is equivalent to the - command `escape' except that it is useful for multiuser sessions - only. In a multiuser session `escape' changes the command - character of the calling user, where `defescape' changes the - default command characters for users that will be added later. - - - Command: meta - (`C-a a') - Send the command character (`C-a') to the process in the current - window. The keystroke for this command is the second parameter to - the `-e' command line switch (*note Invoking Screen::), or the - `escape' .screenrc directive. - - - Command: command [-c CLASS] - (none) - This command has the same effect as typing the screen escape - character (`C-a'). It is probably only useful for key bindings. - If the `-c' option is given, select the specified command class. - *Note Bind::, *Note Bindkey::. - - -File: screen.info, Node: Help, Next: Bindkey, Prev: Command Character, Up: Key Binding - -Help -==== - - - Command: help - (`C-a ?') - Displays a help screen showing you all the key bindings. The first - pages list all the internal commands followed by their bindings. - Subsequent pages will display the custom commands, one command per - key. Press space when you're done reading each page, or return to - exit early. All other characters are ignored. If the `-c' option - is given, display all bound commands for the specified command - class. *Note Default Key Bindings::. - - -File: screen.info, Node: Bindkey, Next: Bindkey Examples, Prev: Help, Up: Key Binding - -Bindkey -======= - - - Command: bindkey [OPTS] [STRING [CMD ARGS]] - (none) - This command manages screen's input translation tables. Every - entry in one of the tables tells screen how to react if a certain - sequence of characters is encountered. There are three tables: one - that should contain actions programmed by the user, one for the - default actions used for terminal emulation and one for screen's - copy mode to do cursor movement. See *Note Input Translation:: for - a list of default key bindings. - - If the `-d' option is given, bindkey modifies the default table, - `-m' changes the copy mode table and with neither option the user - table is selected. The argument `string' is the sequence of - characters to which an action is bound. This can either be a fixed - tring or a termcap keyboard capability name (selectable with the - `-k' option). - - Some keys on a VT100 terminal can send a different string if - application mode is turned on (e.g. the cursor keys). Such keys - have two entries in the translation table. You can select the - application mode entry by specifying the `-a' option. - - The `-t' option tells screen not to do inter-character timing. One - cannot turn off the timing if a termcap capability is used. - - `cmd' can be any of screen's commands with an arbitrary number of - `args'. If `cmd' is omitted the key-binding is removed from the - table. - - -File: screen.info, Node: Bindkey Examples, Next: Bindkey Control, Prev: Bindkey, Up: Key Binding - -Bindkey Examples -================ - -Here are some examples of keyboard bindings: - - bindkey -d - -Show all of the default key bindings. The application mode entries are -marked with [A]. - - bindkey -k k1 select 1 - -Make the "F1" key switch to window one. - - bindkey -t foo stuff barfoo - -Make `foo' an abbreviation of the word `barfoo'. Timeout is disabled so -that users can type slowly. - - bindkey "\024" mapdefault - -This key-binding makes `C-t' an escape character for key-bindings. If -you did the above `stuff barfoo' binding, you can enter the word `foo' -by typing `C-t foo'. If you want to insert a `C-t' you have to press -the key twice (i.e. escape the escape binding). - - bindkey -k F1 command - -Make the F11 (not F1!) key an alternative screen escape (besides `C-a'). - - -File: screen.info, Node: Bindkey Control, Prev: Bindkey Examples, Up: Key Binding - -Bindkey Control -=============== - - - Command: mapdefault - (none) - Tell screen that the next input character should only be looked up - in the default bindkey table. - - - Command: mapnotnext - (none) - Like mapdefault, but don't even look in the default bindkey table. - - - Command: maptimeout timo - (none) - Set the intercharacter timer for input sequence detection to a - timeout of TIMO ms. The default timeout is 300ms. Maptimeout with - no arguments shows the current setting. - - -File: screen.info, Node: Flow Control, Next: Termcap, Prev: Key Binding, Up: Top - -Flow Control -************ - - `screen' can trap flow control characters or pass them to the -program, as you see fit. This is useful when your terminal wants to use -XON/XOFF flow control and you are running a program which wants to use -^S/^Q for other purposes (i.e. `emacs'). - -* Menu: - -* Flow Control Summary:: The effect of `screen' flow control -* Flow:: Setting the flow control behavior -* XON/XOFF:: Sending XON or XOFF to the window - - -File: screen.info, Node: Flow Control Summary, Next: Flow, Up: Flow Control - -About `screen' flow control settings -==================================== - - Each window has a flow-control setting that determines how screen -deals with the XON and XOFF characters (and perhaps the interrupt -character). When flow-control is turned off, screen ignores the XON -and XOFF characters, which allows the user to send them to the current -program by simply typing them (useful for the `emacs' editor, for -instance). The trade-off is that it will take longer for output from a -"normal" program to pause in response to an XOFF. With flow-control -turned on, XON and XOFF characters are used to immediately pause the -output of the current window. You can still send these characters to -the current program, but you must use the appropriate two-character -screen commands (typically `C-a q' (xon) and `C-a s' (xoff)). The -xon/xoff commands are also useful for typing C-s and C-q past a -terminal that intercepts these characters. - - Each window has an initial flow-control value set with either the -`-f' option or the `defflow' command. By default the windows are set -to automatic flow-switching. It can then be toggled between the three -states 'fixed on', 'fixed off' and 'automatic' interactively with the -`flow' command bound to `C-a f'. - - The automatic flow-switching mode deals with flow control using the -TIOCPKT mode (like `rlogin' does). If the tty driver does not support -TIOCPKT, screen tries to determine the right mode based on the current -setting of the application keypad -- when it is enabled, flow-control -is turned off and visa versa. Of course, you can still manipulate -flow-control manually when needed. - - If you're running with flow-control enabled and find that pressing -the interrupt key (usually C-c) does not interrupt the display until -another 6-8 lines have scrolled by, try running screen with the -`interrupt' option (add the `interrupt' flag to the `flow' command in -your .screenrc, or use the `-i' command-line option). This causes the -output that `screen' has accumulated from the interrupted program to be -flushed. One disadvantage is that the virtual terminal's memory -contains the non-flushed version of the output, which in rare cases can -cause minor inaccuracies in the output. For example, if you switch -screens and return, or update the screen with `C-a l' you would see the -version of the output you would have gotten without `interrupt' being -on. Also, you might need to turn off flow-control (or use auto-flow -mode to turn it off automatically) when running a program that expects -you to type the interrupt character as input, as the `interrupt' -parameter only takes effect when flow-control is enabled. If your -program's output is interrupted by mistake, a simple refresh of the -screen with `C-a l' will restore it. Give each mode a try, and use -whichever mode you find more comfortable. - - -File: screen.info, Node: Flow, Next: XON/XOFF, Prev: Flow Control Summary, Up: Flow Control - -Flow -==== - - - Command: defflow fstate [interrupt] - (none) - Same as the `flow' command except that the default setting for new - windows is changed. Initial setting is `auto'. Specifying `flow - auto interrupt' has the same effect as the command-line options - `-fa' and `-i'. Note that if `interrupt' is enabled, all existing - displays are changed immediately to forward interrupt signals. - - - Command: flow [fstate] - (`C-a f', `C-a C-f') - Sets the flow-control mode for this window to FSTATE, which can be - `on', `off' or `auto'. Without parameters it cycles the current - window's flow-control setting. Default is set by `defflow'. - - -File: screen.info, Node: XON/XOFF, Prev: Flow, Up: Flow Control - -XON and XOFF -============ - - - Command: xon - (`C-a q', `C-a C-q') - Send a ^Q (ASCII XON) to the program in the current window. - Redundant if flow control is set to `off' or `auto'. - - - Command: xoff - (`C-a s', `C-a C-s') - Send a ^S (ASCII XOFF) to the program in the current window. - - -File: screen.info, Node: Termcap, Next: Message Line, Prev: Flow Control, Up: Top - -Termcap -******* - - `screen' demands the most out of your terminal so that it can -perform its VT100 emulation most efficiently. These functions provide -means for tweaking the termcap entries for both your physical terminal -and the one simulated by `screen'. - -* Menu: - -* Window Termcap:: Choosing a termcap entry for the window. -* Dump Termcap:: Write out a termcap entry for the window. -* Termcap Syntax:: The `termcap' and `terminfo' commands. -* Termcap Examples:: Uses for `termcap'. -* Special Capabilities:: Non-standard capabilities used by `screen'. -* Autonuke:: Flush unseen output -* Obuflimit:: Allow pending output when reading more -* Character Translation:: Emulating fonts and charsets. - diff -Nru screen-4.0.3/doc/screen.info-4 screen-4.1.0~20120320gitdb59704/doc/screen.info-4 --- screen-4.0.3/doc/screen.info-4 2003-12-05 13:52:07.000000000 +0000 +++ screen-4.1.0~20120320gitdb59704/doc/screen.info-4 1970-01-01 00:00:00.000000000 +0000 @@ -1,1411 +0,0 @@ -This is screen.info, produced by makeinfo version 4.5 from -./screen.texinfo. - -INFO-DIR-SECTION General Commands -START-INFO-DIR-ENTRY -* Screen: (screen). Full-screen window manager. -END-INFO-DIR-ENTRY - - This file documents the `Screen' virtual terminal manager. - - Copyright (c) 1993-2003 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Foundation. - - -File: screen.info, Node: Window Termcap, Next: Dump Termcap, Up: Termcap - -Choosing the termcap entry for a window -======================================= - - Usually `screen' tries to emulate as much of the VT100/ANSI standard -as possible. But if your terminal lacks certain capabilities the -emulation may not be complete. In these cases `screen' has to tell the -applications that some of the features are missing. This is no problem -on machines using termcap, because `screen' can use the `$TERMCAP' -variable to customize the standard screen termcap. - - But if you do a rlogin on another machine or your machine supports -only terminfo this method fails. Because of this `screen' offers a way -to deal with these cases. Here is how it works: - - When `screen' tries to figure out a terminal name for itself, it -first looks for an entry named `screen.TERM', where TERM is the -contents of your `$TERM' variable. If no such entry exists, `screen' -tries `screen' (or `screen-w', if the terminal is wide (132 cols or -more)). If even this entry cannot be found, `vt100' is used as a -substitute. - - The idea is that if you have a terminal which doesn't support an -important feature (e.g. delete char or clear to EOS) you can build a new -termcap/terminfo entry for `screen' (named `screen.DUMBTERM') in which -this capability has been disabled. If this entry is installed on your -machines you are able to do a rlogin and still keep the correct -termcap/terminfo entry. The terminal name is put in the `$TERM' -variable of all new windows. `screen' also sets the `$TERMCAP' -variable reflecting the capabilities of the virtual terminal emulated. -Furthermore, the variable `$WINDOW' is set to the window number of each -window. - - The actual set of capabilities supported by the virtual terminal -depends on the capabilities supported by the physical terminal. If, for -instance, the physical terminal does not support underscore mode, -`screen' does not put the `us' and `ue' capabilities into the window's -`$TERMCAP' variable, accordingly. However, a minimum number of -capabilities must be supported by a terminal in order to run `screen'; -namely scrolling, clear screen, and direct cursor addressing (in -addition, `screen' does not run on hardcopy terminals or on terminals -that over-strike). - - Also, you can customize the `$TERMCAP' value used by `screen' by -using the `termcap' command, or by defining the variable `$SCREENCAP' -prior to startup. When the latter defined, its value will be copied -verbatim into each window's `$TERMCAP' variable. This can either be -the full terminal definition, or a filename where the terminal `screen' -(and/or `screen-w') is defined. - - Note that `screen' honors the `terminfo' command if the system uses -the terminfo database rather than termcap. On such machines the -`$TERMCAP' variable has no effect and you must use the `dumptermcap' -command (*note Dump Termcap::) and the `tic' program to generate -terminfo entries for `screen' windows. - - When the boolean `G0' capability is present in the termcap entry for -the terminal on which `screen' has been called, the terminal emulation -of `screen' supports multiple character sets. This allows an -application to make use of, for instance, the VT100 graphics character -set or national character sets. The following control functions from -ISO 2022 are supported: `lock shift G0' (`SI'), `lock shift G1' (`SO'), -`lock shift G2', `lock shift G3', `single shift G2', and `single shift -G3'. When a virtual terminal is created or reset, the ASCII character -set is designated as `G0' through `G3'. When the `G0' capability is -present, screen evaluates the capabilities `S0', `E0', and `C0' if -present. `S0' is the sequence the terminal uses to enable and start the -graphics character set rather than `SI'. `E0' is the corresponding -replacement for `SO'. `C0' gives a character by character translation -string that is used during semi-graphics mode. This string is built -like the `acsc' terminfo capability. - - When the `po' and `pf' capabilities are present in the terminal's -termcap entry, applications running in a `screen' window can send -output to the printer port of the terminal. This allows a user to have -an application in one window sending output to a printer connected to -the terminal, while all other windows are still active (the printer -port is enabled and disabled again for each chunk of output). As a -side-effect, programs running in different windows can send output to -the printer simultaneously. Data sent to the printer is not displayed -in the window. The `info' command displays a line starting with `PRIN' -while the printer is active. - - Some capabilities are only put into the `$TERMCAP' variable of the -virtual terminal if they can be efficiently implemented by the physical -terminal. For instance, `dl' (delete line) is only put into the -`$TERMCAP' variable if the terminal supports either delete line itself -or scrolling regions. Note that this may provoke confusion, when the -session is reattached on a different terminal, as the value of -`$TERMCAP' cannot be modified by parent processes. You can force -`screen' to include all capabilities in `$TERMCAP' with the `-a' -command-line option (*note Invoking Screen::). - - The "alternate screen" capability is not enabled by default. Set -the `altscreen' `.screenrc' command to enable it. - - -File: screen.info, Node: Dump Termcap, Next: Termcap Syntax, Prev: Window Termcap, Up: Termcap - -Write out the window's termcap entry -==================================== - - - Command: dumptermcap - (`C-a .') - Write the termcap entry for the virtual terminal optimized for the - currently active window to the file `.termcap' in the user's - `$HOME/.screen' directory (or wherever `screen' stores its - sockets. *note Files::). This termcap entry is identical to the - value of the environment variable `$TERMCAP' that is set up by - `screen' for each window. For terminfo based systems you will need - to run a converter like `captoinfo' and then compile the entry with - `tic'. - - -File: screen.info, Node: Termcap Syntax, Next: Termcap Examples, Prev: Dump Termcap, Up: Termcap - -The `termcap' command -===================== - - - Command: termcap term terminal-tweaks [window-tweaks] - - Command: terminfo term terminal-tweaks [window-tweaks] - - Command: termcapinfo term terminal-tweaks [window-tweaks] - (none) - Use this command to modify your terminal's termcap entry without - going through all the hassles involved in creating a custom - termcap entry. Plus, you can optionally customize the termcap - generated for the windows. You have to place these commands in - one of the screenrc startup files, as they are meaningless once - the terminal emulator is booted. - - If your system uses the terminfo database rather than termcap, - `screen' will understand the `terminfo' command, which has the - same effects as the `termcap' command. Two separate commands are - provided, as there are subtle syntactic differences, e.g. when - parameter interpolation (using `%') is required. Note that the - termcap names of the capabilities should also be used with the - `terminfo' command. - - In many cases, where the arguments are valid in both terminfo and - termcap syntax, you can use the command `termcapinfo', which is - just a shorthand for a pair of `termcap' and `terminfo' commands - with identical arguments. - - The first argument specifies which terminal(s) should be affected by -this definition. You can specify multiple terminal names by separating -them with `|'s. Use `*' to match all terminals and `vt*' to match all -terminals that begin with `vt'. - - Each TWEAK argument contains one or more termcap defines (separated -by `:'s) to be inserted at the start of the appropriate termcap entry, -enhancing it or overriding existing values. The first tweak modifies -your terminal's termcap, and contains definitions that your terminal -uses to perform certain functions. Specify a null string to leave this -unchanged (e.g. ""). The second (optional) tweak modifies all the -window termcaps, and should contain definitions that screen understands -(*note Virtual Terminal::). - - -File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap - -Termcap Examples -================ - - Some examples: - - termcap xterm* xn:hs@ - -Informs `screen' that all terminals that begin with `xterm' have firm -auto-margins that allow the last position on the screen to be updated -(xn), but they don't really have a status line (no 'hs' - append `@' to -turn entries off). Note that we assume `xn' for all terminal names -that start with `vt', but only if you don't specify a termcap command -for that terminal. - - termcap vt* xn - termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l - -Specifies the firm-margined `xn' capability for all terminals that -begin with `vt', and the second line will also add the escape-sequences -to switch into (Z0) and back out of (Z1) 132-character-per-line mode if -this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap -to use the width-changing commands.) - - termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4 - -This leaves your vt100 termcap alone and adds the function key labels to -each window's termcap entry. - - termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P - -Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables -the insert mode (im) and end-insert (ei) capabilities (the `@' in the -`im' string is after the `=', so it is part of the string). Having the -`im' and `ei' definitions put into your terminal's termcap will cause -screen to automatically advertise the character-insert capability in -each window's termcap. Each window will also get the delete-character -capability (dc) added to its termcap, which screen will translate into -a line-update for the terminal (we're pretending it doesn't support -character deletion). - - If you would like to fully specify each window's termcap entry, you -should instead set the `$SCREENCAP' variable prior to running `screen'. -*Note Virtual Terminal::, for the details of the `screen' terminal -emulation. *Note Termcap: (termcap)Top, for more information on -termcap definitions. - - -File: screen.info, Node: Special Capabilities, Next: Autonuke, Prev: Termcap Examples, Up: Termcap - -Special Terminal Capabilities -============================= - - The following table describes all terminal capabilities that are -recognized by `screen' and are not in the termcap manual (*note -Termcap: (termcap)Top.). You can place these capabilities in your -termcap entries (in `/etc/termcap') or use them with the commands -`termcap', `terminfo' and `termcapinfo' in your `screenrc' files. It is -often not possible to place these capabilities in the terminfo database. -`LP' - (bool) - Terminal has VT100 style margins (`magic margins'). Note that this - capability is obsolete -- `screen' now uses the standard `xn' - instead. - -`Z0' - (str) - Change width to 132 columns. - -`Z1' - (str) - Change width to 80 columns. - -`WS' - (str) - Resize display. This capability has the desired width and height as - arguments. SunView(tm) example: `\E[8;%d;%dt'. - -`NF' - (bool) - Terminal doesn't need flow control. Send ^S and ^Q direct to the - application. Same as `flow off'. The opposite of this capability - is `nx'. - -`G0' - (bool) - Terminal can deal with ISO 2022 font selection sequences. - -`S0' - (str) - Switch charset `G0' to the specified charset. Default is `\E(%.'. - -`E0' - (str) - Switch charset `G0' back to standard charset. Default is `\E(B'. - -`C0' - (str) - Use the string as a conversion table for font 0. See the `ac' - capability for more details. - -`CS' - (str) - Switch cursor-keys to application mode. - -`CE' - (str) - Switch cursor-keys to cursor mode. - -`AN' - (bool) - Enable autonuke for displays of this terminal type. (*note - Autonuke::). - -`OL' - (num) - Set the output buffer limit. See the `obuflimit' command (*note - Obuflimit::) for more details. - -`KJ' - (str) - Set the encoding of the terminal. See the `encoding' command - (*note Character Processing::) for valid encodings. - -`AF' - (str) - Change character foreground color in an ANSI conform way. This - capability will almost always be set to `\E[3%dm' (`\E[3%p1%dm' on - terminfo machines). - -`AB' - (str) - Same as `AF', but change background color. - -`AX' - (bool) - Does understand ANSI set default fg/bg color (`\E[39m / \E[49m'). - -`XC' - (str) - Describe a translation of characters to strings depending on the - current font. (*note Character Translation::). - -`XT' - (bool) - Terminal understands special xterm sequences (OSC, mouse tracking). - -`C8' - (bool) - Terminal needs bold to display high-intensity colors (e.g. Eterm). - -`TF' - (bool) - Add missing capabilities to the termcap/info entry. (Set by - default). - - -File: screen.info, Node: Autonuke, Next: Obuflimit, Prev: Special Capabilities, Up: Termcap - -Autonuke -======== - - - Command: autonuke STATE - (none) - Sets whether a clear screen sequence should nuke all the output - that has not been written to the terminal. *Note Obuflimit::. - This property is set per display, not per window. - - - Command: defautonuke STATE - (none) - Same as the `autonuke' command except that the default setting for - new displays is also changed. Initial setting is `off'. Note that - you can use the special `AN' terminal capability if you want to - have a terminal type dependent setting. - - -File: screen.info, Node: Obuflimit, Next: Character Translation, Prev: Autonuke, Up: Termcap - -Obuflimit -========= - - - Command: obuflimit [LIMIT] - (none) - If the output buffer contains more bytes than the specified limit, - no more data will be read from the windows. The default value is - 256. If you have a fast display (like `xterm'), you can set it to - some higher value. If no argument is specified, the current - setting is displayed. This property is set per display, not per - window. - - - Command: defobuflimit LIMIT - (none) - Same as the `obuflimit' command except that the default setting - for new displays is also changed. Initial setting is 256 bytes. - Note that you can use the special `OL' terminal capability if you - want to have a terminal type dependent limit. - - -File: screen.info, Node: Character Translation, Prev: Obuflimit, Up: Termcap - -Character Translation -===================== - - `Screen' has a powerful mechanism to translate characters to -arbitrary strings depending on the current font and terminal type. Use -this feature if you want to work with a common standard character set -(say ISO8851-latin1) even on terminals that scatter the more unusual -characters over several national language font pages. - - Syntax: - - XC={,,} - :=