u/mdw/putty
21 years agoThe back ends now contain their own copies of the Config structure,
simon [Sun, 12 Jan 2003 14:48:29 +0000 (14:48 +0000)]
The back ends now contain their own copies of the Config structure,
and have a function to pass in a new one. (Well, actually several
back ends don't actually bother to do this because they need nothing
out of Config after the initial setup phase, but they could if they
wanted to.)

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

21 years agoCall ot_poll as appropriate.
ben [Sun, 12 Jan 2003 14:45:33 +0000 (14:45 +0000)]
Call ot_poll as appropriate.
Also use cleanup_exit() in preference to exit() so that MacTCP gets shut down
even on unclean exits.

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

21 years agoDon't fatalbox() unconditionally when opening a connection, since that makes
ben [Sun, 12 Jan 2003 14:44:12 +0000 (14:44 +0000)]
Don't fatalbox() unconditionally when opening a connection, since that makes
it a little difficult to do anything.

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

21 years agoForgot to match the cmdline changes in the Unix port.
simon [Sun, 12 Jan 2003 14:37:26 +0000 (14:37 +0000)]
Forgot to match the cmdline changes in the Unix port.

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

21 years agoterm->cfg is now a full copy of the Config structure, not a pointer;
simon [Sun, 12 Jan 2003 14:30:02 +0000 (14:30 +0000)]
term->cfg is now a full copy of the Config structure, not a pointer;
and term_reconfig() now passes in a new structure which is copied
over the top. This means that the old and new structures can be
compared, and the _current_ as well as default states of auto wrap
mode, DEC origin mode, BCE, blinking text and character classes can
be conveniently reconfigured in mid-session without requiring a
terminal reset.

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

21 years agoCOmpiling _before_ committing is usually a good idea.
ben [Sun, 12 Jan 2003 14:23:00 +0000 (14:23 +0000)]
COmpiling _before_ committing is usually a good idea.

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

21 years agoThe command-line routines now take a pointer to `cfg' as an
simon [Sun, 12 Jan 2003 14:17:03 +0000 (14:17 +0000)]
The command-line routines now take a pointer to `cfg' as an
argument, so they don't depend on it being a global any more.

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

21 years agoSupport for XDM-AUTHORIZATION-1 at the SSH server end, making use of
simon [Sun, 12 Jan 2003 14:11:38 +0000 (14:11 +0000)]
Support for XDM-AUTHORIZATION-1 at the SSH server end, making use of
the remote IP/port data provided by the server for forwarded
connections. Disabled by default, since it's incompatible with SSH2,
probably incompatible with some X clients, and tickles a bug in
at least one version of OpenSSH.

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

21 years agoCorrect code to insert into a doubly-linked list.
ben [Sun, 12 Jan 2003 13:50:04 +0000 (13:50 +0000)]
Correct code to insert into a doubly-linked list.

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

21 years agoEach platform's implementation of askappend() is no longer required
simon [Sun, 12 Jan 2003 13:44:35 +0000 (13:44 +0000)]
Each platform's implementation of askappend() is no longer required
to consult cfg.logxfovr, because it gets done once in logging.c.
askappend() is now called only when a question _really_ needs to be
asked of the user. Also in this checkin, cleanup_exit() in console.c
no longer consults cfg.protocol to decide whether to save the random
seed, because random_save_seed() can make that decision for itself
and do it better.

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

21 years agoCute though DNSAddresses are, they're a poor match for the model the
ben [Sun, 12 Jan 2003 13:06:59 +0000 (13:06 +0000)]
Cute though DNSAddresses are, they're a poor match for the model the
rest of PuTTY has of DNS resolution, so I've replaced them with something
more conventional.  Sorry.

The new code has the advantage of working, of course.

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

21 years agoUse memset() rather than OTMemzero(), and hence remove the need to weak link
ben [Sun, 12 Jan 2003 01:37:24 +0000 (01:37 +0000)]
Use memset() rather than OTMemzero(), and hence remove the need to weak link
against OTUtilityLib.

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

21 years agoRemove code for splatting test data into new terminals, since we can do
ben [Sun, 12 Jan 2003 01:25:34 +0000 (01:25 +0000)]
Remove code for splatting test data into new terminals, since we can do
that over real network connections now.

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

