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

266 Коммитов

Автор SHA1 Сообщение Дата
Ben Harris 0a6e82b4dd Update copyright notices that both Owen and Simon managed to miss.
_How_ many copies of the licence do we need? *grin*

[originally from svn r2435]
2003-01-03 12:20:14 +00:00
Ben Harris 8af9c0a745 Pull in Script.r so we can use verBritain in the 'vers' resources rather
than hardcoding 2.

[originally from svn r2432]
2003-01-03 00:40:52 +00:00
Ben Harris 375185cf9f Any Mac that can handle CFM-68K code must have at least a 68020 CPU, and hence
be equipped with Color QuickDraw, as are all PowerPC systems.  Hence, don't
bother with support for basic QuickDraw in the CFM-68K and PowerPC builds.

[originally from svn r2431]
2003-01-02 23:52:44 +00:00
Ben Harris 44a1e7fff2 Add a prototype for init_ucs().
[originally from svn r2430]
2003-01-02 23:39:53 +00:00
Ben Harris 19ed21b98a Having tested it, note that the Classic 68K build seems to work on Mac OS X
now.  Also describe more generally which builds work where.

[originally from svn r2429]
2003-01-02 18:09:21 +00:00
Ben Harris 0416b77c7f If for some reason do_text() fails to translate from Unicode to the font
encoding, have it go through the rest of its motions with an empty string
anyway, so as to at least give a sensible empty box of the right colour.

If SetFallbackUnicodeToText() fails, switch over to using the charset
library, hence avoiding problems in do_text().

If the version of the Unicode Converter we're using doesn't understand about
interrupt-safe fallback functions, don't try to tell it we've got one.  This
prevents SetFallbackUnicodeToText() from failing on systems with old Unicode
Converters.

[originally from svn r2414]
2003-01-02 00:33:40 +00:00
Ben Harris 7bdd57f300 The redirection operator I wanted was >>, not >.
[originally from svn r2411]
2003-01-01 20:28:52 +00:00
Ben Harris b002b19ff9 Ignore .rsrc files.
[originally from svn r2410]
2003-01-01 20:26:55 +00:00
Ben Harris 0ea7e35008 Add a mechanism for determining which charset to use for a given Mac OS font,
and use it.

[originally from svn r2409]
2003-01-01 19:51:13 +00:00
Ben Harris d8413715a9 Remove a couple of unnecessary casts that my compiler seems to have taken
exception to.

[originally from svn r2402]
2003-01-01 11:45:43 +00:00
Ben Harris 491f7be9fc Use the shiny new character-set library to handle conversion from Unicode
to Mac OS Roman for display if the Unicode Converter isn't around.  Support
for Mac character sets other than Roman (e.g. the variant used by the Apple
VT100 font) is still absent.

[originally from svn r2401]
2002-12-31 22:49:03 +00:00
Ben Harris 3777de60cb Add a small comment explaining my failure to find any way to get QuickDraw
to give me the missing-character glyph for a font.
While I'm here, change the character we substitute for unmappable ones
to '.', since that's what the charset library uses.

[originally from svn r2397]
2002-12-31 20:11:38 +00:00
Ben Harris 6c1c86f23d Add a minimalist settings dialogue, which contains a single button
marked "open".  Still, it seems to work.

[originally from svn r2392]
2002-12-31 01:40:14 +00:00
Ben Harris d807c97bfd Remove mentions of files and functions that no longer exist.
[originally from svn r2391]
2002-12-30 23:33:13 +00:00
Ben Harris fc02176fcd No need to compile resources manually now.
[originally from svn r2390]
2002-12-30 23:15:46 +00:00
Ben Harris 47f459bb5f Add support for compiling 'vers' resources into Mac applications. This is
needlessly complex because Rez's preprocessor doesn't do either ANSI or K&R
stringification, and the MPW Shell isn't much good as shells go.

Also make _all_ the Mac executables depend on reources, not just the
Classic 68K one.

[originally from svn r2389]
2002-12-30 23:14:11 +00:00
Ben Harris 14432c234a Set the default directory to somewhere useful (the PuTTY saved sessions
folder) when we start up.

[originally from svn r2388]
2002-12-30 19:01:44 +00:00
Ben Harris 71d699c28c Add an "open" command to the "file" (now "session") menu on the Mac to
open an existing saved session.  This has entailed adding an extra hook to
settings.c to allow for loading settings other than by name.

