u/mdw/putty
21 years agosocks5_negotiate(): rather than using an uninitialised value when passed
ben [Sat, 12 Apr 2003 21:23:58 +0000 (21:23 +0000)]
socks5_negotiate(): rather than using an uninitialised value when passed
an address of an invalid type, assert() that it will never happen.
Do something similar for SOCKS4 as well.

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

21 years agoDon't use an uninitialised value when we get an unsupported ATYP in a
ben [Sat, 12 Apr 2003 21:15:43 +0000 (21:15 +0000)]
Don't use an uninitialised value when we get an unsupported ATYP in a
SOCKS5 request.  Spotted by GCC.

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

21 years agoRemove a couple of spurious semicolons.
ben [Sat, 12 Apr 2003 21:07:25 +0000 (21:07 +0000)]
Remove a couple of spurious semicolons.

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

21 years agoUpdate for Simon's from_backend changes.
ben [Sat, 12 Apr 2003 21:06:34 +0000 (21:06 +0000)]
Update for Simon's from_backend changes.

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

21 years agoSupport for New Session, Duplicate Session and the Saved Sessions
simon [Sat, 12 Apr 2003 17:37:15 +0000 (17:37 +0000)]
Support for New Session, Duplicate Session and the Saved Sessions
submenu in Unix PuTTY, and Duplicate Session also in pterm. You do
_not_ want to know how this is done. Be warned.

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

21 years agoFurther fiddlings with the size reconfiguration stuff; now
simon [Sat, 12 Apr 2003 11:03:44 +0000 (11:03 +0000)]
Further fiddlings with the size reconfiguration stuff; now
everything seems to work right even when the only thing changed was
the window border.

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

21 years agoMid-session reconfiguration of scrollback was failing (in Unix)
simon [Sat, 12 Apr 2003 10:44:14 +0000 (10:44 +0000)]
Mid-session reconfiguration of scrollback was failing (in Unix)
except when width or height had _also_ been changed. Fixed.

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

21 years agoImplement the ldisc `special' mechanism in Unix, without which local
simon [Sat, 12 Apr 2003 09:27:56 +0000 (09:27 +0000)]
Implement the ldisc `special' mechanism in Unix, without which local
line editing didn't work at all.

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

21 years agoFix from yesterday's frontend-handle upheaval: ldisc calls
simon [Sat, 12 Apr 2003 09:19:09 +0000 (09:19 +0000)]
Fix from yesterday's frontend-handle upheaval: ldisc calls
from_backend(), and must now pass its frontend handle rather than
its terminal handle.

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

21 years agoMid-session BCE reconfiguration wasn't taking effect immediately
simon [Sat, 12 Apr 2003 09:05:28 +0000 (09:05 +0000)]
Mid-session BCE reconfiguration wasn't taking effect immediately
because I forgot to set term->erase_char in response to the change
in term->use_bce. Oops.

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

21 years agoDisable window title reporting by default, since it's a security
simon [Sat, 12 Apr 2003 08:59:06 +0000 (08:59 +0000)]
Disable window title reporting by default, since it's a security
hazard. I considered removing it completely, but I can't rule out
the possibility of an OS that actually takes security of its
terminal devices seriously, and which might be able to make sensible
and safe use of this feature.

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

21 years agoClose On Exit and Warn On Close fixes: (a) pty_reconfig needs to
simon [Sat, 12 Apr 2003 08:27:03 +0000 (08:27 +0000)]
Close On Exit and Warn On Close fixes: (a) pty_reconfig needs to
remember changes in COE so it knows whether to print a message, and
(b) once the session has already ended, Warn On Close should shut up.

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

21 years agoWhen I implemented the GTK messagebox() function and everything that
simon [Fri, 11 Apr 2003 18:44:05 +0000 (18:44 +0000)]
When I implemented the GTK messagebox() function and everything that
needed to use it, I completely forgot about askappend(). D'oh.

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

