Граф коммитов

174 Коммитов

Автор SHA1 Сообщение Дата
Ben Harris 873b95deff Put prototypes for the functions exported by wcwidth.c in putty.h, and remove
one from terminal.c.  Have wcwidth.c include putty.h to get its prototypes.

[originally from svn r2377]
2002-12-29 15:08:27 +00:00
Ben Harris d7f5c50562 Add some pragmas so that Mac compilers know that fatalbox() and
modalfatalbox() don't return.

[originally from svn r2374]
2002-12-29 13:21:12 +00:00
Simon Tatham a564ad3140 Support for doing DNS at the proxy end. I've invented a new type of
SockAddr, which just contains an unresolved hostname and is created
by a stub function in *net.c. It's an error to pass this to most of
the real-meat functions in *net.c; these fake addresses should have
been dealt with by the time they get down that far. proxy.c now
contains name_lookup(), a wrapper on sk_namelookup() which decides
whether or not to do real DNS, and the individual proxy
implementations each deal sensibly with being handed an unresolved
address and avoid ever passing one down to *net.c.

[originally from svn r2353]
2002-12-18 16:23:11 +00:00
Simon Tatham 8304f4e0dc Stop proxying connections to localhost by default; should fix
`x11-proxy-crash'.

[originally from svn r2348]
2002-12-18 12:18:54 +00:00
Simon Tatham 9d58830c3f Increase the size of the `font' buffer in the Config structure, for
the benefit of X font names which are rather more verbose than
Windows. One day I want to replace all these fixed-size buffers with
sensible dynamically allocated stuff, but not today.

[originally from svn r2260]
2002-11-26 19:35:40 +00:00
Ben Harris d60ea36673 Add a Config * argument to ldisc_create(), and use it in place of the global
cfg throughout ldisc.c.  Not tested other than on Mac, but all other ports
just pass &cfg as this argument for now.

[originally from svn r2250]
2002-11-23 20:02:38 +00:00
Ben Harris 8280e645e4 Add a "Config *" argument to term_init(), and use that instead of the global
cfg throughout the terminal emulator.  Not tested in PuTTY and pterm, but they
just pass in &cfg.

[originally from svn r2248]
2002-11-23 19:01:01 +00:00
Ben Harris 03aa22be3c Bring in some of my scroll-optimisation stuff from the old Mac port.
This introduces a new front-end function, do_scroll(), which is expected to
scroll a part of the physical display and cause repaint events for any
areas that couldn't be scrolled (e.g. because they were hidden).
scroll_display() is a wrapper around this which also updates disptext to
match.

Currently, scroll_display is only used in response to user scrollback requests
(via term_scroll()), but extending scroll() to use it as well should be
easy.

All of this is conditional on the front end's defining OPTIMISE_SCROLL, since
only the Mac front end currently implements do_scroll().

[originally from svn r2242]
2002-11-23 13:07:29 +00:00
Ben Harris c4eebb49a9 Tentative merge of ben-mac-port (only dead for three years!) into the trunk.
This doesn't include any mkfiles.pl glue, and is missing one or two other
fixes.  The terminal emulator is kind of working, though, as, I believe, is
the store module.  Everything else is yet to be done.

[originally from svn r2226]
2002-11-19 02:13:46 +00:00
Ben Harris f81cd2a3c6 Use <stddef.h> to get wchar_t, rather than <wchar.h> (or nothing, in putty.h).
Both are required to contain wchar_t in C99, but only <stddef.h> does in the
version of MPW I've got here.

[originally from svn r2206]
2002-11-10 00:03:55 +00:00
Ben Harris a12a78bcb9 Rename CharWidth() to char_width(). The former name clashes with an API
function in Mac OS.

[originally from svn r2205]
2002-11-09 21:46:21 +00:00
Simon Tatham 79b086658d Further deglobalisation: settings.c now has a more sensible interface.
[originally from svn r2162]
2002-10-30 18:12:46 +00:00
Simon Tatham ea429ee71a Retire another global in favour of adding a feature to the
terminal.c interface.

[originally from svn r2148]
2002-10-26 14:06:52 +00:00
Simon Tatham 4756c15fc9 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.

[originally from svn r2147]
2002-10-26 12:58:13 +00:00
Simon Tatham 948f95d5e8 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.

[originally from svn r2143]
2002-10-26 11:08:59 +00:00
Simon Tatham 24530b945e 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!

[originally from svn r2142]
2002-10-26 10:33:59 +00:00
Simon Tatham 0b2523eeda Line discipline module now uses dynamically allocated data. Also
fixed one or two other minor problems.

