1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 18:07:59 +00:00
Commit Graph

83 Commits

Author SHA1 Message Date
Owen Dunn
ea225b5889 Hide/show the scrollbar
[originally from svn r5230]
2005-01-30 14:59:47 +00:00
Owen Dunn
2374544eb3 Add a Change Settings dialogue box. Doesn't do anything yet.
[originally from svn r5216]
2005-01-26 23:30:34 +00:00
Owen Dunn
c29e61381a Colours now work properly, including 256-colour stuff.
Timing stuff now there, but almost certainly bogus.

[originally from svn r5160]
2005-01-21 00:02:59 +00:00
Simon Tatham
92f3b101f5 Slight improvement to cursor blink timing: since the cursor doesn't
blink when the window doesn't have focus, we don't schedule blink
timers at that point either.

Infrastructure change: term->has_focus should now not be written
directly from outside terminal.c. Instead, use the function
term_set_focus, which will sort out the blink timers as well.

[originally from svn r4911]
2004-11-27 19:34:45 +00:00
Simon Tatham
7ecf13564a New timing infrastructure. There's a new function schedule_timer()
which pretty much any module can call to request a call-back in the
future. So terminal.c can do its own handling of blinking, visual
bells and deferred screen updates, without having to rely on
term_update() being called 50 times a second (fixes: pterm-timer);
and ssh.c and telnet.c both invoke a new module pinger.c which takes
care of sending keepalives, so they get sent uniformly in all front
ends (fixes: plink-keepalives, unix-keepalives).

[originally from svn r4906]
[this svn revision also touched putty-wishlist]
2004-11-27 13:20:21 +00:00
Simon Tatham
089775eb02 First-stage support for Unicode combining characters. The `chars'
array of each `termline' structure now contains optional additional
entries after the normal number of columns, which are used to chain
a linked list of combining characters off any primary termchar that
needs it. This means we support arbitrarily many combining
characters per cell (unlike xterm's hard limit of 2).

Cut and paste works correctly (selecting a character cell containing
multiple code points causes all those code points to be cut and
pasted). Display works by simply overlaying all the relevant
characters on top of one another; this is good enough for Unix
(xterm does the same thing), and mostly seems OK for Windows except
that the Windows Unicode fonts have a nasty habit of not containing
most of the combining characters and thus overlaying an
unknown-code-point box on your perfectly good base glyph.

I had no idea how to add support in the Mac do_text(), so I've
simply stuck in an assertion that will trigger the first time a
combining character is displayed, and hopefully this will bite
someone with the clue to fix it.

[originally from svn r4622]
2004-10-14 16:42:43 +00:00
Simon Tatham
709a94e5f2 Re-engineering of terminal emulator, phase 1.
The active terminal screen is no longer an array of `unsigned long'
encoding 16-bit Unicode plus 16 attribute bits. Now it's an array of
`termchar' structures, which currently have 32-bit Unicode and 32
attribute bits but which will probably expand further in future.

To prevent bloat of the memory footprint, I've introduced a mostly
RLE-like compression scheme for storing scrollback: each line is
compressed into a compact (but hard to modify) form when it moves
into the term->scrollback tree, and is temporarily decompressed when
the user wants to scroll back over it. My initial tests suggest that
this compression averages about 1/4 of the previous (32 bits per
character cell) data size in typical output, which means this is an
improvement even without counting the new ability to extend the
information stored in each character cell.

Another beneficial side effect is that the insane format in which
Unicode was passed to front ends through do_text() has now been
rendered sane.

Testing is incomplete; this _may_ still have instabilities. Windows
and Unix front ends both seem to work as far as I've looked, but I
haven't yet looked very hard. The Mac front end I've edited (it
seemed obvious how to change it) but I can't compile or test it.

As an immediate functional effect, the terminal emulator now
supports full 32-bit Unicode to whatever extent the host platform
allows it to. For example, if you output a 4-or-more-byte UTF-8
character in Unix pterm, it will not display it properly, but it
will correctly paste it back out in a UTF8_STRING selection. Windows
is more restricted, sadly.

[originally from svn r4609]
2004-10-13 11:50:16 +00:00
Jacob Nevins
20f433efac Add a configuration option for TCP keepalives (SO_KEEPALIVE), default off.
No very good reason, but I've occasionally wanted to frob it to see if it
makes any difference to problems I'm having, and it was easy.

Tested that it does actually cause keepalives on Windows (with tcpdump);
should also work on Unix. Not implemented on Mac (does nothing), but then
neither is TCP_NODELAY.

Quite a big checkin, much of which is adding `keepalive' alongside `nodelay'
in network function calls.

[originally from svn r4309]
2004-06-20 17:07:38 +00:00
Simon Tatham
6bb121ecb9 Colin's const-fixing Patch Of Death. Seems to build fine on Windows
as well as Unix, so it can go in.

[originally from svn r3162]
2003-05-04 14:18:18 +00:00
Ben Harris
6db521f4b9 Remove a couple of spurious semicolons.
[originally from svn r3112]
2003-04-12 21:07:25 +00:00
Ben Harris
502d5b4e50 Update for Simon's from_backend changes.
[originally from svn r3111]
2003-04-12 21:06:34 +00:00
Ben Harris
f599817d78 Move the Mac port over to using snew/snewn/sresize.
[originally from svn r3024]
2003-03-29 23:07:55 +00:00
Ben Harris
4f59bac798 Rather than increasing the size of my switch statements yet further, have
a bunch of function pointers associated with each window to do things like
updates and click handling.  This is all looking disturbingly object-oriented.
.
While I'm here, separate out the about box into its own file, shared by PuTTY
and PuTTYgen.

[originally from svn r2850]
2003-02-15 16:22:15 +00:00
Ben Harris
10bccffd16 Clip host resize requests to the size of the desktop.
[originally from svn r2835]
2003-02-11 23:10:34 +00:00
Ben Harris
2c10ece60d Crude Event Log implementation for the Mac. I'm fairly convinced now that
using the List Manager was entirely the wrong decision on my part, so I'll
probably rewrite this to use TextEdit at some point, but it's better than
stderr even so.

[originally from svn r2811]
2003-02-07 01:38:12 +00:00
Ben Harris
a1e2199dc1 Add a level of indirection to make it rather easier to work out which of a
session's windows we're dealing with.

[originally from svn r2804]
2003-02-04 23:39:26 +00:00
Ben Harris
67312214da I can only quote the comment in <Scrap.h> which prompted this commit:
/*
    Newsflash! After 15 years of arduous toil, it's finally possible
    for specially trained typists wielding advanced text editing
    technology to define symbolic names for commonly used scrap
    flavor type constants! Apple triumphs again!
*/

[originally from svn r2791]
2003-02-04 02:08:03 +00:00
Ben Harris
16f40e8bcc Fix various breakages my Carbonisation caused in the Classic build, notably
that outside Carbon, CGrafPtr and GrafPtr are different types, even though
they're mostly interchangeable, so we need to interpose a cast between
GetWindowPort and SetPort.

[originally from svn r2790]
2003-02-04 02:03:53 +00:00
Ben Harris
13feddf9ea Carbonise. Currently, size tips and copy/paste won't work in Carbon.
[originally from svn r2789]
2003-02-04 01:53:50 +00:00
Ben Harris
1e67347b04 Convert keyboard events into Unicode properly. I can now type all manner of
interesting characters and have them work properly.

[originally from svn r2787]
2003-02-04 00:01:33 +00:00
Ben Harris
947b70006e Tidy up Simon's FontSpec abstraction.
Also, make fontspec_to_str not return the address of an automatic variable.
It now has a memory leak instead.

[originally from svn r2767]
2003-02-01 15:44:08 +00:00
Simon Tatham
f26b7aa0d3 Created new data types Filename' and FontSpec', intended to be
opaque to all platform-independent modules and only handled within
per-platform code. `Filename' is there because the Mac has a magic
way to store filenames (though currently this checkin doesn't
support it!); `FontSpec' is there so that all the auxiliary stuff
such as font height and charset and so on which is needed under
Windows but not Unix can be kept where it belongs, and so that I can
have a hope in hell of dealing with a font chooser in the forthcoming
cross-platform config box code, and best of all it gets the horrid
font height wart out of settings.c and into the Windows code where
it should be.
The Mac part of this checkin is a bunch of random guesses which will
probably not quite compile, but which look roughly right to me.
Sorry if I screwed it up, Ben :-)