21 years agoRationalisation of the system of frontend handles. Most modular bits
simon [Fri, 11 Apr 2003 18:36:27 +0000 (18:36 +0000)]
Rationalisation of the system of frontend handles. Most modular bits
of PuTTY (terminal, backend, logctx etc) take a `void *' handle
passed to them from the frontend, and used as a context for all
their callbacks. Most of these point at the frontend structure
itself (on platforms where this is meaningful), except that the
handle passed to the backend has always pointed at the terminal
because from_backend() was implemented in terminal.c. This has
finally bitten Unix PuTTY, because both backend and logctx have
been passing their respective and very different frontend handles to
logevent(), so I've fixed it.
from_backend() is now a function supplied by the _frontend_ itself,
in all cases, and the frontend handle passed to backends must be the
same as that passed to everything else. What was from_backend() in
terminal.c is now called term_data(), and the typical implementation
of from_backend() in a GUI frontend will just extract the terminal
handle from the frontend structure and delegate to that.
This appears to work on Unix and Windows, but has most likely broken
the Mac build.

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

21 years agoImplement Warn On Close.
simon [Fri, 11 Apr 2003 18:15:47 +0000 (18:15 +0000)]
Implement Warn On Close.

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

21 years ago`Copy All' ought to de-highlight any existing selection, in line
simon [Fri, 11 Apr 2003 18:10:13 +0000 (18:10 +0000)]
`Copy All' ought to de-highlight any existing selection, in line
with any other operation that shifts the X selection to stuff other
than the highlighted text.

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

21 years ago`Copy All' context-menu item, for what it's worth.
simon [Fri, 11 Apr 2003 17:59:36 +0000 (17:59 +0000)]
`Copy All' context-menu item, for what it's worth.

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

21 years agoSaving of Default Settings under Unix was broken, because mungestr()
simon [Fri, 11 Apr 2003 17:42:52 +0000 (17:42 +0000)]
Saving of Default Settings under Unix was broken, because mungestr()
was translating NULL into "Default Settings" but not doing the same
to "". Now fixed.

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

21 years agoCutting and pasting from the Unix Event Log.
simon [Fri, 11 Apr 2003 17:40:52 +0000 (17:40 +0000)]
Cutting and pasting from the Unix Event Log.

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

21 years agoA poster on comp.security.ssh mentions that he had expected to find
simon [Fri, 11 Apr 2003 17:39:48 +0000 (17:39 +0000)]
A poster on comp.security.ssh mentions that he had expected to find
the location of PuTTY's data storage mentioned in the manual section
about loading and storing sessions. This seems not unreasonable, so
I've put it there.

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

21 years agoImplemented Change Settings under Unix. We are gradually getting there.
simon [Thu, 10 Apr 2003 18:00:50 +0000 (18:00 +0000)]
Implemented Change Settings under Unix. We are gradually getting there.

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

21 years agoAll the stderr messages in this file now use appname rather than
simon [Thu, 10 Apr 2003 11:57:11 +0000 (11:57 +0000)]
All the stderr messages in this file now use appname rather than
guessing wrongly.

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

21 years agoMinor improvements to subsidiary window placement; with any luck the
simon [Thu, 10 Apr 2003 08:53:43 +0000 (08:53 +0000)]
Minor improvements to subsidiary window placement; with any luck the
Event Log should go off the side of the screen rather less often now.

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

21 years agoEvent Log for Unix PuTTY. Doesn't yet allow X selection of its
simon [Wed, 9 Apr 2003 18:46:45 +0000 (18:46 +0000)]
Event Log for Unix PuTTY. Doesn't yet allow X selection of its
contents, and doesn't automatically maintain scroll position at the
bottom when new entries are added while the list is open, but it's a
start.

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

21 years agoRemote-to-local port forwarding in SSH2 was apparently completely
simon [Wed, 9 Apr 2003 11:19:39 +0000 (11:19 +0000)]
Remote-to-local port forwarding in SSH2 was apparently completely
broken! We were expecting the peer address/port in the incoming
packet _before_ the connected address/port, which is just wrong. I
wonder how I managed to mess that up.

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

21 years ago`dynamic' was uninitialised in other types of port forwarding. Oops.
simon [Wed, 9 Apr 2003 11:18:41 +0000 (11:18 +0000)]
`dynamic' was uninitialised in other types of port forwarding. Oops.

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

21 years agoChas Honton's patch to dynamic port forwarding: should allow longer
simon [Wed, 9 Apr 2003 09:09:57 +0000 (09:09 +0000)]
Chas Honton's patch to dynamic port forwarding: should allow longer
host names in SOCKS 4A, up to 255 characters (which is apparently
the DNS limit anyway).

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

21 years agoRename pterm's -T option to -title, to avoid clashing with PuTTY's
simon [Tue, 8 Apr 2003 14:02:34 +0000 (14:02 +0000)]
Rename pterm's -T option to -title, to avoid clashing with PuTTY's
-T (don't allocate a pty) option.

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

21 years agoWhile writing gtkdlg.c I learned how to specify a window's initial
simon [Tue, 8 Apr 2003 13:49:12 +0000 (13:49 +0000)]
While writing gtkdlg.c I learned how to specify a window's initial
position in GTK, so I can now implement the other half of -geometry
which I'd previously believed to be impossible in GTK. It's still
not perfect, because GTK apparently provides no way for us to get
hold of the X reparent event in order to support negative geometries
in a manner which takes account of the WM borders; but for positive
position it's at least an improvement on the previous version!

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

21 years agoNow that we have `appname', make much wider use of it. In
simon [Sun, 6 Apr 2003 14:11:33 +0000 (14:11 +0000)]
Now that we have `appname', make much wider use of it. In
particular, the config box uses it in place of the word `PuTTY',
which means mid-session reconfig in pterm will look less strange
once I implement it. Also, while I'm at it, I've personalised all
the dialog boxes and menu items and suchlike so that PuTTYtel
actually claims to be PuTTYtel rather than PuTTY.

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