[originally from svn r2141]
2002-10-26 10:16:19 +00:00
Simon Tatham 72ff571148 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.

[originally from svn r2127]
2002-10-25 11:30:33 +00:00
Simon Tatham 6e549a6db3 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 :-(

[originally from svn r2125]
2002-10-24 14:12:55 +00:00
Simon Tatham a9bd716df8 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().

[originally from svn r2117]
2002-10-23 12:41:35 +00:00
Simon Tatham 0a80c983e2 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?

[originally from svn r2115]
2002-10-22 16:11:33 +00:00
Simon Tatham 07878d8b7c 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.

[originally from svn r2107]
2002-10-20 13:23:30 +00:00
Simon Tatham 7d7b523977 Make the shadow bold offset configurable, after discovering that
7x13 goes the other way to all other X fonts I've ever seen. (Arrgh.)

[originally from svn r2095]
2002-10-17 16:51:01 +00:00
Simon Tatham e30ab28d34 Oops - check in leftovers from yesterday's development. That's what
I get for running most of my cvs commands in the unix subdir :-/

[originally from svn r2078]
2002-10-16 09:28:17 +00:00
Simon Tatham 0c011dcbe0 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.

[originally from svn r2060]
2002-10-15 13:07:18 +00:00
Simon Tatham 8bc305cafe Only engage a GTK idle function when absolutely necessary, otherwise
the whole app spins on it and takes up CPU all the time.

[originally from svn r2052]
2002-10-14 23:32:00 +00:00
Simon Tatham b3072e227e SEL_NL is different between Windows and Unix; move it out into the
platform-specific header files.

[originally from svn r2043]
2002-10-14 09:06:31 +00:00
Simon Tatham ffff6f32c7 Selection now supported in pterm. Required small modifications
outside the unix subdir, owing to more things needing to become
platform-dependent.

[originally from svn r2033]
2002-10-13 11:24:25 +00:00
Simon Tatham 6d0e9b205d First phase of porting. pterm now compiles and runs under Linux+gtk.
The current pty.c backend is temporarily a loopback device for
terminal emulator testing, the display handling is only just enough
to show that terminal.c is functioning, the keyboard handling is
laughable, and most features are absent. Next step: bring output and
input up to a plausibly working state, and put a real pty on the
back to create a vaguely usable prototype. Oh, and a scrollbar would
be nice too.
In _theory_ the Windows builds should still work fine after this...

[originally from svn r2010]
2002-10-09 18:09:42 +00:00
Jacob Nevins 8d5f7e293e Remove "-log" option from Plink. AFAICT this code has been dead since Roman
Pompejus' improved logging (Jan 2001).

[originally from svn r2000]
2002-10-07 17:43:07 +00:00
Simon Tatham 64c52b0d30 Begin destabilisation in the wake of 0.53! This checkin contains the
beginning of a Unix port. It's nowhere near done, and currently it
won't even compile on Unix. But this represents the start of the
process of separating out platform-specific code, and also contains
the mkfiles.pl changes required to support a Unix makefile and a
non-flat source tree.

[originally from svn r1993]
2002-10-07 16:45:23 +00:00
Simon Tatham ace232f5fa Remove last vestiges of `buggymac' in the Config structure. Might
have been cause of a Plink bug since it no longer got initialised.

[originally from svn r1986]
2002-10-01 18:30:15 +00:00
Simon Tatham a394f20829 Add a new SSH2 bug: some servers apparently claim to be able to do
DH group exchange, but choke when you actually try it. Never
automatically enabled; manual control only.

[originally from svn r1982]
2002-09-26 18:37:33 +00:00
Simon Tatham 994aee285f Log file tinkering: copy Event Log entries into the SSH packet log,
so that when people send us a packet log they never forget to send
the Event Log alongside it :-)

[originally from svn r1960]
2002-09-15 13:21:32 +00:00
Jacob Nevins 9f9739602b Semi-bug "long-usernames":
Bump username storage from 32 to 100 chars. Also replaced a couple of magic
numbers with sizeof in ssh.c.
I don't believe this is going to startle any of the protocols PuTTY talks.

[originally from svn r1952]
2002-09-12 16:05:05 +00:00
Simon Tatham 3391745d2d Introduce the Bugs control panel, for overriding PuTTY's server
version number checks to determine the presence or absence of server
bugs.

[originally from svn r1936]
2002-09-08 13:28:38 +00:00
Simon Tatham 118fc8c81e Revamp of command-line handling. Most command line options should
now be processed in cmdline.c, which is called from all utilities
(well, not Pageant or PuTTYgen). This should mean we get to
standardise almost all options across almost all tools. Also one
major change: `-load' is now the preferred option for loading a
saved session in PuTTY proper. `@session' still works but is
deprecated.

[originally from svn r1799]
2002-08-04 21:18:56 +00:00
Simon Tatham eabd704d1e Justin Bradford's proxy support patch. Currently supports only HTTP
CONNECT, but contains an extensible framework to allow other
proxies. Apparently SOCKS and ad-hoc-telnet-proxy are already
planned (the GUI mentions them already even though they don't work
yet). GUI includes full configurability and allows definition of
exclusion zones. Rock and roll.

[originally from svn r1598]
2002-03-23 17:47:21 +00:00
Simon Tatham ae476d5567 ANSI remote printer support. Raw mode only.
[originally from svn r1581]
2002-03-09 17:59:15 +00:00
Simon Tatham fcb31d5cfe Well, there was bound to be one I'd forgotten: the new Features
panel should include an option to disable xterm mouse reporting. So
now it does. Woo.

[originally from svn r1579]
2002-03-09 11:47:39 +00:00
Simon Tatham 2df966b43c Add the Features panel, allowing you to disable a bunch of the more
controversial terminal features.

[originally from svn r1576]
2002-03-06 23:04:20 +00:00
Simon Tatham dac0d45699 Ensure our network layer is properly cleaned up before PuTTY exits.
Specifically, we explicitly closesocket() all open sockets, which
appears to be necessary since otherwise Windows sends RST rather
than FIN. I'm _sure_ that's a Windows bug, but there we go.

[originally from svn r1574]
2002-03-06 20:13:22 +00:00
Simon Tatham 466b1c82d5 Create the long-awaited console.c, and move the common routines out
of scp.c, psftp.c and plink.c into it. Additionally, add `batch
mode', in which all the interactive prompts (bad host key, log file
exists, insecure cipher, password prompt) are disabled and safe
responses are assumed. (The idea being that if you run PSCP, for
example, in a cron job then you'd probably rather it failed and
exited instead of leaving the cron job wedged while it waits for
user input that will never arrive.)

