u/mdw/putty
21 years agoYet more global-removal. The static variables in logging.c are now
simon [Sat, 26 Oct 2002 12:58:13 +0000 (12:58 +0000)]
Yet more global-removal. The static variables in logging.c are now
absent, and also (I think) all the frontend request functions (such
as request_resize) take a context pointer, so that multiple windows
can be handled sensibly. I wouldn't swear to this, but I _think_
that only leaves the Unicode stuff as the last stubborn holdout.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2147 cda61777-01e9-0310-a592-d414129be87e

21 years agoRichard points out that it would probably help if I committed
simon [Sat, 26 Oct 2002 12:42:07 +0000 (12:42 +0000)]
Richard points out that it would probably help if I committed
ldisc.h. Bah. :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2146 cda61777-01e9-0310-a592-d414129be87e

21 years agoX forwarding authentication is now invented on a per-SSH-connection
simon [Sat, 26 Oct 2002 11:23:15 +0000 (11:23 +0000)]
X forwarding authentication is now invented on a per-SSH-connection
basis, so the statics are gone from x11fwd.c.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2145 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix proxy.c so that the static variables become const.
simon [Sat, 26 Oct 2002 11:12:24 +0000 (11:12 +0000)]
Fix proxy.c so that the static variables become const.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2144 cda61777-01e9-0310-a592-d414129be87e