21 years agoChange error handling to store the error number rather than the string,
ben [Sun, 12 Jan 2003 01:24:03 +0000 (01:24 +0000)]
Change error handling to store the error number rather than the string,
and to convert to a string only on demand.  This makes it possible to have
the string contain the error number if we don't recognise it.

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

21 years agoInitial import of Owen's OpenTransport interface. It doesn't work yet, but
ben [Sat, 11 Jan 2003 23:33:57 +0000 (23:33 +0000)]
Initial import of Owen's OpenTransport interface.  It doesn't work yet, but
it does compile and link.

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

21 years agoAdd an indirection layer between mtcpnet.c and the rest of PuTTY so that
ben [Sat, 11 Jan 2003 19:43:59 +0000 (19:43 +0000)]
Add an indirection layer between mtcpnet.c and the rest of PuTTY so that
we can have runtime switching between MacTCP and OpenTransport, and so
that we can cope if there's no TCP/IP stack available at all (albeit with
very little functionality at present).

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

21 years agoCalling plug_closing() is highly likely to result in a call to sk_close(),
ben [Sat, 11 Jan 2003 17:36:24 +0000 (17:36 +0000)]
Calling plug_closing() is highly likely to result in a call to sk_close(),
so arrange that mactcp_poll() can cope with that and not access freed memory
when it happens.

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

21 years agoWhen polling MacTCP connections, check the connection state and if the far
ben [Sat, 11 Jan 2003 17:31:59 +0000 (17:31 +0000)]
When polling MacTCP connections, check the connection state and if the far
end has sent a FIN pass that up to the plug.
TODO: handle less graceful connection closures.

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

21 years agoMove the prototype for platform_get_x11_auth() from x11fwd.c to ssh.h so that
ben [Sat, 11 Jan 2003 14:20:00 +0000 (14:20 +0000)]
Move the prototype for platform_get_x11_auth() from x11fwd.c to ssh.h so that
it can be checked against the implementation.

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

21 years agoAdd a cast for a char * vs unsigned char * conflict.
ben [Sat, 11 Jan 2003 14:08:46 +0000 (14:08 +0000)]
Add a cast for a char * vs unsigned char * conflict.

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

21 years agoconst fallout from Simon's X forwarding changes.
ben [Sat, 11 Jan 2003 14:08:07 +0000 (14:08 +0000)]
const fallout from Simon's X forwarding changes.

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

21 years agoYet _another_ `received data for nonexistent channel' bug. This time
simon [Sat, 11 Jan 2003 10:05:29 +0000 (10:05 +0000)]
Yet _another_ `received data for nonexistent channel' bug. This time
it was because we received WINDOW_ADJUST on a channel we'd already
sent CLOSE on, and reflexively attempted to continue sending the
buffered data in response. Should now be fixed.

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

21 years agoHack around an oddity in X display names and xauth.
simon [Sat, 11 Jan 2003 09:46:50 +0000 (09:46 +0000)]
Hack around an oddity in X display names and xauth.

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

21 years agoSupport XDM-AUTHORIZATION-1 for connecting to local X servers. If
simon [Sat, 11 Jan 2003 09:31:54 +0000 (09:31 +0000)]
Support XDM-AUTHORIZATION-1 for connecting to local X servers. If
we're going to be a security program, we can at least make a token
effort to use the most secure local X auth available! And I'm still
half-tempted to see if I can support it for remote X servers too...

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