21 years agoTo avoid gratuitous flicker, if a control already has the focus when it's
ben [Sun, 6 Apr 2003 13:27:40 +0000 (13:27 +0000)]
To avoid gratuitous flicker, if a control already has the focus when it's
clicked in, don't attempt to move the focus at all.

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

21 years agoConst fallout, as predicted.
ben [Sat, 5 Apr 2003 22:12:44 +0000 (22:12 +0000)]
Const fallout, as predicted.

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

21 years agoBring list of applications and architectures up to date.
ben [Sat, 5 Apr 2003 22:10:13 +0000 (22:10 +0000)]
Bring list of applications and architectures up to date.

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

21 years agodd support for list boxes in Mac OS 8. Not entirely solid, but largely
ben [Sat, 5 Apr 2003 22:03:06 +0000 (22:03 +0000)]
dd support for list boxes in Mac OS 8.  Not entirely solid, but largely
working.
[ bits missed in the first commit ]

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

21 years agoAdd support for list boxes in Mac OS 8. Not entirely solid, but largely
ben [Sat, 5 Apr 2003 22:00:57 +0000 (22:00 +0000)]
Add support for list boxes in Mac OS 8.  Not entirely solid, but largely
working.

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

21 years agoBah. There's always one I forget to `cvs add'.
simon [Sat, 5 Apr 2003 19:52:12 +0000 (19:52 +0000)]
Bah. There's always one I forget to `cvs add'.

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

21 years agoOn System 7, draw the default ring in grey if the window is disabled.
ben [Sat, 5 Apr 2003 18:00:46 +0000 (18:00 +0000)]
On System 7, draw the default ring in grey if the window is disabled.
This isn't _quite_ right, since it uses a b/w dither everywhere, whereas
it should use grey on colour screens.  That would involve mucking around
with DeviceLoop, though, and I'm not sure I can be bothered.

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

21 years agoHandle Return and Escape keys in dialogue box, triggering the default and
ben [Sat, 5 Apr 2003 17:19:38 +0000 (17:19 +0000)]
Handle Return and Escape keys in dialogue box, triggering the default and
cancel buttons respectively.

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

