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

20 Коммитов

Автор SHA1 Сообщение Дата
Ben Harris 059e409c82 The ANSI-C constant FILENAME_MAX is ludicrously small on some systems.
Use the POSIX PATH_MAX if it exists, and fall back to 1024 otherwise.
We should really allocate filenames dynamically if PATH_MAX isn't defined.

[originally from svn r6307]
2005-09-13 20:08:25 +00:00
Owen Dunn 30e94b6a5c Fix segfault when HOME not set on Unix.
[originally from svn r4948]
2004-12-07 11:50:44 +00:00
Simon Tatham 7ecf13564a New timing infrastructure. There's a new function schedule_timer()
which pretty much any module can call to request a call-back in the
future. So terminal.c can do its own handling of blinking, visual
bells and deferred screen updates, without having to rely on
term_update() being called 50 times a second (fixes: pterm-timer);
and ssh.c and telnet.c both invoke a new module pinger.c which takes
care of sending keepalives, so they get sent uniformly in all front
ends (fixes: plink-keepalives, unix-keepalives).

[originally from svn r4906]
[this svn revision also touched putty-wishlist]
2004-11-27 13:20:21 +00:00
Simon Tatham 2dd7514b07 Idiot me _twice_! The new store_host_key() was failing in the
absence of an existing host key file. Duhh.

[originally from svn r3737]
2004-01-19 09:37:17 +00:00
Simon Tatham 276c8335af Idiot me! store_host_key() was blindly _appending_ new host keys to
the end of the host key file. This is perfectly all right if a host
key never changes, but it's completely useless if you need to
replace an existing entry. This version should do better.

[originally from svn r3719]
2004-01-17 13:00:18 +00:00
Simon Tatham d76a39d547 Close the host keys file after use. Well spotted Theo Markettos.
[originally from svn r3526]
2003-10-31 21:45:15 +00:00
Jacob Nevins f2676b6ccc Remove dead comment about writing settings, and query one about reading them.
[originally from svn r3507]
2003-10-14 21:01:12 +00:00
Simon Tatham 1be575d9c4 Saving of Default Settings under Unix was broken, because mungestr()
was translating NULL into "Default Settings" but not doing the same
to "". Now fixed.

[originally from svn r3096]
2003-04-11 17:42:52 +00:00
Simon Tatham 7706da5e17 Various error-handling fixes, mostly in Unix PuTTY but one (failure
to save a session) crosses over into the platform-independent side.

[originally from svn r3041]
2003-04-01 18:10:25 +00:00
Simon Tatham 0ec4f0620d Can now save and load settings under Unix.
[originally from svn r3031]
2003-03-31 11:36:14 +00:00
Simon Tatham d36a4c3685 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.

[originally from svn r3014]
2003-03-29 16:14:26 +00:00
Simon Tatham 73203bce79 Never pass a `char' to a ctype function. I had relied on gcc -Wall
letting me know about instances of this, but it turns out that my
ctype.h explicitly casts input values to `int' to evade the
`subscript has type char' warning, so it had been carefully not
letting me know! Found them all by compiling with a doctored
ctype.h, and hopefully fixed them all too.

[originally from svn r2927]
2003-03-11 09:30:31 +00:00
Simon Tatham f26b7aa0d3 Created new data types `Filename' and `FontSpec', intended to be
opaque to all platform-independent modules and only handled within
per-platform code. `Filename' is there because the Mac has a magic
way to store filenames (though currently this checkin doesn't
support it!); `FontSpec' is there so that all the auxiliary stuff
such as font height and charset and so on which is needed under
Windows but not Unix can be kept where it belongs, and so that I can
have a hope in hell of dealing with a font chooser in the forthcoming
cross-platform config box code, and best of all it gets the horrid
font height wart out of settings.c and into the Windows code where
it should be.
The Mac part of this checkin is a bunch of random guesses which will
probably not quite compile, but which look roughly right to me.
Sorry if I screwed it up, Ben :-)

[originally from svn r2765]
2003-02-01 12:54:40 +00:00
Simon Tatham f6cc852c5d Miscellaneous fixes to finish up `remove-statics'. rlogin.c had a
holdout static I hadn't noticed; unicode.c had one too; and a large
number of statics that were perfectly OK due to being constants have
been made `const', with assorted `const' repercussions all over the
place. I now declare `remove-statics' to be fixed.

[originally from svn r2594]
2003-01-14 18:43:45 +00:00
Simon Tatham a1125a8052 Improve robustness in random seed file handling.
[originally from svn r2200]
2002-11-07 20:01:04 +00:00
Simon Tatham 53eb272766 Improve the noise collection for the internal random pool.
[originally from svn r2182]
2002-11-02 15:23:20 +00:00
Simon Tatham 317180ed49 First attempt at a Unix port of Plink. Seems to basically work;
doesn't yet use the SSH agent, no way to specify arbitrary config
options, no manpage yet, couple of other fiddly things need doing,
but it makes SSH connections and doesn't fall over horribly so I say
it's a good start. Now to run it under valgrind...

[originally from svn r2165]
2002-10-31 19:49:52 +00:00
Simon Tatham 3c6a770e9f Add the -xrm command-line option, to allow specification of an
arbitrary X resource which doesn't have a dedicated command-line
option.

[originally from svn r2089]
2002-10-16 22:54:58 +00:00
Simon Tatham 1f2ee65ae9 Implement reading of X resources, and -name to change the name under
which to look them up.

[originally from svn r2084]
2002-10-16 14:32:06 +00:00
Simon Tatham 6d0e9b205d First phase of porting. pterm now compiles and runs under Linux+gtk.
The current pty.c backend is temporarily a loopback device for
terminal emulator testing, the display handling is only just enough
to show that terminal.c is functioning, the keyboard handling is
laughable, and most features are absent. Next step: bring output and
input up to a plausibly working state, and put a real pty on the
back to create a vaguely usable prototype. Oh, and a scrollbar would
be nice too.
In _theory_ the Windows builds should still work fine after this...

[originally from svn r2010]
2002-10-09 18:09:42 +00:00