21 years agoIntroduce framework for authenticating with the local X server.
simon [Fri, 10 Jan 2003 18:33:35 +0000 (18:33 +0000)]
Introduce framework for authenticating with the local X server.
Windows and Mac backends have acquired auth-finding functions which
do nothing; Unix backend has acquired one which actually works, so
Plink can now do X forwarding believably.
(This checkin stretches into some unlikely parts of the code because
there have been one or two knock-on effects involving `const'. Bah.)

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

21 years agoAsk for a meaningful subject line on messages.
ben [Fri, 10 Jan 2003 15:23:01 +0000 (15:23 +0000)]
Ask for a meaningful subject line on messages.

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

21 years agoImplement get_window_title().
ben [Thu, 9 Jan 2003 23:29:22 +0000 (23:29 +0000)]
Implement get_window_title().

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

21 years agoForcibly close any TCP connections that are still open when PuTTY exits.
ben [Thu, 9 Jan 2003 23:04:34 +0000 (23:04 +0000)]
Forcibly close any TCP connections that are still open when PuTTY exits.
This saves leaving them lying around to crash the machine later.

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

21 years agoUse c2pstrcpy() rather than silly sprintf() tricks.
ben [Thu, 9 Jan 2003 22:51:41 +0000 (22:51 +0000)]
Use c2pstrcpy() rather than silly sprintf() tricks.

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

21 years agoc2pstr() is deprecated. Use c2pstrcpy() instead.
ben [Thu, 9 Jan 2003 22:45:48 +0000 (22:45 +0000)]
c2pstr() is deprecated.  Use c2pstrcpy() instead.

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

21 years agoTake advantage of having control over the default font to do the job properly:
ben [Thu, 9 Jan 2003 22:39:47 +0000 (22:39 +0000)]
Take advantage of having control over the default font to do the job properly:
ask the system script what it's preferred monospaced font is, and use that
if possible.  Failing, that, try the Roman script system, and if that fails,
fall back to Monaco 9.

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

21 years agoSet PuTTY's canBackground flag so that it receives CPU time (to process
ben [Thu, 9 Jan 2003 19:27:29 +0000 (19:27 +0000)]
Set PuTTY's canBackground flag so that it receives CPU time (to process
incoming data) while in the background.

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

21 years agoInstall a notification procedure (ASR) on each TCP connection that wakes
ben [Thu, 9 Jan 2003 19:26:39 +0000 (19:26 +0000)]
Install a notification procedure (ASR) on each TCP connection that wakes
PuTTY up when something happens.  This should allow it to receive data without
having to poll for it continuously.

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

21 years agoRemove the diagnostic added in rev 1.42 [r2288]; apparently it's all
simon [Thu, 9 Jan 2003 19:26:12 +0000 (19:26 +0000)]
Remove the diagnostic added in rev 1.42 [r2288]; apparently it's all
true and WinSock _does_ occasionally send us netevent messages with
no socket for no reason. Ignore them when they appear.

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

21 years agoSwitching from -opt space to -opt time on 68K Macs only loses us about 2K
ben [Thu, 9 Jan 2003 19:24:02 +0000 (19:24 +0000)]
Switching from -opt space to -opt time on 68K Macs only loses us about 2K
of disc space, and we need all the speed we can get, so do that.

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

21 years agoUnix plink now catches SIGWINCH and propagates local terminal
simon [Thu, 9 Jan 2003 18:28:01 +0000 (18:28 +0000)]
Unix plink now catches SIGWINCH and propagates local terminal
resizes to the remote end.

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

21 years agoSupport asynchronous connect() in Unix networking. Now a port
simon [Thu, 9 Jan 2003 18:14:24 +0000 (18:14 +0000)]
Support asynchronous connect() in Unix networking. Now a port
forwarding to a nonexistent host shouldn't hold up the rest of the
program.

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

21 years agoI'm sick of all those #ifdefs in settings.c, and in any case plink
simon [Thu, 9 Jan 2003 18:06:29 +0000 (18:06 +0000)]
I'm sick of all those #ifdefs in settings.c, and in any case plink
and pterm need at least one default setting to be _different_ (pterm
needs the default term type to be `xterm', while plink needs it to
be taken from $TERM). So here's a completely new alternative
mechanism for platform- and app-specific default settings. Ben will
probably want to check the integrity of the Mac port, since I've
fiddled with it without testing that it still compiles.

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

21 years agoYikes! Forgot to zero the password after SSH2 PW authentication.
simon [Thu, 9 Jan 2003 17:33:49 +0000 (17:33 +0000)]
Yikes! Forgot to zero the password after SSH2 PW authentication.

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

21 years agoAdd PuTTYtel binaries.
ben [Wed, 8 Jan 2003 23:58:50 +0000 (23:58 +0000)]
Add PuTTYtel binaries.

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

21 years agoRather useless entropy-collection functions for Mac OS. These need work.
ben [Wed, 8 Jan 2003 23:56:48 +0000 (23:56 +0000)]
Rather useless entropy-collection functions for Mac OS.  These need work.

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

21 years agoThe CFM-68K build isn't working at the moment (we blow past its global data
ben [Wed, 8 Jan 2003 22:48:57 +0000 (22:48 +0000)]
The CFM-68K build isn't working at the moment (we blow past its global data
limit what with libcharset and the crypto stuff), so don't include it in
"all".

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