21 years agoReorganised the Unicode layer somewhat: moved luni_send and
simon [Sat, 26 Oct 2002 11:08:59 +0000 (11:08 +0000)]
Reorganised the Unicode layer somewhat: moved luni_send and
lpage_send out into the line discipline, making them _clients_ of
the Unicode layer rather than part of it. This means they can access
ldisc->term, which in turn means I've been able to remove the
temporary global variable `term'. We're slowly getting there.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2143 cda61777-01e9-0310-a592-d414129be87e

21 years agoPort forwarding module now passes backend handles around properly.
simon [Sat, 26 Oct 2002 10:33:59 +0000 (10:33 +0000)]
Port forwarding module now passes backend handles around properly.
As a result I've now been able to turn the global variables `back'
and `backhandle' into module-level statics in the individual front
ends. Now _that's_ progress!

git-svn-id: svn://svn.tartarus.org/sgt/putty@2142 cda61777-01e9-0310-a592-d414129be87e

21 years agoLine discipline module now uses dynamically allocated data. Also
simon [Sat, 26 Oct 2002 10:16:19 +0000 (10:16 +0000)]
Line discipline module now uses dynamically allocated data. Also
fixed one or two other minor problems.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2141 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops; remembering to call term_provide_resize_fn in the Unix front
simon [Fri, 25 Oct 2002 22:00:22 +0000 (22:00 +0000)]
Oops; remembering to call term_provide_resize_fn in the Unix front
end would probably help. Thanks Colin.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2140 cda61777-01e9-0310-a592-d414129be87e

21 years agoThe Zlib module now uses dynamically allocated contexts. I think
simon [Fri, 25 Oct 2002 13:26:33 +0000 (13:26 +0000)]
The Zlib module now uses dynamically allocated contexts. I think
that completes the static-removal in the crypto library. Ooh.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2136 cda61777-01e9-0310-a592-d414129be87e

21 years agoDiffie-Hellman key exchange now uses a dynamically allocated context.
simon [Fri, 25 Oct 2002 13:08:01 +0000 (13:08 +0000)]
Diffie-Hellman key exchange now uses a dynamically allocated context.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2135 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix some compiler warnings.
simon [Fri, 25 Oct 2002 13:00:45 +0000 (13:00 +0000)]
Fix some compiler warnings.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2134 cda61777-01e9-0310-a592-d414129be87e

21 years agoTidy up and fix a compiler warning.
simon [Fri, 25 Oct 2002 12:59:57 +0000 (12:59 +0000)]
Tidy up and fix a compiler warning.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2133 cda61777-01e9-0310-a592-d414129be87e

21 years agoSSH CRC attack detector now uses a dynamically allocated context.
simon [Fri, 25 Oct 2002 12:58:21 +0000 (12:58 +0000)]
SSH CRC attack detector now uses a dynamically allocated context.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2132 cda61777-01e9-0310-a592-d414129be87e

21 years agoSSH2 MACs now use dynamically allocated contexts.
simon [Fri, 25 Oct 2002 12:51:28 +0000 (12:51 +0000)]
SSH2 MACs now use dynamically allocated contexts.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2131 cda61777-01e9-0310-a592-d414129be87e

21 years agoSSH ciphers now use dynamically allocated contexts.
simon [Fri, 25 Oct 2002 12:35:22 +0000 (12:35 +0000)]
SSH ciphers now use dynamically allocated contexts.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2130 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix the nasty flashing-light-grey-on-resize problem, after MCV
simon [Fri, 25 Oct 2002 11:58:59 +0000 (11:58 +0000)]
Fix the nasty flashing-light-grey-on-resize problem, after MCV
helpfully alerted me to the existence of gdk_window_set_background().

git-svn-id: svn://svn.tartarus.org/sgt/putty@2129 cda61777-01e9-0310-a592-d414129be87e

21 years agopty backend now supports the changed function interface, so pterm
simon [Fri, 25 Oct 2002 11:50:51 +0000 (11:50 +0000)]
pty backend now supports the changed function interface, so pterm
now compiles and runs again after the major destabilisation.
Unfortunately it wasn't feasible to actually encapsulate all of the
pty backend's data, since the utmp helper and the need to fork and
drop privileges before doing anything else at all rather confuses
matters. So the data handle passed around to the pty backend is a
null pointer, and the pty backend is just as global-ridden as it
always has been. Shame, but such is life.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2128 cda61777-01e9-0310-a592-d414129be87e

21 years agoMajor destabilisation, phase 2. This time it's the backends' turn:
simon [Fri, 25 Oct 2002 11:30:33 +0000 (11:30 +0000)]
Major destabilisation, phase 2. This time it's the backends' turn:
each backend now stores all its internal variables in a big struct,
and each backend function gets a pointer to this struct passed to
it. This still isn't the end of the work - lots of subsidiary things
still use globals, notably all the cipher and compressor modules and
the X11 forwarding authentication stuff. But ssh.c itself has now
been transformed, and that was the really painful bit, so from here
on it all ought to be a sequence of much smaller and simpler pieces
of work.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2127 cda61777-01e9-0310-a592-d414129be87e

21 years agoNeed to stub frontend_keypress() in console.c as well as window.c.
simon [Thu, 24 Oct 2002 14:48:08 +0000 (14:48 +0000)]
Need to stub frontend_keypress() in console.c as well as window.c.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2126 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops - repercussions of the close-on-exit stuff which I forgot to
simon [Thu, 24 Oct 2002 14:12:55 +0000 (14:12 +0000)]
Oops - repercussions of the close-on-exit stuff which I forgot to
check in. I must stop doing my Unix checkins in the Unix subdir :-(

git-svn-id: svn://svn.tartarus.org/sgt/putty@2125 cda61777-01e9-0310-a592-d414129be87e

21 years agoMinor compiler nits:
jacob [Wed, 23 Oct 2002 14:24:40 +0000 (14:24 +0000)]
Minor compiler nits:
 - use smalloc/sfree, not malloc/free
 - include <ctype.h>
 - include <string.h> (although this doesn't shut the compiler up about
   non-ANSI stricmp/strnicmp)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2121 cda61777-01e9-0310-a592-d414129be87e

21 years agoImplement handling of all Close On Exit modes. Default is to close
simon [Wed, 23 Oct 2002 14:21:12 +0000 (14:21 +0000)]
Implement handling of all Close On Exit modes. Default is to close
only on clean exit, which is a departure from most xterm-alikes but
Ian reckons people will love me for it. If this turns out to be
wrong, we can always change the default for Unix.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2120 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixes for (Backend)->size() changes -- internal declarations didn't include
jacob [Wed, 23 Oct 2002 14:03:11 +0000 (14:03 +0000)]
Fixes for (Backend)->size() changes -- internal declarations didn't include
new arguments and neither did internal calls.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2119 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove apparently unnecessary declaration of typedef Config from winstuff.h --
jacob [Wed, 23 Oct 2002 13:46:59 +0000 (13:46 +0000)]
Remove apparently unnecessary declaration of typedef Config from winstuff.h --
it was breaking mingw builds (gcc being more picky than Visual C).

git-svn-id: svn://svn.tartarus.org/sgt/putty@2118 cda61777-01e9-0310-a592-d414129be87e

21 years agoCleanups from yesterday's destabilisation: lots of stuff in
simon [Wed, 23 Oct 2002 12:41:35 +0000 (12:41 +0000)]
Cleanups from yesterday's destabilisation: lots of stuff in
terminal.c was apparently relying on implicit initialisation to
zero, and also I've removed the backends' dependency on terminal.h
by having terminal sizes explicitly passed in to back->size().

git-svn-id: svn://svn.tartarus.org/sgt/putty@2117 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops. Forgot to check in terminal.h from yesterday's work. There's
simon [Wed, 23 Oct 2002 09:11:36 +0000 (09:11 +0000)]
Oops. Forgot to check in terminal.h from yesterday's work. There's
always one :-/

git-svn-id: svn://svn.tartarus.org/sgt/putty@2116 cda61777-01e9-0310-a592-d414129be87e

21 years agoMajor destabilisation, phase 1. In this phase I've moved (I think)
simon [Tue, 22 Oct 2002 16:11:33 +0000 (16:11 +0000)]
Major destabilisation, phase 1. In this phase I've moved (I think)
all the global and function-static variables out of terminal.c into
a dynamically allocated data structure. Note that this does not yet
confer the ability to run more than one of them in the same process,
because other things (the line discipline, the back end) are still
global, and also in particular the address of the dynamically
allocated terminal-data structure is held in a global variable
`term'. But what I've got here represents a reasonable stopping
point at which to check things in. In _theory_ this should all still
work happily, on both Unix and Windows. In practice, who knows?