21 years agoFixed the printing and charset combo boxes in Unix PuTTY. (The
simon [Sat, 5 Apr 2003 16:36:11 +0000 (16:36 +0000)]
Fixed the printing and charset combo boxes in Unix PuTTY. (The
former by simply removing it; the latter by adding an enumeration
function to libcharset.) This has had slight `const' repercussions
on cp_name() and cp_enumerate() which might break the Mac build.

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

21 years agoUnix can't sensibly enumerate printers (since they're defined as
simon [Sat, 5 Apr 2003 16:12:52 +0000 (16:12 +0000)]
Unix can't sensibly enumerate printers (since they're defined as
being lpr commands), so the Unix config box now replaces the printer
combo box with an ordinary edit box.

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

21 years agoCtrl+rightclick now pops up a context menu in Unix PuTTY and pterm.
simon [Sat, 5 Apr 2003 16:05:00 +0000 (16:05 +0000)]
Ctrl+rightclick now pops up a context menu in Unix PuTTY and pterm.
This menu is not yet fully populated, but it has an About box (yet
another licence location :-/ ) and supports the new configurable
specials menu (thus making Unix PuTTY do one tiny thing which
OpenSSH-in-a-pterm can't :-).

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

21 years agoCope with NULL labels in every control where it makes sense, and assert that
ben [Sat, 5 Apr 2003 15:55:22 +0000 (15:55 +0000)]
Cope with NULL labels in every control where it makes sense, and assert that
all other labels are != NULL.

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

21 years agoSend EVENT_VALCHANGE when a System 7 editbox gets typed in.
ben [Sat, 5 Apr 2003 15:08:17 +0000 (15:08 +0000)]
Send EVENT_VALCHANGE when a System 7 editbox gets typed in.

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

21 years agoImplement dlg_end().
ben [Sat, 5 Apr 2003 15:01:16 +0000 (15:01 +0000)]
Implement dlg_end().

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

21 years agoImplement update_special_menu(), which calls mac_adjustmenus() as appropriate.
ben [Sat, 5 Apr 2003 14:34:06 +0000 (14:34 +0000)]
Implement update_special_menu(), which calls mac_adjustmenus() as appropriate.
Eventually, mac_adjustmenus() will handle populating the Specials menu.

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

21 years agoAdd null_get_specials(), for both null and loop backends.
ben [Sat, 5 Apr 2003 14:32:58 +0000 (14:32 +0000)]
Add null_get_specials(), for both null and loop backends.

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

21 years ago... of course, it would help if I remembered to _document_ dynamic
simon [Sat, 5 Apr 2003 11:52:42 +0000 (11:52 +0000)]
... of course, it would help if I remembered to _document_ dynamic
port forwarding. Ahem.

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

21 years agoDynamic port forwarding by means of a local SOCKS server. Fully
simon [Sat, 5 Apr 2003 11:45:21 +0000 (11:45 +0000)]
Dynamic port forwarding by means of a local SOCKS server. Fully
supports SOCKS 4, SOCKS 4A and SOCKS 5 (well, actually IPv6 in SOCKS
5 isn't supported, but it'll be no difficulty once I actually get
round to it). Thanks to Chas Honton for his `stone soup' patch: I
didn't end up actually using any of his code, but it galvanised me
into doing it properly myself :-)

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