21 years agoFairly major hackery to get SSH going on the Mac. Half the support
ben [Wed, 8 Jan 2003 22:46:12 +0000 (22:46 +0000)]
Fairly major hackery to get SSH going on the Mac.  Half the support
functions are only dummy stubs, but it's still minimally usable.  At
least, as long as you don't want to do anything complex like logging out.

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

21 years agoWe just got mailed a Dr Watson log which suggests I failed to
simon [Wed, 8 Jan 2003 09:15:56 +0000 (09:15 +0000)]
We just got mailed a Dr Watson log which suggests I failed to
initialise term->paste_len during initialisation, and indeed looking
at the code confirms this. I'm puzzled as to why valgrind didn't
spot this in pterm, though, since it's all in cross-platform code!

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

21 years agoUse '\012' as the end of the SSH banner line, not '\n'.
ben [Tue, 7 Jan 2003 23:05:12 +0000 (23:05 +0000)]
Use '\012' as the end of the SSH banner line, not '\n'.
Mac compilers default to making '\n' == '\015'.

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

21 years agoInitialise the "protocol" field of a new ssh_tag to NULL so Bad Things don't
ben [Tue, 7 Jan 2003 22:45:12 +0000 (22:45 +0000)]
Initialise the "protocol" field of a new ssh_tag to NULL so Bad Things don't
happen if we try to type things before the SSH banner has been received.

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

21 years agoMove the various big tables to the start of the file to save mucking about
ben [Tue, 7 Jan 2003 20:47:53 +0000 (20:47 +0000)]
Move the various big tables to the start of the file to save mucking about
with ifdefs for specific compilers.

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

21 years agoAhem. Now pterm actually uses wc_to_mb in a situation where it needs
simon [Tue, 7 Jan 2003 13:09:56 +0000 (13:09 +0000)]
Ahem. Now pterm actually uses wc_to_mb in a situation where it needs
to pass in a default character, it would help if wc_to_mb actually
_honoured_ the default-character parameter.

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

21 years agoIt looks like Visual C (or whatever the Windows snapshots are built with)
ben [Mon, 6 Jan 2003 21:46:56 +0000 (21:46 +0000)]
It looks like Visual C (or whatever the Windows snapshots are built with)
objects to incomplete static array declarations, which I introduced to work
around a bug in SC/MrC.  Use #ifdefs to decide whether to enable the workaround
or not.

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

21 years agoOne usually includes .h files, not .c files. That explains why it was
ben [Sun, 5 Jan 2003 23:48:10 +0000 (23:48 +0000)]
One usually includes .h files, not .c files.  That explains why it was
taking so long to compile!

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

21 years agoInclude putty.h to get prototypes for exported functions.
ben [Sun, 5 Jan 2003 23:38:11 +0000 (23:38 +0000)]
Include putty.h to get prototypes for exported functions.

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

21 years agozlib_disable_compression() and zlib_huflookup() are unused outside this file.
ben [Sun, 5 Jan 2003 23:36:53 +0000 (23:36 +0000)]
zlib_disable_compression() and zlib_huflookup() are unused outside this file.
Make them static.

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

21 years agoSHA512_Core_Init() and SHA512_Block() are unused outside this file. Make
ben [Sun, 5 Jan 2003 23:34:00 +0000 (23:34 +0000)]
SHA512_Core_Init() and SHA512_Block() are unused outside this file.  Make
them static.

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

21 years agorsa2_sign() is unused outside this file. Make it static.
ben [Sun, 5 Jan 2003 23:32:19 +0000 (23:32 +0000)]
rsa2_sign() is unused outside this file.  Make it static.

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

21 years agorandom_stir() is unused outside this file. Make it static.
ben [Sun, 5 Jan 2003 23:30:48 +0000 (23:30 +0000)]
random_stir() is unused outside this file.  Make it static.
Include putty.h to get prototypes for random_init() and random_get_savedata().

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

21 years agoMove prototypes for base64_decode_atom(), base64_lines(), and base64_encode()
ben [Sun, 5 Jan 2003 23:28:02 +0000 (23:28 +0000)]
Move prototypes for base64_decode_atom(), base64_lines(), and base64_encode()
from import.c to ssh.h, so that the implementation can see them.  This
necessitates ssh.h's including <stdio.h>.
Also remove a spare prototype for base64_encode_atom() from import.c.

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