git-svn-id: svn://svn.tartarus.org/sgt/putty@2115 cda61777-01e9-0310-a592-d414129be87e

21 years agoMake -ut work the right way round! :-)
simon [Tue, 22 Oct 2002 13:27:58 +0000 (13:27 +0000)]
Make -ut work the right way round! :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2114 cda61777-01e9-0310-a592-d414129be87e

21 years agoStop `pterm -ut-' leaving the unnecessary utmp helper as a zombie
simon [Tue, 22 Oct 2002 13:26:57 +0000 (13:26 +0000)]
Stop `pterm -ut-' leaving the unnecessary utmp helper as a zombie
process (Debian bug #165887).

git-svn-id: svn://svn.tartarus.org/sgt/putty@2113 cda61777-01e9-0310-a592-d414129be87e

21 years agoThanks to Richard B for pointing out that xterm has its own variants
simon [Tue, 22 Oct 2002 10:31:23 +0000 (10:31 +0000)]
Thanks to Richard B for pointing out that xterm has its own variants
of the alternate-screen and save-cursor control sequences, with
subtly different semantics and entertaining interactions with the
usual ones. No thanks to xterm for doing so in the first place :-(
This checkin should sort it all out.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2112 cda61777-01e9-0310-a592-d414129be87e

21 years agoJustin Bradford's patch for increased proxy robustness.
simon [Tue, 22 Oct 2002 09:40:38 +0000 (09:40 +0000)]
Justin Bradford's patch for increased proxy robustness.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2111 cda61777-01e9-0310-a592-d414129be87e

21 years agoMake sure SIGINT and SIGQUIT haven't been nobbled in our child
simon [Mon, 21 Oct 2002 23:01:34 +0000 (23:01 +0000)]
Make sure SIGINT and SIGQUIT haven't been nobbled in our child
process by weird POSIX-required shell behaviour.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2110 cda61777-01e9-0310-a592-d414129be87e

21 years agoDon't bother closing fds 0-2 before dup2ing over them; there's no
simon [Mon, 21 Oct 2002 23:00:18 +0000 (23:00 +0000)]
Don't bother closing fds 0-2 before dup2ing over them; there's no
need, and it means we always have a valid open stderr.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2109 cda61777-01e9-0310-a592-d414129be87e

21 years agoVT100 line drawing characters should only happen between 0x5F and
simon [Mon, 21 Oct 2002 22:59:14 +0000 (22:59 +0000)]
VT100 line drawing characters should only happen between 0x5F and
0x7E, not everywhere else. Silly me thought nobody would bother to
depend on this :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2108 cda61777-01e9-0310-a592-d414129be87e

21 years agoImplement Richard's really clever idea about bell overload mode:
simon [Sun, 20 Oct 2002 13:23:30 +0000 (13:23 +0000)]
Implement Richard's really clever idea about bell overload mode:
it's automatically deactivated by any keypress, so that command-line
beeps from (e.g.) filename completion don't suddenly stop occurring,
but it still provides a rapid response to an accidental spewing of a
binary to your terminal.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2107 cda61777-01e9-0310-a592-d414129be87e

21 years agoScrollOnKey wasn't working because I failed to set seen_key_event in
simon [Sun, 20 Oct 2002 12:44:29 +0000 (12:44 +0000)]
ScrollOnKey wasn't working because I failed to set seen_key_event in
pterm.c.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2106 cda61777-01e9-0310-a592-d414129be87e

21 years agoReject unrecognised command-line options; thanks rjk.
simon [Fri, 18 Oct 2002 15:26:54 +0000 (15:26 +0000)]
Reject unrecognised command-line options; thanks rjk.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2102 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix typo in man page. Thanks Richard.
simon [Fri, 18 Oct 2002 10:38:22 +0000 (10:38 +0000)]
Fix typo in man page. Thanks Richard.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2101 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops - that fix wasn't _quite_ right, since it killed all
simon [Thu, 17 Oct 2002 16:58:24 +0000 (16:58 +0000)]
Oops - that fix wasn't _quite_ right, since it killed all
non-function keys completely :-/

git-svn-id: svn://svn.tartarus.org/sgt/putty@2096 cda61777-01e9-0310-a592-d414129be87e

21 years agoMake the shadow bold offset configurable, after discovering that
simon [Thu, 17 Oct 2002 16:51:01 +0000 (16:51 +0000)]
Make the shadow bold offset configurable, after discovering that
7x13 goes the other way to all other X fonts I've ever seen. (Arrgh.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2095 cda61777-01e9-0310-a592-d414129be87e

21 years agoThis should fix the bug causing Alt-Shift to generate Escape.
simon [Thu, 17 Oct 2002 16:45:17 +0000 (16:45 +0000)]
This should fix the bug causing Alt-Shift to generate Escape.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2093 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd the -xrm command-line option, to allow specification of an
simon [Wed, 16 Oct 2002 22:54:58 +0000 (22:54 +0000)]
Add the -xrm command-line option, to allow specification of an
arbitrary X resource which doesn't have a dedicated command-line
option.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2089 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a man page.
simon [Wed, 16 Oct 2002 22:43:35 +0000 (22:43 +0000)]
Add a man page.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2088 cda61777-01e9-0310-a592-d414129be87e

21 years agoTemporarily change the default for cut-and-paste of line drawing
simon [Wed, 16 Oct 2002 16:32:17 +0000 (16:32 +0000)]
Temporarily change the default for cut-and-paste of line drawing
characters, under Unix only, because the stub Unicode layer makes
the usual default break moderately painfully.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2087 cda61777-01e9-0310-a592-d414129be87e

21 years agoA few more command-line options.
simon [Wed, 16 Oct 2002 16:00:38 +0000 (16:00 +0000)]
A few more command-line options.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2086 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops, forgot to add BoldFont to the settings module.
simon [Wed, 16 Oct 2002 14:32:21 +0000 (14:32 +0000)]
Oops, forgot to add BoldFont to the settings module.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2085 cda61777-01e9-0310-a592-d414129be87e

21 years agoImplement reading of X resources, and -name to change the name under
simon [Wed, 16 Oct 2002 14:32:06 +0000 (14:32 +0000)]
Implement reading of X resources, and -name to change the name under
which to look them up.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2084 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a file to the source archive mentioning the version number of
simon [Wed, 16 Oct 2002 12:30:51 +0000 (12:30 +0000)]
Add a file to the source archive mentioning the version number of
the latest release. This is so that .tar.gz snapshots for the Unix
port can be versioned as `0.53-20021016' or similar, meaning that
(e.g.) Debian version numbering can be monotonic between releases
and snapshots.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2083 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix utmp and pty handling so that GTK never complains about running
simon [Wed, 16 Oct 2002 12:17:51 +0000 (12:17 +0000)]
Fix utmp and pty handling so that GTK never complains about running
set[ug]id. All privs-requiring pty operations are done at the very
start of the run, then privs are dropped before initialising GTK.
Utmp is handled by forking a still-privileged subprocess at this
point, and later asking it (through a pipe) to stamp utmp. The
subprocess cleans up utmp on exit, which has the additional
advantage that if the main pterm process suffers some sort of
unexpected termination (up to and including SIGKILL) the subprocess
can still mop up utmp.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2082 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix for `hostname-whitespace'; thanks to Justin Bradford.
simon [Wed, 16 Oct 2002 11:35:13 +0000 (11:35 +0000)]
Fix for `hostname-whitespace'; thanks to Justin Bradford.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2080 cda61777-01e9-0310-a592-d414129be87e

21 years agoBug `shift-backspace': whichever of ^H and ^? is configured for
simon [Wed, 16 Oct 2002 09:40:36 +0000 (09:40 +0000)]
Bug `shift-backspace': whichever of ^H and ^? is configured for
Backspace, Shift-Backspace should do the _other_ one. Thanks to
Justin Bradford.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2079 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops - check in leftovers from yesterday's development. That's what
simon [Wed, 16 Oct 2002 09:28:17 +0000 (09:28 +0000)]
Oops - check in leftovers from yesterday's development. That's what
I get for running most of my cvs commands in the unix subdir :-/

git-svn-id: svn://svn.tartarus.org/sgt/putty@2078 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport bold-as-font, by means of a separate bold font (if one was
simon [Tue, 15 Oct 2002 18:42:48 +0000 (18:42 +0000)]
Support bold-as-font, by means of a separate bold font (if one was
supplied) or shadow bolding (if not). As usual, can't yet be turned
on without a recompile.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2077 cda61777-01e9-0310-a592-d414129be87e

21 years agoConfigure the pty so that it agrees with our idea of whether
simon [Tue, 15 Oct 2002 18:36:18 +0000 (18:36 +0000)]
Configure the pty so that it agrees with our idea of whether
Backspace sends ^H or ^?.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2076 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport underline and vertical-line cursors as well as block.
simon [Tue, 15 Oct 2002 18:18:25 +0000 (18:18 +0000)]
Support underline and vertical-line cursors as well as block.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2075 cda61777-01e9-0310-a592-d414129be87e

21 years agoIf we can't load the specified font, give an error message rather
simon [Tue, 15 Oct 2002 17:41:22 +0000 (17:41 +0000)]
If we can't load the specified font, give an error message rather
than segfaulting.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2074 cda61777-01e9-0310-a592-d414129be87e

21 years agoPrinter support: cfg.printer is assumed to be a Unix command through
simon [Tue, 15 Oct 2002 17:38:04 +0000 (17:38 +0000)]
Printer support: cfg.printer is assumed to be a Unix command through
which to pipe printed data. Of course by default printing is
disabled; typically cfg.printer would be set to `lpr', perhaps with
some arguments.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2073 cda61777-01e9-0310-a592-d414129be87e

21 years agoScrollbar can now be configured to go on the left (although the
simon [Tue, 15 Oct 2002 17:24:13 +0000 (17:24 +0000)]
Scrollbar can now be configured to go on the left (although the
current configuration mechanism doesn't support it).

git-svn-id: svn://svn.tartarus.org/sgt/putty@2072 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport ALT + numeric keypad for typing in strange character codes.
simon [Tue, 15 Oct 2002 17:18:24 +0000 (17:18 +0000)]
Support ALT + numeric keypad for typing in strange character codes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2071 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd newline at EOF in uxucs.c. Thanks Richard. :-)
simon [Tue, 15 Oct 2002 16:52:45 +0000 (16:52 +0000)]
Add newline at EOF in uxucs.c. Thanks Richard. :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2070 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport scrolling with the mouse wheel (X servers apparently usually
simon [Tue, 15 Oct 2002 16:50:42 +0000 (16:50 +0000)]
Support scrolling with the mouse wheel (X servers apparently usually
send a button 4 press for an upward wheel movement and a button 5
press for a downward one). Untested since my own trackball's button
4 does nothing obvious. Someone with a mouse wheel should give this
a workout.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2069 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixes to terminal.c to support blinking and visual bells under Unix.
simon [Tue, 15 Oct 2002 16:40:22 +0000 (16:40 +0000)]
Fixes to terminal.c to support blinking and visual bells under Unix.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2068 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for blinking text and blinking cursor. Won't actually be
simon [Tue, 15 Oct 2002 16:38:10 +0000 (16:38 +0000)]
Support for blinking text and blinking cursor. Won't actually be
accessible until there's a way to configure it on, but it worked in
tests.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2067 cda61777-01e9-0310-a592-d414129be87e

21 years agoUse the appalling gnome-terminal hack for server-controlled resizes
simon [Tue, 15 Oct 2002 16:24:42 +0000 (16:24 +0000)]
Use the appalling gnome-terminal hack for server-controlled resizes
rather than the gtk_window_set_policy approach; the GNOME people say
that the former is the Right Thing in spite of the latter looking
obviously plausible.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2066 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove some rogue diagnostics.
simon [Tue, 15 Oct 2002 15:44:23 +0000 (15:44 +0000)]
Remove some rogue diagnostics.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2065 cda61777-01e9-0310-a592-d414129be87e

21 years agoDon't forget to initialise the pixel size parameters of the window
simon [Tue, 15 Oct 2002 15:16:21 +0000 (15:16 +0000)]
Don't forget to initialise the pixel size parameters of the window
as passed to the pty...

git-svn-id: svn://svn.tartarus.org/sgt/putty@2064 cda61777-01e9-0310-a592-d414129be87e

21 years agoRichard's patch to fix `make clean' under Unix.
simon [Tue, 15 Oct 2002 14:58:02 +0000 (14:58 +0000)]
Richard's patch to fix `make clean' under Unix.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2063 cda61777-01e9-0310-a592-d414129be87e

21 years agoRichard's patch to make the scrollbar configurably absent. (Still
simon [Tue, 15 Oct 2002 14:55:19 +0000 (14:55 +0000)]
Richard's patch to make the scrollbar configurably absent. (Still
want a new option to configure it to be on the LHS though. And some
lunatic is bound to ask for an xterm-style scrollbar too... :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2062 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for all the server-side window configuration requests,
simon [Tue, 15 Oct 2002 14:31:06 +0000 (14:31 +0000)]
Support for all the server-side window configuration requests,
including server-controlled resizing. Irritatingly I've had to use a
deprecated option to gtk_window_set_policy() to make this work,
resulting in me raising GNOME bug #95818 to ask for it to be un-
deprecated again...

git-svn-id: svn://svn.tartarus.org/sgt/putty@2061 cda61777-01e9-0310-a592-d414129be87e

21 years agoIntroduce the ability to control whether the shell run in pterm is a
simon [Tue, 15 Oct 2002 13:07:18 +0000 (13:07 +0000)]
Introduce the ability to control whether the shell run in pterm is a
login shell or not. Also moved these new pieces of configuration
into the Config structure, though they won't stay there forever
since they will need to be moved out into platform-dependent config.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2060 cda61777-01e9-0310-a592-d414129be87e

21 years agoFinish up utmp processing: add the -ut- command-line option to
simon [Tue, 15 Oct 2002 12:42:58 +0000 (12:42 +0000)]
Finish up utmp processing: add the -ut- command-line option to
suppress stamping it at all. (I suppose this ought to be part of the
cfg structure really.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2059 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for utmp, wtmp and lastlog. Probably not terribly portable
simon [Tue, 15 Oct 2002 12:29:52 +0000 (12:29 +0000)]
Support for utmp, wtmp and lastlog. Probably not terribly portable
as yet, but seems to work plausibly on Linux.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2058 cda61777-01e9-0310-a592-d414129be87e

21 years agoDeal with the warnings generated when passing a pointer-to-enum to
simon [Tue, 15 Oct 2002 10:52:13 +0000 (10:52 +0000)]
Deal with the warnings generated when passing a pointer-to-enum to
gppi as a pointer-to-int.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2057 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for BSD-style pty devices. Tested under Linux; might need
simon [Tue, 15 Oct 2002 10:49:38 +0000 (10:49 +0000)]
Support for BSD-style pty devices. Tested under Linux; might need
minor tweaks to run under other BSD-style OSes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2056 cda61777-01e9-0310-a592-d414129be87e

21 years agoTrim wide text properly at the RH edge of the screen.
simon [Tue, 15 Oct 2002 09:30:16 +0000 (09:30 +0000)]
Trim wide text properly at the RH edge of the screen.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2055 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for line attributes: ESC #3, #4 and #6 for double-width and
simon [Tue, 15 Oct 2002 00:22:48 +0000 (00:22 +0000)]
Support for line attributes: ESC #3, #4 and #6 for double-width and
double-height text.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2054 cda61777-01e9-0310-a592-d414129be87e

21 years agoDon't cause the mouse pointer to reappear just because it's changed
simon [Mon, 14 Oct 2002 23:39:07 +0000 (23:39 +0000)]
Don't cause the mouse pointer to reappear just because it's changed
shape.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2053 cda61777-01e9-0310-a592-d414129be87e

21 years agoOnly engage a GTK idle function when absolutely necessary, otherwise
simon [Mon, 14 Oct 2002 23:32:00 +0000 (23:32 +0000)]
Only engage a GTK idle function when absolutely necessary, otherwise
the whole app spins on it and takes up CPU all the time.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2052 cda61777-01e9-0310-a592-d414129be87e

21 years agoSet up the palette _before_ trying to paint the window black.
simon [Mon, 14 Oct 2002 22:14:54 +0000 (22:14 +0000)]
Set up the palette _before_ trying to paint the window black.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2051 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd the -log option, which activates full session logging. Should be
simon [Mon, 14 Oct 2002 10:33:34 +0000 (10:33 +0000)]
Add the -log option, which activates full session logging. Should be
handy next time I need to debug any weird terminal problems...

git-svn-id: svn://svn.tartarus.org/sgt/putty@2050 cda61777-01e9-0310-a592-d414129be87e

21 years agoBell overload was working in principle, but wasn't scaled to Unix's
simon [Mon, 14 Oct 2002 10:29:50 +0000 (10:29 +0000)]
Bell overload was working in principle, but wasn't scaled to Unix's
greater time resolution. Oops.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2049 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport server requests for colour palette changes.
simon [Mon, 14 Oct 2002 10:21:35 +0000 (10:21 +0000)]
Support server requests for colour palette changes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2048 cda61777-01e9-0310-a592-d414129be87e

21 years agoDon't forget to call term_paste() when we get the chance, or big
simon [Mon, 14 Oct 2002 10:14:12 +0000 (10:14 +0000)]
Don't forget to call term_paste() when we get the chance, or big
pastes won't go through. (Not sure whether I should remove this
weird behaviour completely for pterm. It's a bit bizarre.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2047 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport NetHack keypad mode. :-)
simon [Mon, 14 Oct 2002 10:06:07 +0000 (10:06 +0000)]
Support NetHack keypad mode. :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2046 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for hiding the mouse pointer on keypresses. Currently
simon [Mon, 14 Oct 2002 09:58:27 +0000 (09:58 +0000)]
Support for hiding the mouse pointer on keypresses. Currently
activated by `-hide' on the command line.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2045 cda61777-01e9-0310-a592-d414129be87e

21 years agoxterm-class programs should exit when their primary child process
simon [Mon, 14 Oct 2002 09:18:34 +0000 (09:18 +0000)]
xterm-class programs should exit when their primary child process
dies, rather than waiting around until the last open handle on the
pty closes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2044 cda61777-01e9-0310-a592-d414129be87e

21 years agoSEL_NL is different between Windows and Unix; move it out into the
simon [Mon, 14 Oct 2002 09:06:31 +0000 (09:06 +0000)]
SEL_NL is different between Windows and Unix; move it out into the
platform-specific header files.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2043 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops. Defining max() the wrong way round was breaking rect select.
simon [Mon, 14 Oct 2002 09:04:23 +0000 (09:04 +0000)]
Oops. Defining max() the wrong way round was breaking rect select.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2042 cda61777-01e9-0310-a592-d414129be87e

21 years agoVarious faffs in the pty allocation process to get controlling
simon [Mon, 14 Oct 2002 08:56:55 +0000 (08:56 +0000)]
Various faffs in the pty allocation process to get controlling
terminals right. Irritatingly this was working when run from another
[xsp]term but not when run from my GNOME panel. I think it's now
more robust.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2041 cda61777-01e9-0310-a592-d414129be87e

21 years agoWindow title configurability: -T to set it from the command line,
simon [Mon, 14 Oct 2002 00:05:37 +0000 (00:05 +0000)]
Window title configurability: -T to set it from the command line,
support for the xterm escape sequences to set it, and support for
the xterm escape sequence to query it.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2040 cda61777-01e9-0310-a592-d414129be87e

21 years agoDon't forget to set $TERM when we spawn the pty. Of course I haven't
simon [Sun, 13 Oct 2002 23:57:40 +0000 (23:57 +0000)]
Don't forget to set $TERM when we spawn the pty. Of course I haven't
noticed this until now because I've always been spawning it _from_
another xterm! :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2039 cda61777-01e9-0310-a592-d414129be87e

21 years agognome-terminal insists on receiving the selection as COMPOUND_TEXT
simon [Sun, 13 Oct 2002 23:48:31 +0000 (23:48 +0000)]
gnome-terminal insists on receiving the selection as COMPOUND_TEXT
rather than STRING, so we can now supply that too. Pasting both ways
between pterm and gnome-terminal now works.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2038 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdded two simple command-line arguments: -fn (so I can have my Font
simon [Sun, 13 Oct 2002 12:54:17 +0000 (12:54 +0000)]
Added two simple command-line arguments: -fn (so I can have my Font
Of Choice back :-) and -e to run a command other than $SHELL.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2037 cda61777-01e9-0310-a592-d414129be87e

21 years agoResizing of pterm now works, and the size information is correctly
simon [Sun, 13 Oct 2002 12:44:01 +0000 (12:44 +0000)]
Resizing of pterm now works, and the size information is correctly
sent on to the pty.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2036 cda61777-01e9-0310-a592-d414129be87e

21 years agoDeal with the appalling mouse pointer colours. (Why doesn't GTK let
simon [Sun, 13 Oct 2002 12:17:03 +0000 (12:17 +0000)]
Deal with the appalling mouse pointer colours. (Why doesn't GTK let
us select our own mouse pointer fg and bg for standard pointers?
It's ludicrous that we can only do it for pixmap-derived ones. :-( )

git-svn-id: svn://svn.tartarus.org/sgt/putty@2035 cda61777-01e9-0310-a592-d414129be87e

21 years agoShift-Ins pastes.
simon [Sun, 13 Oct 2002 11:27:39 +0000 (11:27 +0000)]
Shift-Ins pastes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2034 cda61777-01e9-0310-a592-d414129be87e

21 years agoSelection now supported in pterm. Required small modifications
simon [Sun, 13 Oct 2002 11:24:25 +0000 (11:24 +0000)]
Selection now supported in pterm. Required small modifications
outside the unix subdir, owing to more things needing to become
platform-dependent.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2033 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix underline, which I cleverly broke while adding support for the
simon [Sun, 13 Oct 2002 09:57:07 +0000 (09:57 +0000)]
Fix underline, which I cleverly broke while adding support for the
window border. Oops.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2032 cda61777-01e9-0310-a592-d414129be87e

21 years agoScrollbar now exists and functions; so do Shift-PgUp / Shift-PgDn.
simon [Sun, 13 Oct 2002 09:54:36 +0000 (09:54 +0000)]
Scrollbar now exists and functions; so do Shift-PgUp / Shift-PgDn.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2031 cda61777-01e9-0310-a592-d414129be87e

21 years agoThe Great Defaults Change (and about time too)! SSH now defaults to
simon [Sun, 13 Oct 2002 08:56:58 +0000 (08:56 +0000)]
The Great Defaults Change (and about time too)! SSH now defaults to
protocol 2, and background-colour erase now defaults to on.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2030 cda61777-01e9-0310-a592-d414129be87e