21 years agoTurned the old `Telnet Command' System-submenu into a more general
simon [Fri, 4 Apr 2003 20:21:05 +0000 (20:21 +0000)]
Turned the old `Telnet Command' System-submenu into a more general
`Special Command' menu, in which any backend can place its own list
of magical things the user might want to ask the backend to do. In
particular I've implemented the recently proposed "break" extension
in SSH2 using this mechanism.
NB this checkin slightly breaks the Mac build, since it needs to
provide at least a stub form of update_specials_menu().

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

21 years agoThis script has been unnecessary for some time; since the config box revamp,
jacob [Fri, 4 Apr 2003 11:22:14 +0000 (11:22 +0000)]
This script has been unnecessary for some time; since the config box revamp,
accelerator clashes have been checked for at run-time.

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

21 years agoImplement columns, based loosely on Simon's Windows implementation. Now this
ben [Thu, 3 Apr 2003 23:18:06 +0000 (23:18 +0000)]
Implement columns, based loosely on Simon's Windows implementation.  Now this
actually _looks_ like PuTTY.

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

21 years agoAnother item for the release checklist: don't forget to save the
simon [Wed, 2 Apr 2003 09:20:58 +0000 (09:20 +0000)]
Another item for the release checklist: don't forget to save the
link maps of the release binaries.

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

21 years agoFurther .cvsignore updates.
simon [Wed, 2 Apr 2003 09:14:38 +0000 (09:14 +0000)]
Further .cvsignore updates.

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

21 years agoExtra bit of pre-release fiddling for the checklist.
simon [Wed, 2 Apr 2003 09:14:05 +0000 (09:14 +0000)]
Extra bit of pre-release fiddling for the checklist.

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

21 years agoImprovements to .cvsignore, to attempt to reduce the huge number of
simon [Wed, 2 Apr 2003 08:44:05 +0000 (08:44 +0000)]
Improvements to .cvsignore, to attempt to reduce the huge number of
? lines I see when running `cvs update', which in turn might help
deal with my tendency to forget to `cvs add' new files before a big
checkin :-)

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

21 years agoVarious error-handling fixes, mostly in Unix PuTTY but one (failure
simon [Tue, 1 Apr 2003 18:10:25 +0000 (18:10 +0000)]
Various error-handling fixes, mostly in Unix PuTTY but one (failure
to save a session) crosses over into the platform-independent side.

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

21 years agoMake sure the socket is closed properly in the various SSH exit paths.
simon [Mon, 31 Mar 2003 13:15:51 +0000 (13:15 +0000)]
Make sure the socket is closed properly in the various SSH exit paths.

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

21 years agoTrivial segfault fix from Richard B.
simon [Mon, 31 Mar 2003 12:57:36 +0000 (12:57 +0000)]
Trivial segfault fix from Richard B.

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

21 years agoAhem; update the TODO to reflect the cmdline changes :-)
simon [Mon, 31 Mar 2003 12:11:21 +0000 (12:11 +0000)]
Ahem; update the TODO to reflect the cmdline changes :-)

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

21 years agoSupport for PuTTY-style command-line arguments in Unix PuTTY. I
simon [Mon, 31 Mar 2003 12:10:53 +0000 (12:10 +0000)]
Support for PuTTY-style command-line arguments in Unix PuTTY. I
think it's now actually usable as a day-to-day SSH client, even if
things like the Event Log are still missing. So I call that a decent
lunch hour's work :-)

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

21 years agopterm.c now relies on backend `exitcode' functions returning <0 when
simon [Mon, 31 Mar 2003 12:10:08 +0000 (12:10 +0000)]
pterm.c now relies on backend `exitcode' functions returning <0 when
the session is still connected, and not returning an exit code until
after it's finished.

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

21 years agoAnd everyone's favourite cosmetic change: Unix PuTTY now doesn't
simon [Mon, 31 Mar 2003 11:42:45 +0000 (11:42 +0000)]
And everyone's favourite cosmetic change: Unix PuTTY now doesn't
claim to be pterm in the window title :-)

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

21 years agoCan now save and load settings under Unix.
simon [Mon, 31 Mar 2003 11:36:14 +0000 (11:36 +0000)]
Can now save and load settings under Unix.

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

21 years agoAhem; fix `bombout' so it passes the correct frontend handle to
simon [Mon, 31 Mar 2003 11:22:30 +0000 (11:22 +0000)]
Ahem; fix `bombout' so it passes the correct frontend handle to
connection_fatal().

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

21 years agoFix a _very_ subtle segfault in my two GTK container classes: the
simon [Mon, 31 Mar 2003 11:22:06 +0000 (11:22 +0000)]
Fix a _very_ subtle segfault in my two GTK container classes: the
`forall' function has to be prepared for the list of widgets to
change along the way if (for example) the callback function destroys
its input widget.

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