21 years agodss_sign() is unused outside this file. Make it static.
ben [Sun, 5 Jan 2003 23:14:04 +0000 (23:14 +0000)]
dss_sign() is unused outside this file.  Make it static.

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

21 years agodes_key_setup(), des_encipher(), and des_decipher() are unreferenced outside
ben [Sun, 5 Jan 2003 23:12:58 +0000 (23:12 +0000)]
des_key_setup(), des_encipher(), and des_decipher() are unreferenced outside
this file.  Make them static.

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

21 years agoInclude ssh.h for the crc32() and crc32_update() prototypes.
ben [Sun, 5 Jan 2003 23:09:53 +0000 (23:09 +0000)]
Include ssh.h for the crc32() and crc32_update() prototypes.

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

21 years agobigdivmod() is unreferenced outside this file. Make it static.
ben [Sun, 5 Jan 2003 23:05:49 +0000 (23:05 +0000)]
bigdivmod() is unreferenced outside this file.  Make it static.
diagbn() is unreferenced.  #if it out.

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

21 years agoaes_setup() is unused outside this file. Make it static.
ben [Sun, 5 Jan 2003 23:03:02 +0000 (23:03 +0000)]
aes_setup() is unused outside this file.  Make it static.

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

21 years agoMake ssh1_pkt_type(), ssh2_pkt_type, logeventf(), setup_userpass_input(),
ben [Sun, 5 Jan 2003 23:01:43 +0000 (23:01 +0000)]
Make ssh1_pkt_type(), ssh2_pkt_type, logeventf(), setup_userpass_input(),
process_userpass_input(), and ssh_unthrottle() static, since they're not
referenced outside this file.

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

21 years agoMove x11fwd and portfwd prototypes from ssh.c into ssh.h so they can be seen
ben [Sun, 5 Jan 2003 22:53:23 +0000 (22:53 +0000)]
Move x11fwd and portfwd prototypes from ssh.c into ssh.h so they can be seen
by (and checked against) the definitions.

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

21 years agoSC in "finding an actual bug" shocker! Set the port number before passing
ben [Sun, 5 Jan 2003 22:52:11 +0000 (22:52 +0000)]
SC in "finding an actual bug" shocker!  Set the port number before passing
it to name_lookup().

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

21 years agosshsha.c and sshmd5.c compile fine on PowerPC now.
ben [Sun, 5 Jan 2003 15:31:45 +0000 (15:31 +0000)]
sshsha.c and sshmd5.c compile fine on PowerPC now.

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

21 years agoMake SHA_Core_Init() (only used in this file) static.
ben [Sun, 5 Jan 2003 15:31:09 +0000 (15:31 +0000)]
Make SHA_Core_Init() (only used in this file) static.

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

21 years agoMake MD5_Core_Init and MD5_Block (both only referenced in this file) static.
ben [Sun, 5 Jan 2003 15:29:22 +0000 (15:29 +0000)]
Make MD5_Core_Init and MD5_Block (both only referenced in this file) static.

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

21 years ago"possible unintended assignment"? I think not.
ben [Sun, 5 Jan 2003 14:23:30 +0000 (14:23 +0000)]
"possible unintended assignment"?  I think not.

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

21 years agochar * vs unsigned char * (by explicit cast).
ben [Sun, 5 Jan 2003 14:20:49 +0000 (14:20 +0000)]
char * vs unsigned char * (by explicit cast).

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

21 years agoCommas at the end of enumerator lists aren't allowed.
ben [Sun, 5 Jan 2003 14:18:00 +0000 (14:18 +0000)]
Commas at the end of enumerator lists aren't allowed.

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

21 years agoEliminate more unsigned char * vs char * errors using explicit casts.
ben [Sun, 5 Jan 2003 14:14:51 +0000 (14:14 +0000)]
Eliminate more unsigned char * vs char * errors using explicit casts.

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

21 years agoFix more unsigned char * vs char * warnings, usually by making implicit
ben [Sun, 5 Jan 2003 14:11:14 +0000 (14:11 +0000)]
Fix more unsigned char * vs char * warnings, usually by making implicit
casts explicit.

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

