Ben Harris [Sat, 1 Feb 2003 21:44:05 +0000 (21:44 +0000)]
Rather more natural (if much more complex) Mac Filename implementation.
Filenames are represented as a FSSpec, which is converted to and from an
alias record ('alis' resource) when saving and loading sessions.
.
It might be an idea to allow in-core Filenames to contain alias records too,
so that they can refer to directories that don't exist on the current system,
but that requires Filenames to be dynamically allocated, which is likely to be
a pain.
Simon Tatham [Sat, 1 Feb 2003 12:54:40 +0000 (12:54 +0000)]
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 :-)
Ben Harris [Sat, 1 Feb 2003 12:26:33 +0000 (12:26 +0000)]
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.
Simon Tatham [Thu, 30 Jan 2003 13:39:24 +0000 (13:39 +0000)]
Yet more fallout from the 16-colour changes. I think by this time
these fiddly little changes are no longer bugs I introduced
recently, they're bugs that have been around all along and I've only
just smoked out by altering the ATTR_* definitions.
Simon Tatham [Thu, 30 Jan 2003 10:19:05 +0000 (10:19 +0000)]
Antonin Brothanek points out that `Incoming packet was garbled on
decryption' could be a result of the wrong setting of the
`Miscomputes SSH2 encryption keys' bug workaround option.
Jacob Nevins [Wed, 29 Jan 2003 16:39:18 +0000 (16:39 +0000)]
Further cosmetic tweaks to file-selection boxes per observed conventions
on Windows:
- Change "AllFiles" to "All Files (*.*)"
- Extensions in lower case
Simon Tatham [Tue, 28 Jan 2003 12:06:37 +0000 (12:06 +0000)]
And another bit missing from the settings changes: pterm's platform
default for CloseOnExit was encoded wrongly. Hopefully this should
be everything now; I'm really starting to get sick of picking up the
pieces after my two checkins yesterday. Perhaps I should have waited
until I had a brain before doing them in the first place.
Simon Tatham [Tue, 28 Jan 2003 09:26:32 +0000 (09:26 +0000)]
Oh, _that's_ why that `if' had the sense it did. Good grief.
Apparently I used to rely on the fact that the same `erase_char'
used to wipe parts of the screen was also a good value to use for
resetting line attributes. Should now be more robust against future
reorganisations of the ATTR_* bit fields.
Ben Harris [Tue, 28 Jan 2003 00:17:17 +0000 (00:17 +0000)]
Security fascists might claim that logging every keypress to stderr is a bad
idea, so stop doing that (only in the Mac port, so not actually much of a
problem).
Simon Tatham [Mon, 27 Jan 2003 23:18:16 +0000 (23:18 +0000)]
Of course, that cleanup I did earlier in which I rationalised all
the various `yes/no/maybe' enums into one common one missed a vital
point: all those enums mapped on to integers in different ways,
which affected the format of stored settings. Arrgh. So now
settings.c contains yet more painful warts and I'm _really_ starting
to think it's about time we designed a new set of human-usable
config keywords and retired this lot to the status of Unpleasant
Backwards-Compatibility Relic.
Simon Tatham [Mon, 27 Jan 2003 23:03:31 +0000 (23:03 +0000)]
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.
Simon Tatham [Mon, 27 Jan 2003 18:02:24 +0000 (18:02 +0000)]
Remove all `enum'-typed variables from the Config structure.
Everything in there which is integral is now an actual int, which
means my forthcoming revamp of the config box will be able to work
with `int *' pointers without fear of doom.
Ben Harris [Mon, 27 Jan 2003 00:39:01 +0000 (00:39 +0000)]
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.
Ben Harris [Sat, 25 Jan 2003 19:23:03 +0000 (19:23 +0000)]
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.
Ben Harris [Sat, 25 Jan 2003 17:20:54 +0000 (17:20 +0000)]
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.
Ben Harris [Sat, 25 Jan 2003 16:16:45 +0000 (16:16 +0000)]
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().
Jacob Nevins [Thu, 23 Jan 2003 11:37:54 +0000 (11:37 +0000)]
In pursuance of `icon-title-default-change':
Change the sense of cfg.win_name_always' representation in the UI (from
`Avoid ever using icon title' to `Separate window and icon titles').
Also update the docs to match reality.
Simon Tatham [Wed, 22 Jan 2003 20:22:39 +0000 (20:22 +0000)]
Next instalment of the Great Incompatible Defaults Change: `avoid
ever using icon title' now defaults to On, because in general it
seems to cause more problems than it solves.
Jacob Nevins [Tue, 21 Jan 2003 19:18:06 +0000 (19:18 +0000)]
Fix "-v" in the Windows console utilities (plink, pscp, psftp).
I'm not convinced I've done this the right way (I've introduced a static for
logctx in console.c) but it will do for now.
Ben Harris [Sat, 18 Jan 2003 23:26:56 +0000 (23:26 +0000)]
Use the correct ProcInfo for AddrToStr. This makes the MacTCP code work in
PowerPC builds. Well, makes it not crash, anyway -- AddrToStr doesn't seem
to be returning amything very useful.
Ben Harris [Sat, 18 Jan 2003 20:09:21 +0000 (20:09 +0000)]
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.
Ben Harris [Sat, 18 Jan 2003 16:10:21 +0000 (16:10 +0000)]
Various things to make the Finder like us:
- Change the creator of files we don't want the user to open to 'pTTI' (for
"PuTTY internal"), and give them application-missing strings.
- Provide missing-application names for saved sessions.
- Provide a ResEdit 'TMPL' resource for integers in saved sessions.
- Provide an icon for saved session stationery pads (maybe "Default Settings"
should be one of these by default). No code to handle this yet.
Ben Harris [Sat, 18 Jan 2003 12:03:28 +0000 (12:03 +0000)]
Simplify the random-seed-saving code: There's no need to take great care to
preserve the old file in case the update is interrupted and replace it
atomically, so we just overwrite in place. Much simpler.
Jacob Nevins [Thu, 16 Jan 2003 15:43:18 +0000 (15:43 +0000)]
Steven Shockley points out that the .PPK extension is far from obvious to
users. Update the file selection dialogs to mention it per the usual Windows
convention, and also sprinkle references to it throughout the docs. I've
also scattered hints that most tools need PuTTY's native format; perhaps this
will reduce the frequency with which FAQ A.1.2 trips people up.
Ben Harris [Wed, 15 Jan 2003 23:30:21 +0000 (23:30 +0000)]
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.
Jacob Nevins [Wed, 15 Jan 2003 20:47:50 +0000 (20:47 +0000)]
Implement Simon's suggestion of moving DEFAULT_PROTOCOL into a per-backend-
link-module const variable `be_default_protocol' which suggests a sensible
default to the front end (which can ignore it). (DEFAULT_PORT is replaced by a
lookup in the backend[] table.)
Still not pretty, but it does mean that the recent fix for `ssh-default'
doesn't break PuTTYtel.
Jacob Nevins [Wed, 15 Jan 2003 15:22:58 +0000 (15:22 +0000)]
`ssh-default': change the /DSSH_DEFAULT flag to a /DTELNET_DEFAULT one
and note its existence in Recipe. As far as I can tell there are no
documentation changes required.
Ben Harris [Tue, 14 Jan 2003 19:57:36 +0000 (19:57 +0000)]
Use the standard linedraw->Unicode mapping from unicode.c to generate
unitab_xterm. Most linedraw characters display correctly, but it's clear
that RDB and Apple disagree on some of the mappings.
Simon Tatham [Tue, 14 Jan 2003 18:43:45 +0000 (18:43 +0000)]
Miscellaneous fixes to finish up `remove-statics'. rlogin.c had a
holdout static I hadn't noticed; unicode.c had one too; and a large
number of statics that were perfectly OK due to being constants have
been made `const', with assorted `const' repercussions all over the
place. I now declare `remove-statics' to be fixed.
Ben Harris [Tue, 14 Jan 2003 18:43:26 +0000 (18:43 +0000)]
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.
Simon Tatham [Tue, 14 Jan 2003 18:28:23 +0000 (18:28 +0000)]
Deglobalise the Unicode module. Despite all my grand plans, I've
just done this the very simple way - bundle all the globals into a
data structure and pass pointers around. One particularly ugly wart
is that wc_to_mb now takes a pointer to this structure as an
argument (optional, may be NULL, and unused in any Unicode layer
that's even marginally less of a mess than the Windows one). I do
need to do this properly at some point, but for now this should just
about be adequate. As usual, the Mac port has not been updated.