21 years agoCheckin of last night's work on GTK message boxes. Unix PuTTY now
simon [Mon, 31 Mar 2003 11:21:07 +0000 (11:21 +0000)]
Checkin of last night's work on GTK message boxes. Unix PuTTY now
has proper GUI prompts for host keys etc, so it should now be usable
without a controlling tty.

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

21 years agoCorrect the size of editboxes under Mac OS 8.
ben [Sun, 30 Mar 2003 14:24:20 +0000 (14:24 +0000)]
Correct the size of editboxes under Mac OS 8.

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

21 years agoCrude keyboard support for System 7 editboxes.
ben [Sun, 30 Mar 2003 00:45:00 +0000 (00:45 +0000)]
Crude keyboard support for System 7 editboxes.

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

21 years agoThe entropy pool is full of unsigned ints, not longs.
ben [Sat, 29 Mar 2003 23:57:55 +0000 (23:57 +0000)]
The entropy pool is full of unsigned ints, not longs.

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

21 years agoMove the Mac port over to using snew/snewn/sresize.
ben [Sat, 29 Mar 2003 23:07:55 +0000 (23:07 +0000)]
Move the Mac port over to using snew/snewn/sresize.

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

21 years agoIn a couple of places, snewn() was being asked for an array of char which was
ben [Sat, 29 Mar 2003 23:05:36 +0000 (23:05 +0000)]
In a couple of places, snewn() was being asked for an array of char which was
then assigned to an unsigned char * variabe.  This fixes that.

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

21 years agoConvert the System 7 static text control to be a read-only version of the
ben [Sat, 29 Mar 2003 22:04:21 +0000 (22:04 +0000)]
Convert the System 7 static text control to be a read-only version of the
editbox control.  This means that it has a persistent edit record, can have
its height measured and uses the system font by default, all of which are good.

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

21 years agoAdd support for labels on editboxes and radios.
ben [Sat, 29 Mar 2003 20:16:51 +0000 (20:16 +0000)]
Add support for labels on editboxes and radios.

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

21 years agoHaving created and used uxsel, it actually turns out to be
simon [Sat, 29 Mar 2003 19:52:50 +0000 (19:52 +0000)]
Having created and used uxsel, it actually turns out to be
practically trivial to put all the pieces together and create a
working prototype of Unix PuTTY! It's missing a lot of things -
notably GUI request boxes for host keys and logfiles and so forth,
the Event Log, mid-session reconfiguration, session loading and
saving, sensible population of the character sets drop-down list and
probably other fiddly little things too - but it will put up a
config box and then create a GUI window containing an SSH connection
to the host you specified, so it's _basically_ there. Woo!

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

21 years agoAdd input-focus support for System 7, where the Control Manager can't do
ben [Sat, 29 Mar 2003 18:32:36 +0000 (18:32 +0000)]
Add input-focus support for System 7, where the Control Manager can't do
it itself.
Also clean up Carbon builds.

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

21 years agoAdd the System 7 editbox CDEF, which I seem to have forgotten.
ben [Sat, 29 Mar 2003 18:31:09 +0000 (18:31 +0000)]
Add the System 7 editbox CDEF, which I seem to have forgotten.

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

21 years agopterm now uses the new uxsel module, so it's one step closer to
simon [Sat, 29 Mar 2003 18:30:14 +0000 (18:30 +0000)]
pterm now uses the new uxsel module, so it's one step closer to
being able to be a PuTTY as well as a pterm. In the process I've
also moved icky things like actually reading from the pty fd and
printing the `terminated on signal' messages into pty.c where they
obviously should have been in the first place. Also there's been one
interesting repercussion in the terminal code: terminal.c's
from_backend now calls term_out() directly rather than expecting the
front end to call it afterwards. This has had the entertaining side
effect of fixing a Windows-specific bug whereby activity in a port
forwarding through a PuTTY with a blinking cursor caused the cursor
to blink to ON (!!!!). So, a surprisingly far-reaching checkin as it
turns out...

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

21 years agoI'm sick of having to type (cd ..; perl mkfiles.pl) when I'm working
simon [Sat, 29 Mar 2003 17:07:31 +0000 (17:07 +0000)]
I'm sick of having to type (cd ..; perl mkfiles.pl) when I'm working
on Unix. So now mkfiles.pl will look in .. as well as . when
searching for Recipe, so I can run `perl ../mkfiles.pl' and it will
Just Work.

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

