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

1623 Commits

Author SHA1 Message Date
Ben Harris
a952ead769 Provide a version of stricmp() and strnicmp() for Mac OS, which doesn't have
its own.  These are from NetBSD's libc, and have a standard (now 3-clause)
Berkeley licence.

Also provide a definition of DWORD and a better definition of BYTE.

[originally from svn r2449]
2003-01-04 17:24:49 +00:00
Ben Harris
6796ffc082 Fix some char * vs unsigned char * conversions, plus a stylistic nit, both
courtesy of Apple's compilers.

[originally from svn r2448]
2003-01-04 16:56:33 +00:00
Ben Harris
1e158ceb91 Hammer out some char * vs unsigned char * problems. In general, I've kept
any buffers used internally by telnet.c as unsigned char, and cast to/from
char * when interacting with the rest of PuTTY.  Not actually tested, since
I'm some way from actually being able to link this yet.

Also clean up a couple of style warnings from Apple's compilers.

[originally from svn r2447]
2003-01-04 16:42:53 +00:00
Ben Harris
f10bd67f3a Fix a few stylistic warnings from Apple's C compilers.
[originally from svn r2446]
2003-01-04 16:21:17 +00:00
Ben Harris
e82053be5c <MacTypes.h> says we should use NULL rather than nil in C, so do that.
[originally from svn r2444]
2003-01-04 12:45:11 +00:00
Ben Harris
e13dfa3562 Re-arrange the sums in the size tip code so as to ensure that we're always do
division on positive numbers, hence avoiding nasty problems of rounding
towards zero when I wanted rounding down.

[originally from svn r2443]
2003-01-04 00:48:13 +00:00
Ben Harris
7c40e3434d Small simplification in mac_init().
[originally from svn r2442]
2003-01-04 00:31:04 +00:00
Ben Harris
561029bfdf Correct handling of Mac OS 8.5 Window Manager and Control Manager. The new
functions turn out to be available only to PowerPC applications, through
WindowsLib and ControlsLib respectively, so we weak-link against those in
the obvious way.