21 years agoReplace implict char-*-to-unsigned-char-* casts with explicit ones.
ben [Sun, 5 Jan 2003 14:00:16 +0000 (14:00 +0000)]
Replace implict char-*-to-unsigned-char-* casts with explicit ones.

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

21 years agoSC (Apple's 68K C compiler) seems to treat tentative definitions of complete
ben [Sun, 5 Jan 2003 13:57:09 +0000 (13:57 +0000)]
SC (Apple's 68K C compiler) seems to treat tentative definitions of complete
arrya as full definitions, and hence gets upset when it finds a full definition
later.  This is a bug (see K&R2 A10.2), but an easy one to work around by
making the tentative definitions incomplete, so I've done that.

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

21 years agoDeal with "possible unintended assignment" warnings.
ben [Sun, 5 Jan 2003 13:46:13 +0000 (13:46 +0000)]
Deal with "possible unintended assignment" warnings.

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

21 years agoAttack char * vs unsigned char * conversions. In most cases, I've just
ben [Sun, 5 Jan 2003 13:43:02 +0000 (13:43 +0000)]
Attack char * vs unsigned char * conversions.  In most cases, I've just
gone for replacing the implicit casts with explicit ones.  Where there was
something obviously better that I could do, I've done it, though.

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

21 years agoFix more "possible unintended assignment" warnings.
ben [Sun, 5 Jan 2003 13:04:04 +0000 (13:04 +0000)]
Fix more "possible unintended assignment" warnings.

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

21 years agoAdd reception support for MacTCP. Now I can log in over TELNET, just about.
ben [Sun, 5 Jan 2003 12:53:38 +0000 (12:53 +0000)]
Add reception support for MacTCP.  Now I can log in over TELNET, just about.
There are still lots of things to fix, like urgent data or the fact that
everything seems to happen one keypress too late, but this is an important
milestone.

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

21 years agoWhen looking for the correct backend to use, look in the configuration
ben [Sun, 5 Jan 2003 11:31:51 +0000 (11:31 +0000)]
When looking for the correct backend to use, look in the configuration
structure for the session, not the almost-dead global cfg.

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

21 years agoSecond work-in-progress MacTCP commit. We can now open a connection, but
ben [Sun, 5 Jan 2003 10:52:56 +0000 (10:52 +0000)]
Second work-in-progress MacTCP commit.  We can now open a connection, but
not transfer any data across it.

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

21 years agoAdd some backends, a network interface and some library routines to the
ben [Sun, 5 Jan 2003 00:06:25 +0000 (00:06 +0000)]
Add some backends, a network interface and some library routines to the
Mac port.

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

21 years agoBeginnings of a MacTCP network layer. This has all of the DNS interface
ben [Sat, 4 Jan 2003 19:51:20 +0000 (19:51 +0000)]
Beginnings of a MacTCP network layer.  This has all of the DNS interface
present, including stuff to find and load the MacTCP DNR.  Actually making
a TCP connection is still unimplemented, though, and much testing remains
to be done.

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

21 years agoAdd a vsnprintf() for the Mac, which doesn't have one of its own. This is
ben [Sat, 4 Jan 2003 19:01:45 +0000 (19:01 +0000)]
Add a vsnprintf() for the Mac, which doesn't have one of its own.  This is
the NetBSD kernel printf, which is integer-only and under a Berkeley-style
(now 3-clause) copyright owned by UCB.  This has only been compile-tested,
but almost all of my changes were in the definitions at the top (the exception
being to remove tty output).  This lacks 64-bit support because the Apple
68K C compiler, SC, lacks it too.

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

21 years agoProvide a version of stricmp() and strnicmp() for Mac OS, which doesn't have
ben [Sat, 4 Jan 2003 17:24:49 +0000 (17:24 +0000)]
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.

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

21 years agoFix some char * vs unsigned char * conversions, plus a stylistic nit, both
ben [Sat, 4 Jan 2003 16:56:33 +0000 (16:56 +0000)]
Fix some char * vs unsigned char * conversions, plus a stylistic nit, both
courtesy of Apple's compilers.

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

21 years agoHammer out some char * vs unsigned char * problems. In general, I've kept
ben [Sat, 4 Jan 2003 16:42:53 +0000 (16:42 +0000)]
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.

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

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