[originally from svn r2765]
2003-02-01 12:54:40 +00:00
Ben Harris
fe5f4c14f4 Richard's lazy-scrolling patch. This builds up scroll operations in a list,
combining adjacent ones for the same region, and runs them all in do_paint.
I'm not sure it's entirely right, but it works on my Mac in every case I've
tested.

[originally from svn r2763]
2003-02-01 12:26:33 +00:00
Ben Harris
6f43ffc13c Don't log every keypress by default here either.
[originally from svn r2739]
2003-01-28 00:35:54 +00:00
Ben Harris
b29a64c760 Fix a minor oversight in the new 16-colour code for the Mac, which was
calculating the background colour wrongly.

[originally from svn r2738]
2003-01-28 00:25:20 +00:00
Simon Tatham
c370336a92 xterm apparently supports ESC[90m through ESC[97m to set bright
foreground colours, and ESC[100m through ESC[107m to set bright
background colours. Hence, so do we. Bright-foreground is
distinguishable from bold, and bright-background distinguishable
from blink, when it leaves terminal.c; the front end may then choose
to display them in the same way if it's configured to do so. This
change makes the xterm backend for Turbo Vision (!!!) work properly.
Untested on Mac.

[originally from svn r2734]
2003-01-27 23:03:31 +00:00
Ben Harris
de34bdac6d First attempt at a platform-independent keyboard handler. This isn't complete
yet -- there's no Alt+keypad support, and no way for the front-end to find
out what it should do with the Num Lock light.  It's also not fully tested.
Nonetheless, it's at least as good as the previous Mac keyboard handler.
Other platforms probably shouldn't adopt it just yet.

[originally from svn r2728]
2003-01-27 00:39:01 +00:00
Ben Harris
146ff8f190 Support for pasting 'TEXT', ie text in the local character set. At the moment,
we assume it's in the system script -- later we should check for 'styl' scrap
in case it isn't.

[originally from svn r2726]
2003-01-25 19:23:03 +00:00
Ben Harris
787fcd3eb7 Add support for copying non-Unicode text to the clipboard. We also send a
simple 'styl' record along with it to specify the font and suchlike.  I'm
not sure it's worth making this optional in the way the RTF is in Windows.

[originally from svn r2724]
2003-01-25 17:20:54 +00:00
Ben Harris
af4be2e83e Change the term_mouse interface a little so that it gets passed
both the raw and the cooked mouse button, with the mapping being done in
advance by the front-end.  This is useful because it allows the front-end to
use information other than the raw button (e.g. the modifier state) to decide
which cooked button to generate.
.
Front ends other than the Mac one are untested, but they just call
translate_button() themselves and pass the result to term_mouse().

[originally from svn r2721]
2003-01-25 16:16:45 +00:00
Ben Harris
9812db5f1f Add support for "Duplicate Session", moving back-end selection into
mac_startsession() in the process.

[originally from svn r2718]
2003-01-25 15:15:40 +00:00
Ben Harris
99c1029649 Support for saving sessions on the Mac. This is slightly useful even in the
absence of a config dialogue, since it allows me to get Default Settings out.

[originally from svn r2646]
2003-01-18 20:09:21 +00:00
Ben Harris
2dc0bf7a60 Move mac_opensession() from macterm.c to macdlg.c.
[originally from svn r2641]
2003-01-18 16:54:25 +00:00
Ben Harris
694aafa071 Add the ability to close sessions. This adds *_free() functions to most
areas of the code.  Not all back-ends have been tested, but Telnet and SSH
behave reasonably.

Incidentally, almost all of this patch was written through Mac PuTTY,
admittedly over a Telnet connection.

[originally from svn r2615]
2003-01-15 23:30:21 +00:00
Ben Harris
1d92c2b783 Update for Unicode deglobalisations.
[originally from svn r2600]
2003-01-14 19:42:00 +00:00
Ben Harris
0edb75b696 Remove debugging printfs from mac_workoutfontscale().
[originally from svn r2595]
2003-01-14 18:44:34 +00:00
Ben Harris
1f39efb94d Add double width/height support. This passes all the relevant parts of
vttest apart from the "mad programmer" screen, which I think is a linedraw
problem.
This also intorduces proper clipping of the drawn text for good measure.

[originally from svn r2593]
2003-01-14 18:43:26 +00:00
Ben Harris
a185e16467 request_resize() needs to call term_size() to tell the terminal emulator
that its resize request has been approved.

[originally from svn r2591]
2003-01-14 15:24:51 +00:00
Ben Harris
0e52f05217 Set the window title to the canonical host name when we connect.
[originally from svn r2574]
2003-01-12 16:25:58 +00:00
Ben Harris
b4d37df579 Consequences of Simon's recent deglobalisation changes.
[originally from svn r2573]
2003-01-12 16:11:27 +00:00
Ben Harris
80c29aa16f Don't fatalbox() unconditionally when opening a connection, since that makes
it a little difficult to do anything.

[originally from svn r2559]
2003-01-12 14:44:12 +00:00
Ben Harris
c81fa2ff24 COmpiling _before_ committing is usually a good idea.
[originally from svn r2556]
2003-01-12 14:23:00 +00:00
Ben Harris
05ae857752 Correct code to insert into a doubly-linked list.
[originally from svn r2553]
2003-01-12 13:50:04 +00:00
Ben Harris
5d90fd4d1d Remove code for splatting test data into new terminals, since we can do
that over real network connections now.

[originally from svn r2549]
2003-01-12 01:25:34 +00:00
Ben Harris
0d8ee2458a Implement get_window_title().
[originally from svn r2525]
2003-01-09 23:29:22 +00:00
Ben Harris
34a96d4924 Use c2pstrcpy() rather than silly sprintf() tricks.
[originally from svn r2523]
2003-01-09 22:51:41 +00:00
Ben Harris
76a43ad512 c2pstr() is deprecated. Use c2pstrcpy() instead.
[originally from svn r2522]
2003-01-09 22:45:48 +00:00
Ben Harris
697794abbf Fairly major hackery to get SSH going on the Mac. Half the support
functions are only dummy stubs, but it's still minimally usable.  At
least, as long as you don't want to do anything complex like logging out.

[originally from svn r2500]
2003-01-08 22:46:12 +00:00
Ben Harris
a7ba273b5b When looking for the correct backend to use, look in the configuration
structure for the session, not the almost-dead global cfg.

[originally from svn r2457]
2003-01-05 11:31:51 +00:00
Ben Harris
ac85d9b8c9 Second work-in-progress MacTCP commit. We can now open a connection, but
not transfer any data across it.

[originally from svn r2456]
2003-01-05 10:52:56 +00:00