21 years agoAdded uxsel.c, into which I've moved those parts of the uxnet.c
simon [Sat, 29 Mar 2003 16:47:06 +0000 (16:47 +0000)]
Added uxsel.c, into which I've moved those parts of the uxnet.c
functionality that deal with selectable fds in general. The idea is
that pty.c will stop passing its fd straight to pterm.c and hand it
to this module instead, and pterm.c will start requesting a general
list of fds from this module rather than expecting a single one from
pty.c, with the ultimate aim of pterm.c being able to form the basis
of a Unix PuTTY as well as pterm proper.

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

21 years agoIntroduced wrapper macros snew(), snewn() and sresize() for the
simon [Sat, 29 Mar 2003 16:14:26 +0000 (16:14 +0000)]
Introduced wrapper macros snew(), snewn() and sresize() for the
malloc functions, which automatically cast to the same type they're
allocating the size of. Should prevent any future errors involving
mallocing the size of the wrong structure type, and will also make
life easier if we ever need to turn the PuTTY core code from real C
into C++-friendly C. I haven't touched the Mac frontend in this
checkin because I couldn't compile or test it.

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

21 years agoFix off-by-one in selection update while scrolling. Thanks Richard B.
simon [Sat, 29 Mar 2003 13:54:11 +0000 (13:54 +0000)]
Fix off-by-one in selection update while scrolling. Thanks Richard B.

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

21 years agoUpdate text about ports, hopefully not too controversial.
owen [Sat, 29 Mar 2003 01:44:39 +0000 (01:44 +0000)]
Update text about ports, hopefully not too controversial.

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

21 years agoTidy up dlg_editbox_set() and implemen dlg_editbox_get() for System 7.
ben [Fri, 28 Mar 2003 00:50:04 +0000 (00:50 +0000)]
Tidy up dlg_editbox_set() and implemen dlg_editbox_get() for System 7.

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

21 years agoDisplay half of a System 7 edit text CDEF, using TextEdit directly. This
ben [Fri, 28 Mar 2003 00:06:17 +0000 (00:06 +0000)]
Display half of a System 7 edit text CDEF, using TextEdit directly.  This
is the easy bit.

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

21 years agoopen_settings_r() and open_settings_w() need to cope with a NULL session name.
ben [Thu, 27 Mar 2003 22:46:28 +0000 (22:46 +0000)]
open_settings_r() and open_settings_w() need to cope with a NULL session name.

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

21 years agoDECCOLM fix, take 2. It turns out that my last fix wasn't causing crashes,
ben [Thu, 27 Mar 2003 00:22:59 +0000 (00:22 +0000)]
DECCOLM fix, take 2.  It turns out that my last fix wasn't causing crashes,
but PuTTY was running out of memory, which is both easy and fatal under Mac OS
at present.  Having fixed that, I've re-instated the screen-clearing and
cursor-homing on DECCOLM, and added resetting the scroll region, since this
seems to help VTL's keypad diagram display correctly.

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

21 years agoGet preferred and minimum sizes in the right order.
ben [Wed, 26 Mar 2003 23:52:21 +0000 (23:52 +0000)]
Get preferred and minimum sizes in the right order.

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

21 years agoRevert last change. It seems to cause crashes when DECCOLM actually changes
ben [Wed, 26 Mar 2003 23:13:41 +0000 (23:13 +0000)]
Revert last change.  It seems to cause crashes when DECCOLM actually changes
the width of the window.

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

21 years agoDECCOLM should clear the screen and home the cursor, so it does now.
ben [Wed, 26 Mar 2003 21:14:39 +0000 (21:14 +0000)]
DECCOLM should clear the screen and home the cursor, so it does now.
Correct interactions with DECOM and DECSTBM not investigated.
Should fix bug "deccolm-cls", but I'll leave it open till I've checked the
interactions.

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

