u/mdw/putty
21 years agoFix a few stylistic warnings from Apple's C compilers.
ben [Sat, 4 Jan 2003 16:21:17 +0000 (16:21 +0000)]
Fix a few stylistic warnings from Apple's C compilers.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2446 cda61777-01e9-0310-a592-d414129be87e

21 years ago<MacTypes.h> says we should use NULL rather than nil in C, so do that.
ben [Sat, 4 Jan 2003 12:45:11 +0000 (12:45 +0000)]
<MacTypes.h> says we should use NULL rather than nil in C, so do that.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2444 cda61777-01e9-0310-a592-d414129be87e

21 years agoRe-arrange the sums in the size tip code so as to ensure that we're always do
ben [Sat, 4 Jan 2003 00:48:13 +0000 (00:48 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2443 cda61777-01e9-0310-a592-d414129be87e

21 years agoSmall simplification in mac_init().
ben [Sat, 4 Jan 2003 00:31:04 +0000 (00:31 +0000)]
Small simplification in mac_init().

git-svn-id: svn://svn.tartarus.org/sgt/putty@2442 cda61777-01e9-0310-a592-d414129be87e

21 years agoCorrect handling of Mac OS 8.5 Window Manager and Control Manager. The new
ben [Sat, 4 Jan 2003 00:13:18 +0000 (00:13 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2441 cda61777-01e9-0310-a592-d414129be87e

21 years agoWork around a weird bug in gdk_draw_text_wc().
simon [Fri, 3 Jan 2003 17:52:51 +0000 (17:52 +0000)]
Work around a weird bug in gdk_draw_text_wc().

git-svn-id: svn://svn.tartarus.org/sgt/putty@2437 cda61777-01e9-0310-a592-d414129be87e

21 years agoUpdate copyright notices that both Owen and Simon managed to miss.
ben [Fri, 3 Jan 2003 12:20:14 +0000 (12:20 +0000)]
Update copyright notices that both Owen and Simon managed to miss.
_How_ many copies of the licence do we need? *grin*

git-svn-id: svn://svn.tartarus.org/sgt/putty@2435 cda61777-01e9-0310-a592-d414129be87e

21 years agoUpdate more copyright dates. Sometimes I think we ought to have an
simon [Fri, 3 Jan 2003 10:59:53 +0000 (10:59 +0000)]
Update more copyright dates. Sometimes I think we ought to have an
automated means of doing this every year :-(

git-svn-id: svn://svn.tartarus.org/sgt/putty@2434 cda61777-01e9-0310-a592-d414129be87e

21 years agoUpdate copyright dates
owen [Fri, 3 Jan 2003 09:49:04 +0000 (09:49 +0000)]
Update copyright dates

git-svn-id: svn://svn.tartarus.org/sgt/putty@2433 cda61777-01e9-0310-a592-d414129be87e

21 years agoPull in Script.r so we can use verBritain in the 'vers' resources rather
ben [Fri, 3 Jan 2003 00:40:52 +0000 (00:40 +0000)]
Pull in Script.r so we can use verBritain in the 'vers' resources rather
than hardcoding 2.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2432 cda61777-01e9-0310-a592-d414129be87e

21 years agoAny Mac that can handle CFM-68K code must have at least a 68020 CPU, and hence
ben [Thu, 2 Jan 2003 23:52:44 +0000 (23:52 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2431 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a prototype for init_ucs().
ben [Thu, 2 Jan 2003 23:39:53 +0000 (23:39 +0000)]
Add a prototype for init_ucs().

git-svn-id: svn://svn.tartarus.org/sgt/putty@2430 cda61777-01e9-0310-a592-d414129be87e

21 years agoHaving tested it, note that the Classic 68K build seems to work on Mac OS X
ben [Thu, 2 Jan 2003 18:09:21 +0000 (18:09 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2429 cda61777-01e9-0310-a592-d414129be87e

21 years ago... of course, that would be better still if I remembered to update
simon [Thu, 2 Jan 2003 17:07:24 +0000 (17:07 +0000)]
... of course, that would be better still if I remembered to update
`nvalid'. Ahem.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2428 cda61777-01e9-0310-a592-d414129be87e

21 years agoA better solution to the problem of duplicated positions in
simon [Thu, 2 Jan 2003 16:56:29 +0000 (16:56 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2427 cda61777-01e9-0310-a592-d414129be87e

21 years agoCJK cleanups. Correct handling when the cursor is covering the
simon [Thu, 2 Jan 2003 16:20:29 +0000 (16:20 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2426 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixes to direct-to-font mode: I'd inadvertently enabled it for any
simon [Thu, 2 Jan 2003 16:17:56 +0000 (16:17 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2425 cda61777-01e9-0310-a592-d414129be87e

21 years agoMention that Shift-Ins works here.
ben [Thu, 2 Jan 2003 14:23:36 +0000 (14:23 +0000)]
Mention that Shift-Ins works here.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2424 cda61777-01e9-0310-a592-d414129be87e

21 years agoFix `telnet-resize-iac'. (IAC bytes were not duplicated when they
simon [Thu, 2 Jan 2003 11:14:35 +0000 (11:14 +0000)]
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.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2421 cda61777-01e9-0310-a592-d414129be87e

21 years agoA couple of X forwarding fixes for Unix Plink. Firstly, under Unix
simon [Thu, 2 Jan 2003 10:45:56 +0000 (10:45 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2420 cda61777-01e9-0310-a592-d414129be87e

21 years agoPropagate the screen number from a local X display to the remote
simon [Thu, 2 Jan 2003 10:41:22 +0000 (10:41 +0000)]
Propagate the screen number from a local X display to the remote
forwarded one. Fixes `x11-default-screen'.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2418 cda61777-01e9-0310-a592-d414129be87e

21 years agosk_nonamelookup() should ensure the sockaddr it returns has `error'
simon [Thu, 2 Jan 2003 10:07:50 +0000 (10:07 +0000)]
sk_nonamelookup() should ensure the sockaddr it returns has `error'
set to NULL. Otherwise it'll be random uninitialised goop. Not good.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2416 cda61777-01e9-0310-a592-d414129be87e

21 years agoPresence of unexpected characters in the proxy exclude list causes a
simon [Thu, 2 Jan 2003 10:07:17 +0000 (10:07 +0000)]
Presence of unexpected characters in the proxy exclude list causes a
tight loop in proxy_for_destination(). Fixed.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2415 cda61777-01e9-0310-a592-d414129be87e

21 years agoIf for some reason do_text() fails to translate from Unicode to the font
ben [Thu, 2 Jan 2003 00:33:40 +0000 (00:33 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2414 cda61777-01e9-0310-a592-d414129be87e

21 years agoProper support for using the font's own character encoding. If we
simon [Wed, 1 Jan 2003 22:25:25 +0000 (22:25 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2413 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for double-width (CJK) characters, using the xterm-like
simon [Wed, 1 Jan 2003 21:53:22 +0000 (21:53 +0000)]
Support for double-width (CJK) characters, using the xterm-like
options -fw and -fwb to specify wide and wide-bold fonts.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2412 cda61777-01e9-0310-a592-d414129be87e

21 years agoThe redirection operator I wanted was >>, not >.
ben [Wed, 1 Jan 2003 20:28:52 +0000 (20:28 +0000)]
The redirection operator I wanted was >>, not >.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2411 cda61777-01e9-0310-a592-d414129be87e

21 years agoIgnore .rsrc files.
ben [Wed, 1 Jan 2003 20:26:55 +0000 (20:26 +0000)]
Ignore .rsrc files.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2410 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a mechanism for determining which charset to use for a given Mac OS font,
ben [Wed, 1 Jan 2003 19:51:13 +0000 (19:51 +0000)]
Add a mechanism for determining which charset to use for a given Mac OS font,
and use it.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2409 cda61777-01e9-0310-a592-d414129be87e

21 years agoHaving painstakingly generated those reverse mapping tables in
simon [Wed, 1 Jan 2003 17:03:27 +0000 (17:03 +0000)]
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 :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2404 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd all the Mac OS simple single-byte character sets from ftp.unicode.org.
ben [Wed, 1 Jan 2003 16:24:01 +0000 (16:24 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2403 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove a couple of unnecessary casts that my compiler seems to have taken
ben [Wed, 1 Jan 2003 11:45:43 +0000 (11:45 +0000)]
Remove a couple of unnecessary casts that my compiler seems to have taken
exception to.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2402 cda61777-01e9-0310-a592-d414129be87e

21 years agoUse the shiny new character-set library to handle conversion from Unicode
ben [Tue, 31 Dec 2002 22:49:03 +0000 (22:49 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2401 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd "-notOnce" to the compiler options on the Mac to stop the compiler
ben [Tue, 31 Dec 2002 22:40:38 +0000 (22:40 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2400 cda61777-01e9-0310-a592-d414129be87e

21 years agoI have no idea what Simon thought he was doing casting what was once a
ben [Tue, 31 Dec 2002 22:37:27 +0000 (22:37 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2399 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd internal prototypes to keep my compiler from complaining.
ben [Tue, 31 Dec 2002 21:12:29 +0000 (21:12 +0000)]
Add internal prototypes to keep my compiler from complaining.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2398 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a small comment explaining my failure to find any way to get QuickDraw
ben [Tue, 31 Dec 2002 20:11:38 +0000 (20:11 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2397 cda61777-01e9-0310-a592-d414129be87e

21 years agoBetter, I think, to avoid mapping 0x00 -> U+0020 in the X11
simon [Tue, 31 Dec 2002 15:42:07 +0000 (15:42 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2396 cda61777-01e9-0310-a592-d414129be87e

21 years agoFirst draft of Unicode support in pterm. It's pretty complete: it
simon [Tue, 31 Dec 2002 12:20:34 +0000 (12:20 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2395 cda61777-01e9-0310-a592-d414129be87e

21 years agoSCO ACS part 2 (ESC[12m) apparently puts the top half of CP437 into
simon [Tue, 31 Dec 2002 11:03:23 +0000 (11:03 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2394 cda61777-01e9-0310-a592-d414129be87e

21 years agoDimitrie Paun's patch for Winelib support. Actually does nothing
simon [Tue, 31 Dec 2002 10:04:35 +0000 (10:04 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2393 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a minimalist settings dialogue, which contains a single button
ben [Tue, 31 Dec 2002 01:40:14 +0000 (01:40 +0000)]
Add a minimalist settings dialogue, which contains a single button
marked "open".  Still, it seems to work.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2392 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove mentions of files and functions that no longer exist.
ben [Mon, 30 Dec 2002 23:33:13 +0000 (23:33 +0000)]
Remove mentions of files and functions that no longer exist.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2391 cda61777-01e9-0310-a592-d414129be87e

21 years agoNo need to compile resources manually now.
ben [Mon, 30 Dec 2002 23:15:46 +0000 (23:15 +0000)]
No need to compile resources manually now.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2390 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd support for compiling 'vers' resources into Mac applications. This is
ben [Mon, 30 Dec 2002 23:14:11 +0000 (23:14 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2389 cda61777-01e9-0310-a592-d414129be87e

21 years agoSet the default directory to somewhere useful (the PuTTY saved sessions
ben [Mon, 30 Dec 2002 19:01:44 +0000 (19:01 +0000)]
Set the default directory to somewhere useful (the PuTTY saved sessions
folder) when we start up.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2388 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd an "open" command to the "file" (now "session") menu on the Mac to
ben [Mon, 30 Dec 2002 18:21:17 +0000 (18:21 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2387 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove a spurious reference to a variable I've removed.
ben [Mon, 30 Dec 2002 15:41:52 +0000 (15:41 +0000)]
Remove a spurious reference to a variable I've removed.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2386 cda61777-01e9-0310-a592-d414129be87e

21 years agoFinally add support for building Mac resource forks. This adds a new kind
ben [Mon, 30 Dec 2002 14:20:25 +0000 (14:20 +0000)]
Finally add support for building Mac resource forks.  This adds a new kind
of compiled resource file, .rsrc, which is built from .r, and adds mechanisms
to the MPW makefile generator to handle this.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2385 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd spaces to system include lines to that mkfiles.pl doesn't try to
ben [Mon, 30 Dec 2002 14:17:51 +0000 (14:17 +0000)]
Add spaces to system include lines to that mkfiles.pl doesn't try to
follow them (silly Rez can't do angle-bracket includes).

git-svn-id: svn://svn.tartarus.org/sgt/putty@2384 cda61777-01e9-0310-a592-d414129be87e

21 years agoMore cleanup to Mac build procedures, notably:
ben [Mon, 30 Dec 2002 13:43:19 +0000 (13:43 +0000)]
More cleanup to Mac build procedures, notably:
 - Remove an unused library from the CFM-68K link line.
 - Set the fragment name in CFM builds to "PuTTY".
 - Set the hasBundle and isShared bits on freshly-created applications.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2383 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd various files produced by the build system.
ben [Sun, 29 Dec 2002 19:19:10 +0000 (19:19 +0000)]
Add various files produced by the build system.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2382 cda61777-01e9-0310-a592-d414129be87e

21 years agoDon't try to call TerminateUnicodeConverter() in the CFM world: it isn't there.
ben [Sun, 29 Dec 2002 19:14:56 +0000 (19:14 +0000)]
Don't try to call TerminateUnicodeConverter() in the CFM world: it isn't there.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2381 cda61777-01e9-0310-a592-d414129be87e

21 years agoBrutally simplify out all the junk that MPW left here when it first wrote this
ben [Sun, 29 Dec 2002 19:11:40 +0000 (19:11 +0000)]
Brutally simplify out all the junk that MPW left here when it first wrote this
file.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2380 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd support for building a CFM-68K version of PuTTY, which is rather smaller
ben [Sun, 29 Dec 2002 19:01:33 +0000 (19:01 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2379 cda61777-01e9-0310-a592-d414129be87e

21 years agoSubstantial overhaul of Mac build system. We now have working PowerPC builds,
ben [Sun, 29 Dec 2002 15:44:15 +0000 (15:44 +0000)]
Substantial overhaul of Mac build system.  We now have working PowerPC builds,
and optimisation (for size) enabled.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2378 cda61777-01e9-0310-a592-d414129be87e

21 years agoPut prototypes for the functions exported by wcwidth.c in putty.h, and remove
ben [Sun, 29 Dec 2002 15:08:27 +0000 (15:08 +0000)]
Put prototypes for the functions exported by wcwidth.c in putty.h, and remove
one from terminal.c.  Have wcwidth.c include putty.h to get its prototypes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2377 cda61777-01e9-0310-a592-d414129be87e

21 years agoMake resizeline() and lineptr() static and give them prototypes.
ben [Sun, 29 Dec 2002 14:47:01 +0000 (14:47 +0000)]
Make resizeline() and lineptr() static and give them prototypes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2376 cda61777-01e9-0310-a592-d414129be87e

21 years agoUse the "far" versions of all libraries for which they seem to exist.
ben [Sun, 29 Dec 2002 13:41:38 +0000 (13:41 +0000)]
Use the "far" versions of all libraries for which they seem to exist.
This should make things less likely to break as the code gets bigger.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2375 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd some pragmas so that Mac compilers know that fatalbox() and
ben [Sun, 29 Dec 2002 13:21:12 +0000 (13:21 +0000)]
Add some pragmas so that Mac compilers know that fatalbox() and
modalfatalbox() don't return.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2374 cda61777-01e9-0310-a592-d414129be87e

21 years agoIt would be better if I deleted the unused variable from the correct function.
ben [Sat, 28 Dec 2002 22:44:27 +0000 (22:44 +0000)]
It would be better if I deleted the unused variable from the correct function.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2373 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove more unused variables.
ben [Sat, 28 Dec 2002 22:25:31 +0000 (22:25 +0000)]
Remove more unused variables.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2372 cda61777-01e9-0310-a592-d414129be87e

21 years agoDispose of some unused local variables.
ben [Sat, 28 Dec 2002 22:22:43 +0000 (22:22 +0000)]
Dispose of some unused local variables.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2371 cda61777-01e9-0310-a592-d414129be87e

21 years agoThe current version of SC generates warnings for unused parameters just
ben [Sat, 28 Dec 2002 22:17:51 +0000 (22:17 +0000)]
The current version of SC generates warnings for unused parameters just
like MrC.  Turn them off, since they're clearly silly.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2370 cda61777-01e9-0310-a592-d414129be87e

21 years agoMention in the documentation that the method of generating RSA keys
simon [Fri, 27 Dec 2002 16:54:14 +0000 (16:54 +0000)]
Mention in the documentation that the method of generating RSA keys
might give a bit count one less than the one the user asked for. Two
people have been worried by this now, and it's probably worth
documenting that it's perfectly normal.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2369 cda61777-01e9-0310-a592-d414129be87e

21 years agoMove the stderr output of event log messages in verbose mode to the
simon [Thu, 19 Dec 2002 14:24:28 +0000 (14:24 +0000)]
Move the stderr output of event log messages in verbose mode to the
general logging module rather than localising it in ssh.c. This
means it should work in other protocols as well (notably Telnet,
where it might actually be useful for debugging negotiations).

git-svn-id: svn://svn.tartarus.org/sgt/putty@2360 cda61777-01e9-0310-a592-d414129be87e

21 years agoFirst crack at an implementation of TELOPT_BINARY, which apparently
simon [Thu, 19 Dec 2002 14:22:16 +0000 (14:22 +0000)]
First crack at an implementation of TELOPT_BINARY, which apparently
RFC 1123 (host requirements) says is compulsory.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2358 cda61777-01e9-0310-a592-d414129be87e

21 years agologeventf() shouldn't throw stuff at stderr, since it invokes the
simon [Thu, 19 Dec 2002 11:51:42 +0000 (11:51 +0000)]
logeventf() shouldn't throw stuff at stderr, since it invokes the
ssh.c logevent _macro_ which has already done so! Duhh.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2356 cda61777-01e9-0310-a592-d414129be87e

21 years agoSupport for doing DNS at the proxy end. I've invented a new type of
simon [Wed, 18 Dec 2002 16:23:11 +0000 (16:23 +0000)]
Support for doing DNS at the proxy end. I've invented a new type of
SockAddr, which just contains an unresolved hostname and is created
by a stub function in *net.c. It's an error to pass this to most of
the real-meat functions in *net.c; these fake addresses should have
been dealt with by the time they get down that far. proxy.c now
contains name_lookup(), a wrapper on sk_namelookup() which decides
whether or not to do real DNS, and the individual proxy
implementations each deal sensibly with being handed an unresolved
address and avoid ever passing one down to *net.c.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2353 cda61777-01e9-0310-a592-d414129be87e

21 years agoBetter reporting of DNS errors while trying to find the proxy server.
simon [Wed, 18 Dec 2002 12:32:18 +0000 (12:32 +0000)]
Better reporting of DNS errors while trying to find the proxy server.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2350 cda61777-01e9-0310-a592-d414129be87e

21 years agoStop proxying connections to localhost by default; should fix
simon [Wed, 18 Dec 2002 12:18:54 +0000 (12:18 +0000)]
Stop proxying connections to localhost by default; should fix
`x11-proxy-crash'.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2348 cda61777-01e9-0310-a592-d414129be87e

21 years agoPlacate a trivial compiler warning.
simon [Wed, 18 Dec 2002 11:51:09 +0000 (11:51 +0000)]
Placate a trivial compiler warning.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2347 cda61777-01e9-0310-a592-d414129be87e

21 years agoImprove the tab order in the Tunnels box: the `Add' button should
simon [Wed, 18 Dec 2002 11:49:14 +0000 (11:49 +0000)]
Improve the tab order in the Tunnels box: the `Add' button should
happen _after_ all the controls that set up the forwarding, since
that's the obvious order you'd want to use them in.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2346 cda61777-01e9-0310-a592-d414129be87e

21 years agoImplement `portfwd-loopback-choice'. Works on local side in Unix as
simon [Wed, 18 Dec 2002 11:39:25 +0000 (11:39 +0000)]
Implement `portfwd-loopback-choice'. Works on local side in Unix as
well, though it's a lot less useful since you still can't bind to
low-numbered ports of odd loopback IPs. Should work in principle for
SSH2 remote forwardings as well as local ones, but OpenSSH seems
unwilling to cooperate.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2344 cda61777-01e9-0310-a592-d414129be87e

21 years agoBUG_SSH2_DERIVEKEY is apparently only present in SSH 2.0.11 and
simon [Wed, 18 Dec 2002 10:06:38 +0000 (10:06 +0000)]
BUG_SSH2_DERIVEKEY is apparently only present in SSH 2.0.11 and
before, not in 2.0.13. Verified on at least one host. Fixes bug
`ssh2-keyderive-nonbug'.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2342 cda61777-01e9-0310-a592-d414129be87e

21 years ago`Leonid' points out a stupid mistake in MD5 HMAC initialisation: we
simon [Wed, 18 Dec 2002 09:54:55 +0000 (09:54 +0000)]
`Leonid' points out a stupid mistake in MD5 HMAC initialisation: we
should initialise _both_ MD5 states, not the same one twice.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2341 cda61777-01e9-0310-a592-d414129be87e

21 years agologeventf()'s first argument is ssh, not ssh->frontend! This is what
simon [Wed, 18 Dec 2002 09:47:20 +0000 (09:47 +0000)]
logeventf()'s first argument is ssh, not ssh->frontend! This is what
I get for making the latter a `void *' - type checking deserts me in
my hour of need. Should fix Andrey Borzenkov's bug.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2340 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
jacob [Sun, 15 Dec 2002 13:31:58 +0000 (13:31 +0000)]
Fixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
  window.c:90: warning: `do_mouse_wheel_msg' declared `static' but never defined
Introduced in 1.185 [r1499]. This function doesn't appear to ever have
existed.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2334 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
jacob [Sun, 15 Dec 2002 13:25:24 +0000 (13:25 +0000)]
Fixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
  psftp.c: In function `sftp_cmd_chmod':
  psftp.c:835: warning: too many arguments for format

git-svn-id: svn://svn.tartarus.org/sgt/putty@2333 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
jacob [Sun, 15 Dec 2002 13:23:13 +0000 (13:23 +0000)]
Fixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
  plink.c:65: warning: `password' defined but not used
(introduced in 1.50 [r1525])

git-svn-id: svn://svn.tartarus.org/sgt/putty@2332 cda61777-01e9-0310-a592-d414129be87e

21 years agoFixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
jacob [Sun, 15 Dec 2002 13:19:59 +0000 (13:19 +0000)]
Fixing trivial warnings spotted by Mingw-2.0.0/gcc-3.2:
  plink.c: In function `from_backend':
  plink.c:172: warning: unused variable `h'
(introduced in 1.35 [r1198])

git-svn-id: svn://svn.tartarus.org/sgt/putty@2331 cda61777-01e9-0310-a592-d414129be87e

21 years agoFrom Greg Prosser: Apparently using "MS Shell Dlg" instead of "MS Sans Serif"
jacob [Sun, 15 Dec 2002 12:44:21 +0000 (12:44 +0000)]
From Greg Prosser: Apparently using "MS Shell Dlg" instead of "MS Sans Serif"
in resource files interoperates better with WinXP (enabling font smoothing
and improving display of password boxes). I've verified that it's harmless
on Win95.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2329 cda61777-01e9-0310-a592-d414129be87e

21 years agofaq-rh8-utf8: Problems with Red Hat 8.0 and UTF-8
jacob [Sun, 15 Dec 2002 11:51:21 +0000 (11:51 +0000)]
faq-rh8-utf8: Problems with Red Hat 8.0 and UTF-8

git-svn-id: svn://svn.tartarus.org/sgt/putty@2327 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove an unnecessary "{Includes}" from the example Rez command.
ben [Fri, 13 Dec 2002 00:50:53 +0000 (00:50 +0000)]
Remove an unnecessary "{Includes}" from the example Rez command.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2317 cda61777-01e9-0310-a592-d414129be87e

21 years agoProvide a full set of small application icons for PuTTY, now equipped with
ben [Fri, 13 Dec 2002 00:45:08 +0000 (00:45 +0000)]
Provide a full set of small application icons for PuTTY, now equipped with
small lightning flashes too.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2316 cda61777-01e9-0310-a592-d414129be87e

21 years agoUse the Unicode Converter to convert from Unicode to the display encoding
ben [Fri, 13 Dec 2002 00:02:48 +0000 (00:02 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2315 cda61777-01e9-0310-a592-d414129be87e

21 years agoWhen loading a string setting, expect in the same form we would have
ben [Thu, 12 Dec 2002 23:55:51 +0000 (23:55 +0000)]
When loading a string setting, expect in the same form we would have
saved (raw text rather than Pascal string).

git-svn-id: svn://svn.tartarus.org/sgt/putty@2314 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd some documentation for the Mac port.
ben [Wed, 11 Dec 2002 18:34:49 +0000 (18:34 +0000)]
Add some documentation for the Mac port.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2305 cda61777-01e9-0310-a592-d414129be87e

21 years agoIPv4/IPv6 sense problem in SOCKS5 proxying spotted by Andrey Borzenkov --
jacob [Tue, 10 Dec 2002 10:19:51 +0000 (10:19 +0000)]
IPv4/IPv6 sense problem in SOCKS5 proxying spotted by Andrey Borzenkov --
recent change.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2301 cda61777-01e9-0310-a592-d414129be87e

21 years agoSince PuTTY depends on lots of features of System 7, have it bale out if
ben [Tue, 10 Dec 2002 01:11:40 +0000 (01:11 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2300 cda61777-01e9-0310-a592-d414129be87e

21 years agoWhen resizing the window, redraw the grow box as well as the scroll bar.
ben [Mon, 9 Dec 2002 23:26:52 +0000 (23:26 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2299 cda61777-01e9-0310-a592-d414129be87e

21 years agoUpdate the non-Color Quickdraw code in pre_paint() to match recent changes
ben [Mon, 9 Dec 2002 22:49:56 +0000 (22:49 +0000)]
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2298 cda61777-01e9-0310-a592-d414129be87e

21 years agoOops. When deciding which attributes are interesting, we want the union of
ben [Sun, 8 Dec 2002 22:23:08 +0000 (22:23 +0000)]
Oops.  When deciding which attributes are interesting, we want the union of
all the screens' capabilites, not the intersection.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2297 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove a stray prototype for mac_set_attr_mask().
ben [Sun, 8 Dec 2002 22:15:10 +0000 (22:15 +0000)]
Remove a stray prototype for mac_set_attr_mask().

git-svn-id: svn://svn.tartarus.org/sgt/putty@2296 cda61777-01e9-0310-a592-d414129be87e

21 years agoRemove some unused cruft.
ben [Sun, 8 Dec 2002 22:09:47 +0000 (22:09 +0000)]
Remove some unused cruft.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2295 cda61777-01e9-0310-a592-d414129be87e

21 years agoModify bug-compatibility checks to use wildcards. Should have exactly the
jacob [Sun, 8 Dec 2002 16:54:31 +0000 (16:54 +0000)]
Modify bug-compatibility checks to use wildcards. Should have exactly the
same behaviour as before (tested a little bit), but should be easier to
expand.
(This is the easy bit -- work still needs to be done to fix
ssh2-keyderive-nonbug, vshell-no-bug-compat, etc -- but should be easier
now.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@2293 cda61777-01e9-0310-a592-d414129be87e

21 years agoWrong length was causing spurious \0 to be sent during SSH negotiation with
jacob [Sun, 8 Dec 2002 15:32:40 +0000 (15:32 +0000)]
Wrong length was causing spurious \0 to be sent during SSH negotiation with
HTTP proxy -- fixed. (Also added a "len -= eol" to HTTP header munching,
although it has no practical effect.) HTTP proxying now works again, hurrah.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2292 cda61777-01e9-0310-a592-d414129be87e

21 years agoArgh. With DEBUG and MALLOC_LOG enabled, I found output intended for the
jacob [Sun, 8 Dec 2002 14:44:42 +0000 (14:44 +0000)]
Argh. With DEBUG and MALLOC_LOG enabled, I found output intended for the
console was ending up in one or other of debug.log or putty_mem.log. I
don't really understand why, but I've put some extra paranoia and caching
in debug(()) and that seems to have fixed it (tm). Perhaps I can get back
to debugging...

git-svn-id: svn://svn.tartarus.org/sgt/putty@2291 cda61777-01e9-0310-a592-d414129be87e

21 years agoDoofus Award: logfopen is shared between SSH-packet and session-logging modes,
jacob [Sun, 8 Dec 2002 12:10:58 +0000 (12:10 +0000)]
Doofus Award: logfopen is shared between SSH-packet and session-logging modes,
so of _course_ it has to be mode "wb". Restored, and added \r to all of the
SSH packet logging stuff.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2289 cda61777-01e9-0310-a592-d414129be87e

21 years agoAdd a new diagnostic in winnet.c, to attempt to pinpoint the reason
simon [Sun, 8 Dec 2002 11:00:47 +0000 (11:00 +0000)]
Add a new diagnostic in winnet.c, to attempt to pinpoint the reason
for the tree234 assertion failure we've had reported recently.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2288 cda61777-01e9-0310-a592-d414129be87e