[originally from svn r2387]
2002-12-30 18:21:17 +00:00
Ben Harris d5d52933dd Remove a spurious reference to a variable I've removed.
[originally from svn r2386]
2002-12-30 15:41:52 +00:00
Ben Harris 6ca089d035 Add spaces to system include lines to that mkfiles.pl doesn't try to
follow them (silly Rez can't do angle-bracket includes).

[originally from svn r2384]
2002-12-30 14:17:51 +00:00
Ben Harris cababe03ef Add various files produced by the build system.
[originally from svn r2382]
2002-12-29 19:19:10 +00:00
Ben Harris ecdb9ce7b1 Don't try to call TerminateUnicodeConverter() in the CFM world: it isn't there.
[originally from svn r2381]
2002-12-29 19:14:56 +00:00
Ben Harris d1eddb0958 Brutally simplify out all the junk that MPW left here when it first wrote this
file.

[originally from svn r2380]
2002-12-29 19:11:40 +00:00
Ben Harris b838180aa0 Add support for building a CFM-68K version of PuTTY, which is rather smaller
than the Classic 68K version.  This requires installing more bits of the
Text Encoding Converter SDK, since Apple seem to have forgotten to put _any_
68k bits for it, either CFM or Classic, in Universal Interfaces.

Also don't bother linking against libraries we don't seem to need.

[originally from svn r2379]
2002-12-29 19:01:33 +00:00
Ben Harris 9b45be7987 Substantial overhaul of Mac build system. We now have working PowerPC builds,
and optimisation (for size) enabled.

[originally from svn r2378]
2002-12-29 15:44:15 +00:00
Ben Harris f883570ed8 It would be better if I deleted the unused variable from the correct function.
[originally from svn r2373]
2002-12-28 22:44:27 +00:00
Ben Harris 454e6d2a43 Remove more unused variables.
[originally from svn r2372]
2002-12-28 22:25:31 +00:00
Ben Harris 1cfe88e9d2 Dispose of some unused local variables.
[originally from svn r2371]
2002-12-28 22:22:43 +00:00
Ben Harris 875d7c351e Remove an unnecessary "{Includes}" from the example Rez command.
[originally from svn r2317]
2002-12-13 00:50:53 +00:00
Ben Harris 8abe8187f7 Provide a full set of small application icons for PuTTY, now equipped with
small lightning flashes too.

[originally from svn r2316]
2002-12-13 00:45:08 +00:00
Ben Harris 93f12a008d Use the Unicode Converter to convert from Unicode to the display encoding
if it's available.  Linking against the static Unicode Converter library
costs us about 30k on Classic 68K, which I can live with.

Because the default fallback converter can generate multiple output
characters for a single input character, we provide our own fallback that
doesn't.  It converts everything to '?' instead.

[originally from svn r2315]
2002-12-13 00:02:48 +00:00
Ben Harris c6bbb682a3 When loading a string setting, expect in the same form we would have
saved (raw text rather than Pascal string).

[originally from svn r2314]
2002-12-12 23:55:51 +00:00
Ben Harris 5b4947e590 Add some documentation for the Mac port.
[originally from svn r2305]
2002-12-11 18:34:49 +00:00
Ben Harris 8ff26fd9e5 Since PuTTY depends on lots of features of System 7, have it bale out if
it finds itself running on anything older.  This is better than killing the
whole system with an umimplemented trap.

[originally from svn r2300]
2002-12-10 01:11:40 +00:00
Ben Harris d78a0aacc0 When resizing the window, redraw the grow box as well as the scroll bar.
I wasn't noticing the bug on my system, since the Appearance Manager handles
the grow box itself when it's present.

[originally from svn r2299]
2002-12-09 23:26:52 +00:00
Ben Harris 05456758c4 Update the non-Color Quickdraw code in pre_paint() to match recent changes
to the Color Quickdraw code.  This makes redraw work properly on old Macs
again.

[originally from svn r2298]
2002-12-09 22:49:56 +00:00
Ben Harris e06e554830 Oops. When deciding which attributes are interesting, we want the union of
all the screens' capabilites, not the intersection.

[originally from svn r2297]
2002-12-08 22:23:08 +00:00
Ben Harris 65b8dd1501 Remove a stray prototype for mac_set_attr_mask().
[originally from svn r2296]
2002-12-08 22:15:10 +00:00
Ben Harris c76391bccb Remove some unused cruft.
[originally from svn r2295]
2002-12-08 22:09:47 +00:00
Ben Harris 7522f5302d Slightly cheesy size-tip implementation. This is suboptimal in two ways:
* It paints over the top-left corner of the terminal window.  A little
   floating window would be rather nicer and not much harder to do.
 * It uses the low-memory global, DragHook, which is unavailable in Carbon
   and broken in some versions of Mac OS 8 (8.5?).  I suspect this is
   unavoidable, though.

[originally from svn r2287]
2002-12-08 01:17:31 +00:00
Ben Harris f2bfdefe45 When scrolling part of the window, scroll the update region as well so that
parts that haven't been painted yet still get an update event in their new
location.  This code seems far too complicated, and I suspect there's a
better way.  Still, scrolling continuously with the window partially
off-screen now works.

[originally from svn r2284]
2002-12-07 15:21:56 +00:00
Jacob Nevins 64bbf0d4f2 Ignore generated Mac Makefile
[originally from svn r2283]
2002-12-07 12:03:33 +00:00
Ben Harris 7c308678e4 Use the Script Manager to find a small Roman font for the licence box rather
than assuming that the application font at 9pt will be useful (which it
probably won't be on non-Roman systems).

[originally from svn r2282]
2002-12-06 00:09:34 +00:00
Ben Harris a0a3d6fad8 Add some comments explaining what each of these functions is used for.
[originally from svn r2280]
2002-12-04 19:44:57 +00:00
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 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
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 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 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 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
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
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