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

1260 Коммитов

Автор SHA1 Сообщение Дата
Ben Harris c975d75c74 Driver script for building PuTTY under MPW. MPW isn't multi-tasking, so its
"make" program just emits a script for us to run.  This script wraps all that
horribleness up so we don't have to see it.

[originally from svn r2274]
2002-12-02 21:06:12 +00:00
Ben Harris e3cc8181cc Add an entry for the Mac version of PuTTY.
[originally from svn r2273]
2002-12-02 21:03:14 +00:00
Ben Harris 26fcf5f991 Add support for generating MPW Makefiles. This makes the following changes:
* splitline gets support for changing the continuation character.
* deps returns a data structure for the output routine to format as
  appropriate.
* There's a new program type, [M], for Macintosh.
* There's a new backend to output mac/Makefile.mpw.

[originally from svn r2272]
2002-12-02 21:01:11 +00:00
Ben Harris 12081087e7 Improve support for non-colour displays by adding a mask of attributes to
ignore when breaking text into runs for display, and implement setting this
on Mac (other ports just use 0xffffffff).

We don't use DeviceLoop for this any more because Apple Technical Q&A
QA1024 says we shouldn't.  Unlike their example, we don't depend on the
Display Manager's being present either.

[originally from svn r2264]
2002-11-29 00:32:03 +00:00
Ben Harris 26f8c13f7b Don't call SetFractEnable every time we draw some text, since
SetFractEnable unconditionally flushes the Font Manager's width cache,
and the default is fine for us anyway.  This more or less doubles
redraw speed, which is nice, but still not really fast enough.

[originally from svn r2263]
2002-11-28 21:10:55 +00:00
Ben Harris 4b3ed26016 Follow the recommendations in Tech Note TB575 for clipping off the space
for the horizontal scroll bar when drawing the grow box.

[originally from svn r2262]
2002-11-28 21:02:07 +00:00
Ben Harris 81b29767a4 Use StdText() rather than DrawText, so that (later) we can support scaling of
text to get double-width etc.

Also set the background when scrolling in Original Quickdraw.

[originally from svn r2261]
2002-11-28 00:25:09 +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 a8e0271b8d Substantial overhaul of colour handling in do_text(). Highlights include:
* No more mucking about with transfer modes.  We always set up the foreground
  and background sensibly, EraseRect the whole lot and use srcOr.  Apple
  Tech Note QD505 suggests that this should be faster than srcCopy.
* Always use the Palette Manager if we've got Color QuickDraw, even in 1bpp
  modes.
* Apply the cursor colours _after_ all the other stuff, rather than trying to
  get them through everything else intact.

Unfortunately, this doesn't make much difference to the speed.

[originally from svn r2259]
2002-11-26 01:32:51 +00:00
Ben Harris f520d663c9 Make the default font on Mac OS be Monaco 9 rather than Monaco 10, since the
former is available as a bitmap.

[originally from svn r2258]
2002-11-25 23:34:59 +00:00
Ben Harris 76065bcb1e Remove a spurious 'q'.
[originally from svn r2257]
2002-11-25 19:02:23 +00:00
Ben Harris 5de2925051 Add support for displaying the licence window.
[originally from svn r2255]
2002-11-24 15:08:52 +00:00
Ben Harris a1b5ba2270 Fix scrolling on systems without Color QuickDraw. It seems that the current
background colour and pen mode have some silly effects on ScrollRect, so
set them back to their defaults before calling it.

[originally from svn r2254]
2002-11-24 00:38:44 +00:00
Ben Harris d63d02b743 Don't try to initialise the palette unless we have Color QuickDraw. This gets
PuTTY running on my Mac SE again (albeit very slowly and with scroll
optimisation broken for some reason).

[originally from svn r2253]
2002-11-23 22:36:56 +00:00
Ben Harris 19e1c15761 Fix a bug in scroll_display(): when the scrolled region contains the cursor
we need to update dispcurs as well as disptext.

Add scroll optimisation to scroll().  This makes it rather obvious that scroll
optimisation is breaking with PuTTY's usual policy of lazy updates, since
scrolling is done eagerly.  Fixing this so that all the scrolling is saved
up for do_paint would be nice, but non-trivial.

[originally from svn r2252]
2002-11-23 21:42:46 +00:00
Ben Harris ac63fb6514 Remove stray debugging printfs.
[originally from svn r2251]
2002-11-23 20:40:22 +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 c0b887a0a2 Return the state information from loop_init() in the correct way. This means
the backend actually works now.

[originally from svn r2249]
2002-11-23 19:58:55 +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 7b0352362c Only try to retrieve a 'vers' resource from the current resource file (the
application), rather from the entire chain.  This prevents us displaying the
System version if PuTTY doesn't have one.  Also cope with not finding any
'vers' resource.

[originally from svn r2247]
2002-11-23 18:22:47 +00:00
Ben Harris a90e1fda80 We don't currently need the Thread Manager (and all being well we never will),
so stop checking for it.