21 years agoRename dlg_listbox_addwithindex() to dlg_listbox_addwithid(), since the old
ben [Tue, 25 Mar 2003 23:45:56 +0000 (23:45 +0000)]
Rename dlg_listbox_addwithindex() to dlg_listbox_addwithid(), since the old
name was, not to put too fine a point on it, wrong.

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

21 years agoUse CountMenuItems() rather than CountMItems() since the latter isn't
ben [Tue, 25 Mar 2003 23:23:03 +0000 (23:23 +0000)]
Use CountMenuItems() rather than CountMItems() since the latter isn't
available in Carbon.

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

21 years agoAdd support for editbox controls on Mac OS 8, and for per-control private data.
ben [Tue, 25 Mar 2003 23:18:59 +0000 (23:18 +0000)]
Add support for editbox controls on Mac OS 8, and for per-control private data.

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

21 years agoClean out some #ifdef'ed out junk.
ben [Mon, 24 Mar 2003 22:46:11 +0000 (22:46 +0000)]
Clean out some #ifdef'ed out junk.

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

21 years agoInitialise the "next menu ID" counter for pop-up menus. This stops crashes
ben [Mon, 24 Mar 2003 22:41:38 +0000 (22:41 +0000)]
Initialise the "next menu ID" counter for pop-up menus.  This stops crashes
on Mac OS 8.
Also re-do support for activate events so as not to depend on embedding
hierarchies, and thus to work on System 7.

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

21 years agoSlightly improve radio button layout to more closely match the Mac OS 8 HI
ben [Mon, 24 Mar 2003 21:55:51 +0000 (21:55 +0000)]
Slightly improve radio button layout to more closely match the Mac OS 8 HI
Guidelines.

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

21 years agoThe general blurb on using Plink in batch mode ought to mention the
simon [Mon, 24 Mar 2003 10:49:01 +0000 (10:49 +0000)]
The general blurb on using Plink in batch mode ought to mention the
host key prompt, and specifically mention how to ensure it won't
bite you.

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

21 years agoAdd support for pop-up menus (drop-down lists in Windows parlance).
ben [Sun, 23 Mar 2003 14:11:39 +0000 (14:11 +0000)]
Add support for pop-up menus (drop-down lists in Windows parlance).
For some reason, these explode horribly with the Appearance Manager present,
but work fine in bare System 7.  Investigations are ongoing.

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

21 years agoVarious cosmetic fixes to the GTK config box: vertical alignment of
simon [Sat, 22 Mar 2003 17:00:06 +0000 (17:00 +0000)]
Various cosmetic fixes to the GTK config box: vertical alignment of
edit box labels, Left/Right on the treeview to collapse and expand
branches, a window title, and the best treatment of wrapping text
widgets I could think of within the product-order-oriented GTK
layout model. I think this thing is now pretty much as good as it's
going to get before GTK v2 (which should fix one or two remaining
minor nasties which I really couldn't be bothered to work around in
GTK 1.2), so the next step is to actually start _using_ it.

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

21 years agoThe GTK colour selector does not provide full 8-bit resolution in
simon [Sat, 22 Mar 2003 11:07:59 +0000 (11:07 +0000)]
The GTK colour selector does not provide full 8-bit resolution in
the RGB values (it deals in floats with 2 d.p. instead). Hence I've
replaced the static RGB text item in the Colours panel with three
little edit boxes, so that a user can type in exact 0-255 RGB values
if necessary. This should have the additional advantage of being
quicker than faffing with the colour selector if you already know
exactly what you want and are in a hurry!

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

21 years agoFiddle with the cmdline_saved mechanism: the `-load' option is now
simon [Sat, 22 Mar 2003 10:36:28 +0000 (10:36 +0000)]
Fiddle with the cmdline_saved mechanism: the `-load' option is now
never deferred, but is evaluated instantly. This _should_ fix all
the irritating problems with (for example) proxy settings and saved
sessions not playing nicely. Or it may have some other ghastly side-
effect I haven't considered; really I ought to have been keeping
better track of all the problems in this area :-(

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