[originally from svn r2441]
2003-01-04 00:13:18 +00:00
Simon Tatham
106bf20b35 Work around a weird bug in gdk_draw_text_wc().
[originally from svn r2437]
2003-01-03 17:52:51 +00:00
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
Simon Tatham
d13a41a5f1 Update more copyright dates. Sometimes I think we ought to have an
automated means of doing this every year :-(

[originally from svn r2434]
2003-01-03 10:59:53 +00:00
Owen Dunn
5b05ee09f3 Update copyright dates
[originally from svn r2433]
2003-01-03 09:49:04 +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
Simon Tatham
e5012fa846 ... of course, that would be better still if I remembered to update
`nvalid'. Ahem.

[originally from svn r2428]
2003-01-02 17:07:24 +00:00
Simon Tatham
a2afc03bdb A better solution to the problem of duplicated positions in
CS_ISO8859_1_X11: where two SBCS positions map to the same Unicode
code point, we now have a `sortpriority' hint which can tell
sbcsgen.pl which one it should preferentially generate when
converting back to SBCS.

[originally from svn r2427]
2003-01-02 16:56:29 +00:00
Simon Tatham
8de5682450 CJK cleanups. Correct handling when the cursor is covering the
right-hand half of a CJK wide character; correct handling of cut and
paste when CJK text wraps between lines _irrespective of the parity
of the starting column_; correct handling of wordness values
irrespective of which half of a CJK character the user
double-clicked on; correct handling when any terminal activity
overwrites only one half of a CJK wide character. I think we now
behave marginally better than xterm in this respect (it has a redraw
problem when you overwrite the RH half of a CJK char), so I'm happy.
Also redefined the internal UCSWIDE marker to something in the
surrogate range, while I'm here, so that U+303F is available for use
by actual users.

[originally from svn r2426]
2003-01-02 16:20:29 +00:00
Simon Tatham
ea5be2db38 Fixes to direct-to-font mode: I'd inadvertently enabled it for any
font whose encoding comes up as CS_NONE - but this is also true for
iso10646-1 fonts, since libcharset doesn't support wide-character
encodings! Hence UTF-8 cut and paste was enabled in ordinary modes,
but disabled in UTF-8 mode, which was a bit embarrassing. Now we
have a dedicated flag variable indicating direct-to-font mode.

[originally from svn r2425]
2003-01-02 16:17:56 +00:00
Ben Harris
70458d6434 Mention that Shift-Ins works here.
[originally from svn r2424]
2003-01-02 14:23:36 +00:00
Simon Tatham
50fbac19eb Fix `telnet-resize-iac'. (IAC bytes were not duplicated when they
occurred in a NAWS subnegotiation. Result: a terminal width or
height of 255 was not being correctly sent to the server.)

[originally from svn r2421]
2003-01-02 11:14:35 +00:00
Simon Tatham
a298b2fe4b A couple of X forwarding fixes for Unix Plink. Firstly, under Unix
the default X display should be whatever comes out of $DISPLAY,
rather than Windows's hardwired `localhost:0'. Secondly, this may
give rise to a display name without a hostname (`:0' or similar),
which we now need to be able to deal with. Of course, we still don't
_properly_ support X forwarding in Unix Plink, since we still can't
authenticate with the local display.

[originally from svn r2420]
2003-01-02 10:45:56 +00:00
Simon Tatham
368ead15bc Propagate the screen number from a local X display to the remote
forwarded one. Fixes `x11-default-screen'.

[originally from svn r2418]
2003-01-02 10:41:22 +00:00
Simon Tatham
2435c54597 sk_nonamelookup() should ensure the sockaddr it returns has `error'
set to NULL. Otherwise it'll be random uninitialised goop. Not good.

[originally from svn r2416]
2003-01-02 10:07:50 +00:00
Simon Tatham
327b9b7f1a Presence of unexpected characters in the proxy exclude list causes a
tight loop in proxy_for_destination(). Fixed.

[originally from svn r2415]
2003-01-02 10:07:17 +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
Simon Tatham
cab553028a Proper support for using the font's own character encoding. If we
know what that encoding actually is, we can do our best to support
additional charsets (VT100 linedrawing, SCO ACS, UTF-8 mode) using
the available characters; if we don't, we fall back to a mode where
we disable all Unicode cut-and-paste and assume any Unicode
character is undisplayable.

[originally from svn r2413]
2003-01-01 22:25:25 +00:00
Simon Tatham
d97ac46223 Support for double-width (CJK) characters, using the xterm-like
options -fw and -fwb to specify wide and wide-bold fonts.

[originally from svn r2412]
2003-01-01 21:53:22 +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
Simon Tatham
3deb118d4b Having painstakingly generated those reverse mapping tables in
sbcsdat.c, it would seem a shame not to actually use them. Ahem.
Thanks to Ben, without whose checkin in this area I'd have forgotten
completely :-)

[originally from svn r2404]
2003-01-01 17:03:27 +00:00
Ben Harris
f8e3eee673 Add all the Mac OS simple single-byte character sets from ftp.unicode.org.
Also add the older variants described there, and the character set used by
the "VT100" font (old and new).

Since RFC 1345 defines "macintosh" to refer to the currency-sign variant
of Mac OS Roman, update our table to match.

[originally from svn r2403]
2003-01-01 16:24:01 +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
720c09f576 Add "-notOnce" to the compiler options on the Mac to stop the compiler
assuming that duplicate #includes of the same file are idempotent.  I mean,
it's not even true for the standard headers (think <assert.h>), and
certainly isn't true here.

[originally from svn r2400]
2002-12-31 22:40:38 +00:00
Ben Harris
be63146e4f I have no idea what Simon thought he was doing casting what was once a
struct sbcs_data * (first element an array of unsigned long) into a
wchar_t *, but I think it's reasonably safe to assume that it was a
mistake.

[originally from svn r2399]
2002-12-31 22:37:27 +00:00
Ben Harris
c66bf11fa1 Add internal prototypes to keep my compiler from complaining.
[originally from svn r2398]
2002-12-31 21:12:29 +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
Simon Tatham
548555ded4 Better, I think, to avoid mapping 0x00 -> U+0020 in the X11
nonstandard font encoding. 0x20 maps to it, so it's not as if it's
in short supply.

[originally from svn r2396]
2002-12-31 15:42:07 +00:00
Simon Tatham
ad2bbc52a4 First draft of Unicode support in pterm. It's pretty complete: it
does UTF-8 copy and paste (falling back to normal strings if
necessary), it understands X font encodings and translates things
accordingly so that if you have a Unicode font you can ask for
virtually any single-byte encoding and get it (Mac-Roman pterm,
anyone?), and so on. There's work left to be done (wide fonts for
CJK spring to mind), but I reckon this is a pretty good start.

[originally from svn r2395]
2002-12-31 12:20:34 +00:00
Simon Tatham
241570c04f SCO ACS part 2 (ESC[12m) apparently puts the top half of CP437 into
_both_ halves of the character set, rather than flipping the two
halves. My source for this is linux/drivers/char/console.c.

[originally from svn r2394]
2002-12-31 11:03:23 +00:00
Simon Tatham
860164958a Dimitrie Paun's patch for Winelib support. Actually does nothing
except add a couple of commented-out lines to Makefile.cyg; the
Winelib user must uncomment them to do the compilation.

[originally from svn r2393]
2002-12-31 10:04:35 +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