[originally from svn r2246]
2002-11-23 15:11:13 +00:00
Ben Harris 721399ac82 On a keypress, hide the mouse cursor, send the key to the line discipline
(rather than straight to the backend), and then prod the terminal.  I think
this is closer to the correct set of things to do.

[originally from svn r2245]
2002-11-23 14:22:11 +00:00
Ben Harris 1eef3b7e84 Remove a debugging printf.
[originally from svn r2243]
2002-11-23 13:16:36 +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
Jacob Nevins d923ad791e Note about CTRL-C trick for copying text of error dialogs
[originally from svn r2240]
2002-11-23 11:22:57 +00:00
Ben Harris 4e25694ee5 Update the status of the Mac port.
[originally from svn r2239]
2002-11-22 00:07:31 +00:00
Jacob Nevins fb334041df Note that default will change to SSH-2 next release
[originally from svn r2238]
2002-11-21 00:15:52 +00:00
Simon Tatham 0c110dcd10 Fixes for more robust handling of command-line parse errors.
[originally from svn r2236]
2002-11-20 20:09:02 +00:00
Simon Tatham 75ebfa28f0 Interchange two parameters in a printf, to prevent a silly segfault.
[originally from svn r2235]
2002-11-20 19:56:10 +00:00
Simon Tatham 57d1921d04 Largely-placeholder man page for Plink, for the sake of not
irritating `make install'. Thanks RJK, again.

[originally from svn r2234]
2002-11-20 19:49:59 +00:00
Ben Harris 55c618d344 Fiddle with mac_initpalette() so that the cursor works in 2bpp modes as well.
[originally from svn r2233]
2002-11-20 00:33:44 +00:00
Ben Harris 55fc07c583 Remove has_focus from Session and use the one in Terminal. Active vs passive
cursor now behaves correctly.

[originally from svn r2232]
2002-11-20 00:11:05 +00:00
Ben Harris d50ad9ddb9 Remove CURSOR_FG_BOLD and CURSOR_BG_BOLD, and hence bring reality in line
with palette_reset()'s expectations.

[originally from svn r2231]
2002-11-19 23:59:27 +00:00
Ben Harris 93a461028b Pass co-ordinates to term_paint() in characters rather than pixels. Partial
redraws now work rather better.

[originally from svn r2230]
2002-11-19 22:05:48 +00:00
Jacob Nevins 4c24598b57 Add mac/ to include paths after discussion with bjh21
[originally from svn r2229]
2002-11-19 19:36:14 +00:00
Ben Harris 3cab3674e8 A couple of useful test backends.
[originally from svn r2228]
2002-11-19 12:29:45 +00:00
Ben Harris ba0dbdfecc Mac resource source file, missed in last commit.
[originally from svn r2227]
2002-11-19 02:14:35 +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 b31bf55bc0 When processing input, refer to CR and LF as \015 and \012 respectively,
rather than \r and \n.  The latter tend to get swapped around by Mac C
compilers.

[originally from svn r2225]
2002-11-18 23:49:30 +00:00
Ben Harris 285acf7ed2 ISO-IR entry 157 appears to correspond to ISO/IEC 8859-10, and lists
code point 3/13 as HORIZONTAL BAR, which agrees with unicode.org's mapping
table.  Change ours to match (it used to have EM DASH, courtesy of RDB).
This brings all our 8859-to-Unicode tables into line with unicode.org.

[originally from svn r2224]
2002-11-18 22:27:25 +00:00
Ben Harris 6a5827584a More comment cleanup.
[originally from svn r2223]
2002-11-18 20:06:46 +00:00
Ben Harris 2518a1c3a1 Don't forget the IEC!
[originally from svn r2222]
2002-11-18 18:24:35 +00:00
Ben Harris 45b2176f88 Both ISO and unicode.org now admit the existence of 8859-11 (:2001, FWIW),
and unicode.org agrees with our mapping table.  Update text accordingly.

[originally from svn r2221]
2002-11-18 18:14:18 +00:00
Simon Tatham c206f0d8e5 Thanks to Hans-Juergen Petrich for spotting this tiny memory leak:
`otherbuf' should still be freed even if the RegEnumKey function
that was supposed to fill it with data failed. While I'm at it, also
remove the redundant check for its non-NULL-ness (what's the point
of having a malloc wrapper that dies rather than return NULL if you
then waste effort checking its return value for NULL _anyway_, eh?).

[originally from svn r2217]
2002-11-17 15:06:16 +00:00
Ben Harris 9902bc67fc Apple's C compilers don't think that putting parentheses around assignments
in "if" conditions is enough.  Use an actual comparison against NULL instead.

[originally from svn r2216]
2002-11-17 02:00:06 +00:00
Ben Harris 563eef2870 Change a temporary buffer from unsigned chars to chars, avoiding a pointer-cast
warning.

[originally from svn r2215]
2002-11-17 01:56:01 +00:00
Simon Tatham ad86746679 Bump latest version to 0.53b for release!
[originally from svn r2210]
2002-11-12 18:55:41 +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 a1125a8052 Improve robustness in random seed file handling.
[originally from svn r2200]
2002-11-07 20:01:04 +00:00