[originally from svn r1525]
2001-12-31 16:15:19 +00:00
Simon Tatham 726f9dde7e Add a configurable option to make Return in Telnet send an ordinary
^M instead of the Telnet New Line code. Unix-type telnetds don't
care one way or the other; RDB claims some telnetds prefer Telnet
NL; and now someone has found one that can't deal with Telnet NL and
prefers ^M. Sigh.

[originally from svn r1520]
2001-12-29 17:21:26 +00:00
Simon Tatham ef885c78ca Add a new back-end function to return the exit code of the remote
process. This is functional in SSH, and vestigial (just returns 0)
in the other three protocols. Plink's Windows exit code is now
determined by the remote process exit code, which should make it
more usable in scripting applications. Tested in both SSH1 and SSH2.

[originally from svn r1518]
2001-12-29 15:31:42 +00:00
Simon Tatham 88a3baa065 Add the remote counterpart for the `local port forwardings accept
connections from outside localhost' switch. Interestingly OpenSSH
3.0 appears to ignore this (though I know it works because ssh.com
3.0 gets it right, and the SSH packet dump agrees that I'm doing the
right thing).

[originally from svn r1496]
2001-12-15 12:15:24 +00:00
Simon Tatham 3ed0d44f16 Retired the #ifdef DUMP_PACKETS stuff in ssh.c because I'm utterly
sick of recompiling to enable packet dumps. SSH packet dumping is
now provided as a logging option, and dumps to putty.log like all
the other logging options. While I'm at it I cleaned up the format
so that packet types are translated into strings for easy browsing.
POSSIBLE SIDE EFFECT: in the course of this work I had to re-enable
the SSH1 packet length checks which it turns out hadn't actually
been active for some time, so it's possible things might break as a
result. If need be I can always disable those checks for the 0.52
release and think about it more carefully later.

[originally from svn r1493]
2001-12-14 14:57:50 +00:00
Simon Tatham 7983d2dd28 Disable username switching between SSH2 auth attempts, and add a
configurable option so users can re-enable the feature _if_ they
know they have an SSH2 server that isn't going to get shirty about
it. Inspired by a spectacular increase in OpenSSH's shirtiness.

[originally from svn r1474]
2001-12-11 21:00:01 +00:00
Simon Tatham 2b99a70743 Integrate PuTTY and its help file. Now that's what I call a good
lunchtime's work :-)

[originally from svn r1458]
2001-12-06 13:28:02 +00:00
Simon Tatham b9c8a9270a Oops - check the _rest_ of the SSH2 DES patch back in. D'oh!
[originally from svn r1431]
2001-11-29 23:58:02 +00:00