1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-01 03:02:49 -05:00

Update source file names in comments and docs.

Correcting a source file name in the docs just now reminded me that
I've seen a lot of outdated source file names elsewhere in the code,
due to all the reorganisation since we moved to cmake. Here's a giant
pass of trying to make them all accurate again.
This commit is contained in:
Simon Tatham 2022-01-22 15:38:53 +00:00
parent 81391e3f23
commit 5935c68288
68 changed files with 196 additions and 196 deletions

View File

@ -1,5 +1,5 @@
/* /*
* local.c - translate our internal character set codes to and from * localenc.c - translate our internal character set codes to and from
* our own set of plausibly legible character-set names. Also * our own set of plausibly legible character-set names. Also
* provides a canonical name for each encoding (useful for software * provides a canonical name for each encoding (useful for software
* announcing what character set it will be using), and a set of * announcing what character set it will be using), and a set of

View File

@ -1,4 +1,4 @@
# Pure cmake script to write out cmake_commit.h # Pure cmake script to write out cmake_commit.c and cmake_version.but
set(DEFAULT_COMMIT "unavailable") set(DEFAULT_COMMIT "unavailable")
set(commit "${DEFAULT_COMMIT}") set(commit "${DEFAULT_COMMIT}")
@ -40,7 +40,7 @@ endif()
if(OUTPUT_TYPE STREQUAL header) if(OUTPUT_TYPE STREQUAL header)
file(WRITE "${OUTPUT_FILE}" "\ file(WRITE "${OUTPUT_FILE}" "\
/* /*
* cmake_commit.h - string literal giving the source git commit, if known. * cmake_commit.c - string literal giving the source git commit, if known.
* *
* Generated by cmake/gitcommit.cmake. * Generated by cmake/gitcommit.cmake.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Header file shared between sshblowf.c and sshbcrypt.c. Exposes the * Header file shared between blowfish.c and bcrypt.c. Exposes the
* internal Blowfish routines needed by bcrypt. * internal Blowfish routines needed by bcrypt.
*/ */

View File

@ -548,8 +548,8 @@ static EdwardsPoint *eddsa_decode(ptrlen encoded, const struct ec_curve *curve)
mp_free(y); mp_free(y);
/* A point constructed in this way will always satisfy the curve /* A point constructed in this way will always satisfy the curve
* equation, unless ecc.c wasn't able to construct one at all, in * equation, unless ecc-arithmetic.c wasn't able to construct one
* which case P is now NULL. Either way, return it. */ * at all, in which case P is now NULL. Either way, return it. */
return P; return P;
} }

View File

@ -266,7 +266,7 @@
#endif /* DEFINE_BIGNUMDBLINT */ #endif /* DEFINE_BIGNUMDBLINT */
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
* Data structures used inside bignum.c. * Data structures used inside mpint.c.
*/ */
struct mp_int { struct mp_int {

View File

@ -325,7 +325,8 @@ unfinished.
If any OS X and/or GTK programming experts are keen to have a finished If any OS X and/or GTK programming experts are keen to have a finished
version of this, we urge them to help out with some of the remaining version of this, we urge them to help out with some of the remaining
problems! See the TODO list in \c{unix/gtkapp.c} in the source code. problems! See the TODO list in \c{unix/main-gtk-application.c} in the
source code.
\S{faq-epoc}{Question} Will there be a port to EPOC? \S{faq-epoc}{Question} Will there be a port to EPOC?

17
misc.h
View File

@ -1,5 +1,6 @@
/* /*
* Header for misc.c. * Header for miscellaneous helper functions, mostly defined in the
* utils subdirectory.
*/ */
#ifndef PUTTY_MISC_H #ifndef PUTTY_MISC_H
@ -33,7 +34,7 @@ void burnstr(char *string);
/* /*
* The visible part of a strbuf structure. There's a surrounding * The visible part of a strbuf structure. There's a surrounding
* implementation struct in misc.c, which isn't exposed to client * implementation struct in strbuf.c, which isn't exposed to client
* code. * code.
*/ */
struct strbuf { struct strbuf {
@ -63,11 +64,7 @@ strbuf *strbuf_new_for_agent_query(void);
void strbuf_finalise_agent_query(strbuf *buf); void strbuf_finalise_agent_query(strbuf *buf);
/* String-to-Unicode converters that auto-allocate the destination and /* String-to-Unicode converters that auto-allocate the destination and
* work around the rather deficient interface of mb_to_wc. * work around the rather deficient interface of mb_to_wc. */
*
* These actually live in miscucs.c, not misc.c (the distinction being
* that the former is only linked into tools that also have the main
* Unicode support). */
wchar_t *dup_mb_to_wc_c(int codepage, int flags, const char *string, int len); wchar_t *dup_mb_to_wc_c(int codepage, int flags, const char *string, int len);
wchar_t *dup_mb_to_wc(int codepage, int flags, const char *string); wchar_t *dup_mb_to_wc(int codepage, int flags, const char *string);
@ -132,9 +129,9 @@ static inline void bufchain_set_callback(bufchain *ch, IdempotentCallback *ic)
{ {
extern void queue_idempotent_callback(struct IdempotentCallback *ic); extern void queue_idempotent_callback(struct IdempotentCallback *ic);
/* Wrapper that puts in the standard queue_idempotent_callback /* Wrapper that puts in the standard queue_idempotent_callback
* function. Lives here rather than in utils.c so that standalone * function. Lives here rather than in bufchain.c so that
* programs can use the bufchain facility without this optional * standalone programs can use the bufchain facility without this
* callback feature and not need to provide a stub of * optional callback feature and not need to provide a stub of
* queue_idempotent_callback. */ * queue_idempotent_callback. */
bufchain_set_callback_inner(ch, ic, queue_idempotent_callback); bufchain_set_callback_inner(ch, ic, queue_idempotent_callback);
} }

View File

@ -428,10 +428,10 @@ mp_int *mp_rshift_fixed(mp_int *x, size_t shift);
* *
* The _function_ definitions here will expect to be given a gen_data * The _function_ definitions here will expect to be given a gen_data
* function that provides random data. Normally you'd use this using * function that provides random data. Normally you'd use this using
* random_read() from random.c, and the macro wrappers automate that. * random_read() from sshrand.c, and the macro wrappers automate that.
* *
* (This is a bit of a dodge to avoid mpint.c having a link-time * (This is a bit of a dodge to avoid mpint.c having a link-time
* dependency on random.c, so that programs can link against one but * dependency on sshrand.c, so that programs can link against one but
* not the other: if a client of this header uses one of these macros * not the other: if a client of this header uses one of these macros
* then _they_ have link-time dependencies on both modules.) * then _they_ have link-time dependencies on both modules.)
* *

View File

@ -302,7 +302,7 @@ static inline SocketPeerInfo *sk_peer_info(Socket *s)
/* /*
* The structure returned from sk_peer_info, and a function to free * The structure returned from sk_peer_info, and a function to free
* one (in misc.c). * one (in utils).
*/ */
struct SocketPeerInfo { struct SocketPeerInfo {
int addressfamily; int addressfamily;
@ -340,7 +340,7 @@ struct SocketPeerInfo {
void sk_free_peer_info(SocketPeerInfo *pi); void sk_free_peer_info(SocketPeerInfo *pi);
/* /*
* Simple wrapper on getservbyname(), needed by ssh.c. Returns the * Simple wrapper on getservbyname(), needed by portfwd.c. Returns the
* port number, in host byte order (suitable for printf and so on). * port number, in host byte order (suitable for printf and so on).
* Returns 0 on failure. Any platform not supporting getservbyname * Returns 0 on failure. Any platform not supporting getservbyname
* can just return 0 - this function is not required to handle * can just return 0 - this function is not required to handle

2
pscp.c
View File

@ -1,5 +1,5 @@
/* /*
* scp.c - Scp (Secure Copy) client for PuTTY. * pscp.c - Scp (Secure Copy) client for PuTTY.
* Joris van Rantwijk, Simon Tatham * Joris van Rantwijk, Simon Tatham
* *
* This is mainly based on ssh-1.2.26/scp.c by Timo Rinne & Tatu Ylonen. * This is mainly based on ssh-1.2.26/scp.c by Timo Rinne & Tatu Ylonen.

30
putty.h
View File

@ -1450,7 +1450,7 @@ static inline bool seat_get_cursor_position(Seat *seat, int *x, int *y)
/* Unlike the seat's actual method, the public entry point /* Unlike the seat's actual method, the public entry point
* seat_connection_fatal is a wrapper function with a printf-like API, * seat_connection_fatal is a wrapper function with a printf-like API,
* defined in misc.c. */ * defined in utils. */
void seat_connection_fatal(Seat *seat, const char *fmt, ...) PRINTF_LIKE(2, 3); void seat_connection_fatal(Seat *seat, const char *fmt, ...) PRINTF_LIKE(2, 3);
/* Handy aliases for seat_output which set is_stderr to a fixed value. */ /* Handy aliases for seat_output which set is_stderr to a fixed value. */
@ -1523,7 +1523,7 @@ bool nullseat_get_cursor_position(Seat *seat, int *x, int *y);
/* /*
* Seat functions provided by the platform's console-application * Seat functions provided by the platform's console-application
* support module (wincons.c, uxcons.c). * support module (console.c in each platform subdirectory).
*/ */
void console_connection_fatal(Seat *seat, const char *message); void console_connection_fatal(Seat *seat, const char *message);
@ -2049,7 +2049,7 @@ void fontspec_serialise(BinarySink *bs, FontSpec *f);
FontSpec *fontspec_deserialise(BinarySource *src); FontSpec *fontspec_deserialise(BinarySource *src);
/* /*
* Exports from noise.c. * Exports from each platform's noise.c.
*/ */
typedef enum NoiseSourceId { typedef enum NoiseSourceId {
NOISE_SOURCE_TIME, NOISE_SOURCE_TIME,
@ -2075,6 +2075,10 @@ void noise_get_heavy(void (*func) (void *, int));
void noise_get_light(void (*func) (void *, int)); void noise_get_light(void (*func) (void *, int));
void noise_regular(void); void noise_regular(void);
void noise_ultralight(NoiseSourceId id, unsigned long data); void noise_ultralight(NoiseSourceId id, unsigned long data);
/*
* Exports from sshrand.c.
*/
void random_save_seed(void); void random_save_seed(void);
void random_destroy_seed(void); void random_destroy_seed(void);
@ -2234,7 +2238,7 @@ static inline void lp_logging_error(LogPolicy *lp, const char *event)
static inline bool lp_verbose(LogPolicy *lp) static inline bool lp_verbose(LogPolicy *lp)
{ return lp->vt->verbose(lp); } { return lp->vt->verbose(lp); }
/* Defined in conscli.c, used in several console command-line tools */ /* Defined in clicons.c, used in several console command-line tools */
extern LogPolicy console_cli_logpolicy[]; extern LogPolicy console_cli_logpolicy[];
int console_askappend(LogPolicy *lp, Filename *filename, int console_askappend(LogPolicy *lp, Filename *filename,
@ -2387,7 +2391,7 @@ void pinger_reconfig(Pinger *, Conf *oldconf, Conf *newconf);
void pinger_free(Pinger *); void pinger_free(Pinger *);
/* /*
* Exports from misc.c. * Exports from modules in utils.
*/ */
#include "misc.h" #include "misc.h"
@ -2400,13 +2404,13 @@ char const *conf_dest(Conf *conf);
void prepare_session(Conf *conf); void prepare_session(Conf *conf);
/* /*
* Exports from version.c. * Exports from version.c and cmake_commit.c.
*/ */
extern const char ver[]; extern const char ver[];
extern const char commitid[]; extern const char commitid[];
/* /*
* Exports from unicode.c. * Exports from unicode.c in platform subdirs.
*/ */
#ifndef CP_UTF8 #ifndef CP_UTF8
#define CP_UTF8 65001 #define CP_UTF8 65001
@ -2434,7 +2438,7 @@ int mk_wcwidth_cjk(unsigned int ucs);
int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n); int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n);
/* /*
* Exports from pageantc.c. * Exports from agent-client.c in platform subdirs.
* *
* agent_query returns NULL for here's-a-response, and non-NULL for * agent_query returns NULL for here's-a-response, and non-NULL for
* query-in- progress. In the latter case there will be a call to * query-in- progress. In the latter case there will be a call to
@ -2453,8 +2457,8 @@ int mk_wcswidth_cjk(const unsigned int *pwcs, size_t n);
* *
* Passing a null pointer as callback forces agent_query to behave * Passing a null pointer as callback forces agent_query to behave
* synchronously, i.e. it will block if necessary, and guarantee to * synchronously, i.e. it will block if necessary, and guarantee to
* return NULL. The wrapper function agent_query_synchronous() makes * return NULL. The wrapper function agent_query_synchronous()
* this easier. * (defined in its own module aqsync.c) makes this easier.
*/ */
typedef struct agent_pending_query agent_pending_query; typedef struct agent_pending_query agent_pending_query;
agent_pending_query *agent_query( agent_pending_query *agent_query(
@ -2476,7 +2480,7 @@ int wc_match(const char *wildcard, const char *target);
bool wc_unescape(char *output, const char *wildcard); bool wc_unescape(char *output, const char *wildcard);
/* /*
* Exports from frontend (windlg.c etc) * Exports from frontend (dialog.c etc)
*/ */
void pgp_fingerprints(void); void pgp_fingerprints(void);
/* /*
@ -2486,7 +2490,7 @@ void pgp_fingerprints(void);
bool have_ssh_host_key(const char *host, int port, const char *keytype); bool have_ssh_host_key(const char *host, int port, const char *keytype);
/* /*
* Exports from console frontends (wincons.c, uxcons.c) * Exports from console frontends (console.c in platform subdirs)
* that aren't equivalents to things in windlg.c et al. * that aren't equivalents to things in windlg.c et al.
*/ */
extern bool console_batch_mode, console_antispoof_prompt; extern bool console_batch_mode, console_antispoof_prompt;
@ -2499,7 +2503,7 @@ void console_print_error_msg_fmt(const char *prefix, const char *fmt, ...)
PRINTF_LIKE(2, 3); PRINTF_LIKE(2, 3);
/* /*
* Exports from printing.c. * Exports from printing.c in platform subdirs.
*/ */
typedef struct printer_enum_tag printer_enum; typedef struct printer_enum_tag printer_enum;
typedef struct printer_job_tag printer_job; typedef struct printer_job_tag printer_job;

View File

@ -107,18 +107,19 @@ void *safegrowarray(void *array, size_t *size, size_t eltsize,
/* /*
* This function is called by the innermost safemalloc/saferealloc * This function is called by the innermost safemalloc/saferealloc
* functions when allocation fails. Usually it's provided by misc.c * functions when allocation fails. Usually it's provided by an
* which ties it into an application's existing modalfatalbox() * implementation in utils, which ties it into an application's
* system, but standalone test applications can reimplement it some * existing modalfatalbox() system, but standalone test applications
* other way if they prefer. * can reimplement it some other way if they prefer.
*/ */
NORETURN void out_of_memory(void); NORETURN void out_of_memory(void);
#ifdef MINEFIELD #ifdef MINEFIELD
/* /*
* Definitions for Minefield, PuTTY's own Windows-specific malloc * Definitions for Minefield, PuTTY's own Windows-specific malloc
* debugger in the style of Electric Fence. Implemented in winmisc.c, * debugger in the style of Electric Fence. Implemented in
* and referred to by the main malloc wrappers in memory.c. * windows/utils/minefield.c, and referred to by the main malloc
* wrappers in memory.c.
*/ */
void *minefield_c_malloc(size_t size); void *minefield_c_malloc(size_t size);
void minefield_c_free(void *p); void minefield_c_free(void *p);

View File

@ -49,9 +49,9 @@ static const struct keyvalwhere hknames[] = {
/* /*
* All the terminal modes that we know about for the "TerminalModes" * All the terminal modes that we know about for the "TerminalModes"
* setting. (Also used by config.c for the drop-down list.) * setting. (Also used by config.c for the drop-down list.)
* This is currently precisely the same as the set in ssh.c, but could * This is currently precisely the same as the set in
* in principle differ if other backends started to support tty modes * ssh/ttymode-list.h, but could in principle differ if other backends
* (e.g., the pty backend). * started to support tty modes (e.g., the pty backend).
* The set of modes in in this array is currently significant for * The set of modes in in this array is currently significant for
* settings migration from old versions; if they change, review the * settings migration from old versions; if they change, review the
* gppmap() invocation for "TerminalModes". * gppmap() invocation for "TerminalModes".

18
ssh.h
View File

@ -735,7 +735,7 @@ static inline const char *ssh2_mac_text_name(ssh2_mac *m)
static inline const ssh2_macalg *ssh2_mac_alg(ssh2_mac *m) static inline const ssh2_macalg *ssh2_mac_alg(ssh2_mac *m)
{ return m->vt; } { return m->vt; }
/* Centralised 'methods' for ssh2_mac, defined in sshmac.c. These run /* Centralised 'methods' for ssh2_mac, defined in mac.c. These run
* the MAC in a specifically SSH-2 style, i.e. taking account of a * the MAC in a specifically SSH-2 style, i.e. taking account of a
* packet sequence number as well as the data to be authenticated. */ * packet sequence number as well as the data to be authenticated. */
bool ssh2_mac_verresult(ssh2_mac *, const void *); bool ssh2_mac_verresult(ssh2_mac *, const void *);
@ -1075,13 +1075,13 @@ extern const char sshver[];
/* /*
* Gross hack: pscp will try to start SFTP but fall back to scp1 if * Gross hack: pscp will try to start SFTP but fall back to scp1 if
* that fails. This variable is the means by which scp.c can reach * that fails. This variable is the means by which pscp.c can reach
* into the SSH code and find out which one it got. * into the SSH code and find out which one it got.
*/ */
extern bool ssh_fallback_cmd(Backend *backend); extern bool ssh_fallback_cmd(Backend *backend);
/* /*
* The PRNG type, defined in sshprng.c. Visible data fields are * The PRNG type, defined in prng.c. Visible data fields are
* 'savesize', which suggests how many random bytes you should request * 'savesize', which suggests how many random bytes you should request
* from a particular PRNG instance to write to putty.rnd, and a * from a particular PRNG instance to write to putty.rnd, and a
* BinarySink implementation which you can use to write seed data in * BinarySink implementation which you can use to write seed data in
@ -1090,7 +1090,7 @@ extern bool ssh_fallback_cmd(Backend *backend);
struct prng { struct prng {
size_t savesize; size_t savesize;
BinarySink_IMPLEMENTATION; BinarySink_IMPLEMENTATION;
/* (also there's a surrounding implementation struct in sshprng.c) */ /* (also there's a surrounding implementation struct in prng.c) */
}; };
prng *prng_new(const ssh_hashalg *hashalg); prng *prng_new(const ssh_hashalg *hashalg);
void prng_free(prng *p); void prng_free(prng *p);
@ -1161,10 +1161,6 @@ struct X11FakeAuth {
ssh_sharing_connstate *share_cs; ssh_sharing_connstate *share_cs;
share_channel *share_chan; share_channel *share_chan;
}; };
void *x11_make_greeting(int endian, int protomajor, int protominor,
int auth_proto, const void *auth_data, int auth_len,
const char *peer_ip, int peer_port,
int *outlen);
int x11_authcmp(void *av, void *bv); /* for putting X11FakeAuth in a tree234 */ int x11_authcmp(void *av, void *bv); /* for putting X11FakeAuth in a tree234 */
/* /*
* x11_setup_display() parses the display variable and fills in an * x11_setup_display() parses the display variable and fills in an
@ -1194,7 +1190,7 @@ SockAddr *platform_get_x11_unix_address(const char *path, int displaynum);
/* make up a SockAddr naming the address for displaynum */ /* make up a SockAddr naming the address for displaynum */
char *platform_get_x_display(void); char *platform_get_x_display(void);
/* allocated local X display string, if any */ /* allocated local X display string, if any */
/* Callbacks in x11.c usable _by_ platform X11 functions */ /* X11-related helper functions in utils */
/* /*
* This function does the job of platform_get_x11_auth, provided * This function does the job of platform_get_x11_auth, provided
* it is told where to find a normally formatted .Xauthority file: * it is told where to find a normally formatted .Xauthority file:
@ -1213,6 +1209,10 @@ void x11_get_auth_from_authfile(struct X11Display *display,
void x11_format_auth_for_authfile( void x11_format_auth_for_authfile(
BinarySink *bs, SockAddr *addr, int display_no, BinarySink *bs, SockAddr *addr, int display_no,
ptrlen authproto, ptrlen authdata); ptrlen authproto, ptrlen authdata);
void *x11_make_greeting(int endian, int protomajor, int protominor,
int auth_proto, const void *auth_data, int auth_len,
const char *peer_ip, int peer_port,
int *outlen);
int x11_identify_auth_proto(ptrlen protoname); int x11_identify_auth_proto(ptrlen protoname);
void *x11_dehexify(ptrlen hex, int *outlen); void *x11_dehexify(ptrlen hex, int *outlen);
bool x11_parse_ip(const char *addr_string, unsigned long *ip); bool x11_parse_ip(const char *addr_string, unsigned long *ip);

View File

@ -32,7 +32,7 @@ typedef gss_name_t Ssh_gss_name;
#define GSS_DEF_REKEY_MINS 2 /* Default minutes between GSS cache checks */ #define GSS_DEF_REKEY_MINS 2 /* Default minutes between GSS cache checks */
/* Functions, provided by either wingss.c or gssc.c */ /* Functions, provided by either {windows,unix}/gss.c or gssc.c */
struct ssh_gss_library; struct ssh_gss_library;

View File

@ -137,7 +137,7 @@ int platform_make_x11_server(Plug *plug, const char *progname, int mindisp,
Conf *make_ssh_server_conf(void); Conf *make_ssh_server_conf(void);
/* Provided by Unix front end programs to uxsftpserver.c */ /* Provided by Unix front end programs to unix/sftpserver.c */
void make_unix_sftp_filehandle_key(void *data, size_t size); void make_unix_sftp_filehandle_key(void *data, size_t size);
typedef struct agentfwd agentfwd; typedef struct agentfwd agentfwd;

View File

@ -230,7 +230,7 @@ Channel *sesschan_new(SshChannel *c, LogContext *logctx,
sess->conf = conf_new(); sess->conf = conf_new();
load_open_settings(NULL, sess->conf); load_open_settings(NULL, sess->conf);
/* Set close-on-exit = true to suppress uxpty.c's "[pterm: process /* Set close-on-exit = true to suppress pty.c's "[pterm: process
* terminated with status x]" message */ * terminated with status x]" message */
conf_set_int(sess->conf, CONF_close_on_exit, FORCE_ON); conf_set_int(sess->conf, CONF_close_on_exit, FORCE_ON);
@ -303,7 +303,7 @@ static void sesschan_start_backend(sesschan *sess, const char *cmd)
* will be set as part of X or agent forwarding, and shouldn't be * will be set as part of X or agent forwarding, and shouldn't be
* confusingly set in the absence of that. * confusingly set in the absence of that.
* *
* (DISPLAY must also be cleared, but uxpty.c will do that anyway * (DISPLAY must also be cleared, but pty.c will do that anyway
* when our get_x_display method returns NULL.) * when our get_x_display method returns NULL.)
*/ */
static const char *const env_to_unset[] = { static const char *const env_to_unset[] = {
@ -560,7 +560,7 @@ bool sesschan_send_break(Channel *chan, unsigned length)
if (sess->backend) { if (sess->backend) {
/* We ignore the break length. We could pass it through as the /* We ignore the break length. We could pass it through as the
* 'arg' parameter, and have uxpty.c collect it and pass it on * 'arg' parameter, and have pty.c collect it and pass it on
* to tcsendbreak, but since tcsendbreak in turn assigns * to tcsendbreak, but since tcsendbreak in turn assigns
* implementation-defined semantics to _its_ duration * implementation-defined semantics to _its_ duration
* parameter, this all just sounds too difficult. */ * parameter, this all just sounds too difficult. */

View File

@ -1177,7 +1177,7 @@ void share_got_pkt_from_server(ssh_sharing_connstate *cs, int type,
case SSH2_MSG_REQUEST_SUCCESS: case SSH2_MSG_REQUEST_SUCCESS:
case SSH2_MSG_REQUEST_FAILURE: case SSH2_MSG_REQUEST_FAILURE:
globreq = cs->globreq_head; globreq = cs->globreq_head;
assert(globreq); /* should match the queue in ssh.c */ assert(globreq); /* should match the queue in connection2.c */
if (globreq->type == GLOBREQ_TCPIP_FORWARD) { if (globreq->type == GLOBREQ_TCPIP_FORWARD) {
if (type == SSH2_MSG_REQUEST_FAILURE) { if (type == SSH2_MSG_REQUEST_FAILURE) {
share_remove_forwarding(cs, globreq->fwd); share_remove_forwarding(cs, globreq->fwd);
@ -1289,7 +1289,8 @@ void share_got_pkt_from_server(ssh_sharing_connstate *cs, int type,
break; break;
default: default:
unreachable("This packet type should never have come from ssh.c"); unreachable("This packet type should never have come from "
"connection2.c");
} }
} }
@ -1356,12 +1357,12 @@ static void share_got_pkt_from_downstream(struct ssh_sharing_connstate *cs,
host = mkstr(hostpl); host = mkstr(hostpl);
/* /*
* See if we can allocate space in ssh.c's tree of remote * See if we can allocate space in the connection layer's
* port forwardings. If we can't, it's because another * tree of remote port forwardings. If we can't, it's
* client sharing this connection has already allocated * because another client sharing this connection has
* the identical port forwarding, so we take it on * already allocated the identical port forwarding, so we
* ourselves to manufacture a failure packet and send it * take it on ourselves to manufacture a failure packet
* back to downstream. * and send it back to downstream.
*/ */
rpf = ssh_rportfwd_alloc( rpf = ssh_rportfwd_alloc(
cs->parent->cl, host, port, NULL, 0, 0, NULL, NULL, cs); cs->parent->cl, host, port, NULL, 0, 0, NULL, NULL, cs);
@ -1430,8 +1431,8 @@ static void share_got_pkt_from_downstream(struct ssh_sharing_connstate *cs,
} }
} else { } else {
/* /*
* Tell ssh.c to stop sending us channel-opens for * Tell the connection layer to stop sending us
* this forwarding. * channel-opens for this forwarding.
*/ */
ssh_rportfwd_remove(cs->parent->cl, fwd->rpf); ssh_rportfwd_remove(cs->parent->cl, fwd->rpf);
@ -1872,8 +1873,8 @@ void share_activate(ssh_sharing_state *sharestate,
const char *server_verstring) const char *server_verstring)
{ {
/* /*
* Indication from ssh.c that we are now ready to begin serving * Indication from connection layer that we are now ready to begin
* any downstreams that have already connected to us. * serving any downstreams that have already connected to us.
*/ */
struct ssh_sharing_connstate *cs; struct ssh_sharing_connstate *cs;
int i; int i;

View File

@ -1246,7 +1246,7 @@ static int ssh_cfg_info(Backend *be)
/* /*
* Gross hack: pscp will try to start SFTP but fall back to scp1 if * Gross hack: pscp will try to start SFTP but fall back to scp1 if
* that fails. This variable is the means by which scp.c can reach * that fails. This variable is the means by which pscp.c can reach
* into the SSH code and find out which one it got. * into the SSH code and find out which one it got.
*/ */
extern bool ssh_fallback_cmd(Backend *be) extern bool ssh_fallback_cmd(Backend *be)

View File

@ -18,7 +18,6 @@
* Edit and Continue debugging feature causes their compiler to * Edit and Continue debugging feature causes their compiler to
* violate ANSI C. To disable Edit and Continue debugging: * violate ANSI C. To disable Edit and Continue debugging:
* *
* - right-click ssh.c in the FileView
* - click Settings * - click Settings
* - select the C/C++ tab and the General category * - select the C/C++ tab and the General category
* - under `Debug info:', select anything _other_ than `Program * - under `Debug info:', select anything _other_ than `Program

View File

@ -132,7 +132,7 @@ void nonfatal(const char *fmt, ...) { }
/* needed by timing.c */ /* needed by timing.c */
void timer_change_notify(unsigned long next) { } void timer_change_notify(unsigned long next) { }
/* needed by config.c and sercfg.c */ /* needed by config.c */
void dlg_radiobutton_set(union control *ctrl, dlgparam *dp, int whichbutton) { } void dlg_radiobutton_set(union control *ctrl, dlgparam *dp, int whichbutton) { }
int dlg_radiobutton_get(union control *ctrl, dlgparam *dp) { return 0; } int dlg_radiobutton_get(union control *ctrl, dlgparam *dp) { return 0; }

View File

@ -1,5 +1,5 @@
/* /*
* gtkcols.c - implementation of the `Columns' GTK layout container. * columns.c - implementation of the `Columns' GTK layout container.
*/ */
#include <assert.h> #include <assert.h>

View File

@ -1,5 +1,5 @@
/* /*
* gtkcfg.c - the GTK-specific parts of the PuTTY configuration * config-gtk.c - the GTK-specific parts of the PuTTY configuration
* box. * box.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* uxcfg.c - the Unix-specific parts of the PuTTY configuration * config-unix.c - the Unix-specific parts of the PuTTY configuration
* box. * box.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* uxcons.c: various interactive-prompt routines shared between the * unix/console.c: various interactive-prompt routines shared between
* Unix console PuTTY tools * the Unix console PuTTY tools
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,5 +1,5 @@
/* /*
* gtkdlg.c - GTK implementation of the PuTTY configuration box. * dialog.c - GTK implementation of the PuTTY configuration box.
*/ */
#include <assert.h> #include <assert.h>
@ -1787,7 +1787,7 @@ static void filefont_clicked(GtkButton *button, gpointer data)
#else /* !GTK_CHECK_VERSION(2,0,0) */ #else /* !GTK_CHECK_VERSION(2,0,0) */
/* /*
* Use the unifontsel code provided in gtkfont.c. * Use the unifontsel code provided in unifont.c.
*/ */
unifontsel *fontsel = unifontsel_new("Select a font"); unifontsel *fontsel = unifontsel_new("Select a font");

View File

@ -1,5 +1,5 @@
/* /*
* uxfdsock.c: implementation of Socket that just talks to two * fd-socket.c: implementation of Socket that just talks to two
* existing input and output file descriptors. * existing input and output file descriptors.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* gtkcomm.c: machinery in the GTK front end which is common to all * gtk-common.c: machinery in the GTK front end which is common to all
* programs that run a session in a terminal window, and also common * programs that run a session in a terminal window, and also common
* across all _sessions_ rather than specific to one session. (Timers, * across all _sessions_ rather than specific to one session. (Timers,
* uxsel etc.) * uxsel etc.)

View File

@ -1,5 +1,5 @@
/* /*
* uxgen.c: Unix implementation of get_heavy_noise() from cmdgen.c. * keygen-noise.c: Unix implementation of get_heavy_noise() from cmdgen.c.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,5 +1,5 @@
/* /*
* uxproxy.c: Unix implementation of platform_new_connection(), * local-proxy.c: Unix implementation of platform_new_connection(),
* supporting an OpenSSH-like proxy command. * supporting an OpenSSH-like proxy command.
*/ */

View File

@ -1,6 +1,7 @@
/* /*
* gtkapp.c: a top-level front end to GUI PuTTY and pterm, using * main-gtk-application.c: a top-level front end to GUI PuTTY and
* GtkApplication. Suitable for OS X. Currently unfinished. * pterm, using GtkApplication. Suitable for OS X. Currently
* unfinished.
* *
* (You could run it on ordinary Linux GTK too, in principle, but I * (You could run it on ordinary Linux GTK too, in principle, but I
* don't think it would be particularly useful to do so, even once * don't think it would be particularly useful to do so, even once

View File

@ -1,7 +1,7 @@
/* /*
* gtkmain.c: the common main-program code between the straight-up * main-gtk-simple.c: the common main-program code between the
* Unix PuTTY and pterm, which they do not share with the * straight-up Unix PuTTY and pterm, which they do not share with the
* multi-session gtkapp.c. * multi-session main-gtk-application.c.
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE

View File

@ -1,5 +1,5 @@
/* /*
* uxnogtk.c: link into non-GUI Unix programs so that they can tell * no-gtk.c: link into non-GUI Unix programs so that they can tell
* buildinfo about a lack of GTK. * buildinfo about a lack of GTK.
*/ */

View File

@ -90,7 +90,7 @@ static int make_pipe_to_askpass(const char *msg)
cloexec(pipefds[1]); cloexec(pipefds[1]);
/* /*
* See comment in fork_and_exec_self() in gtkmain.c. * See comment in fork_and_exec_self() in main-gtk-simple.c.
*/ */
execv("/proc/self/exe", (char **)args); execv("/proc/self/exe", (char **)args);
execvp(progname, (char **)args); execvp(progname, (char **)args);

View File

@ -143,7 +143,7 @@ unsigned long getticks(void);
#define NAMED_CLIPBOARDS #define NAMED_CLIPBOARDS
#endif #endif
/* The per-session frontend structure managed by gtkwin.c */ /* The per-session frontend structure managed by window.c */
typedef struct GtkFrontend GtkFrontend; typedef struct GtkFrontend GtkFrontend;
/* Callback when a dialog box finishes, and a no-op implementation of it */ /* Callback when a dialog box finishes, and a no-op implementation of it */
@ -154,7 +154,7 @@ void trivial_post_dialog_fn(void *vctx, int result);
void initial_config_box(Conf *conf, post_dialog_fn_t after, void *afterctx); void initial_config_box(Conf *conf, post_dialog_fn_t after, void *afterctx);
void new_session_window(Conf *conf, const char *geometry_string); void new_session_window(Conf *conf, const char *geometry_string);
/* Defined in gtkmain.c */ /* Defined in main-gtk-*.c */
void launch_duplicate_session(Conf *conf); void launch_duplicate_session(Conf *conf);
void launch_new_session(void); void launch_new_session(void);
void launch_saved_session(const char *str); void launch_saved_session(const char *str);
@ -166,10 +166,11 @@ GtkWidget *make_gtk_toplevel_window(GtkFrontend *frontend);
const struct BackendVtable *select_backend(Conf *conf); const struct BackendVtable *select_backend(Conf *conf);
/* Defined in gtkcomm.c */ /* Defined in gtk-common.c */
void gtkcomm_setup(void); void gtkcomm_setup(void);
/* Used to pass application-menu operations from gtkapp.c to gtkwin.c */ /* Used to pass application-menu operations from
* main-gtk-application.c to window.c */
enum MenuAction { enum MenuAction {
MA_COPY, MA_PASTE, MA_COPY_ALL, MA_DUPLICATE_SESSION, MA_COPY, MA_PASTE, MA_COPY_ALL, MA_DUPLICATE_SESSION,
MA_RESTART_SESSION, MA_CHANGE_SETTINGS, MA_CLEAR_SCROLLBACK, MA_RESTART_SESSION, MA_CHANGE_SETTINGS, MA_CLEAR_SCROLLBACK,
@ -184,7 +185,7 @@ extern const char *const *const main_icon[];
extern const char *const *const cfg_icon[]; extern const char *const *const cfg_icon[];
extern const int n_main_icon, n_cfg_icon; extern const int n_main_icon, n_cfg_icon;
/* Things gtkdlg.c needs from gtkwin.c */ /* Things dialog.c needs from window.c */
#ifdef MAY_REFER_TO_GTK_IN_HEADERS #ifdef MAY_REFER_TO_GTK_IN_HEADERS
enum DialogSlot { enum DialogSlot {
DIALOG_SLOT_RECONFIGURE, DIALOG_SLOT_RECONFIGURE,
@ -202,7 +203,7 @@ void set_window_icon(GtkWidget *window, const char *const *const *icon,
extern GdkAtom compound_text_atom; extern GdkAtom compound_text_atom;
#endif #endif
/* Things gtkwin.c needs from gtkdlg.c */ /* Things window.c needs from dialog.c */
#ifdef MAY_REFER_TO_GTK_IN_HEADERS #ifdef MAY_REFER_TO_GTK_IN_HEADERS
GtkWidget *create_config_box(const char *title, Conf *conf, GtkWidget *create_config_box(const char *title, Conf *conf,
bool midsession, int protcfginfo, bool midsession, int protcfginfo,
@ -245,16 +246,16 @@ GtkWidget *create_message_box(
post_dialog_fn_t after, void *afterctx); post_dialog_fn_t after, void *afterctx);
#endif #endif
/* gtkwin.c needs this special function in xkeysym.c */ /* window.c needs this special function in utils */
int keysym_to_unicode(int keysym); int keysym_to_unicode(int keysym);
/* Things uxstore.c needs from gtkwin.c */ /* Things storage.c needs from window.c */
char *x_get_default(const char *key); char *x_get_default(const char *key);
/* Things uxstore.c provides to gtkwin.c */ /* Things storage.c provides to window.c */
void provide_xrm_string(const char *string, const char *progname); void provide_xrm_string(const char *string, const char *progname);
/* Function that {gtkapp,gtkmain}.c needs from ux{pterm,putty}.c. Does /* Function that main-gtk-*.c needs from {pterm,putty}.c. Does
* early process setup that varies between applications (e.g. * early process setup that varies between applications (e.g.
* pty_pre_init or sk_init), and is passed a boolean by the caller * pty_pre_init or sk_init), and is passed a boolean by the caller
* indicating whether this is an OS X style multi-session monolithic * indicating whether this is an OS X style multi-session monolithic
@ -283,12 +284,12 @@ extern const bool use_pty_argv;
* OS X environment munging: this is the prefix we expect to find on * OS X environment munging: this is the prefix we expect to find on
* environment variable names that were changed by osxlaunch. * environment variable names that were changed by osxlaunch.
* Extracted from the command line of the OS X pterm main binary, and * Extracted from the command line of the OS X pterm main binary, and
* used in uxpty.c to restore the original environment before * used in pty.c to restore the original environment before
* launching its subprocess. * launching its subprocess.
*/ */
extern char *pty_osx_envrestore_prefix; extern char *pty_osx_envrestore_prefix;
/* Things provided by uxcons.c */ /* Things provided by console.c */
struct termios; struct termios;
void stderr_tty_init(void); /* call at startup if stderr might be a tty */ void stderr_tty_init(void); /* call at startup if stderr might be a tty */
void premsg(struct termios *); void premsg(struct termios *);
@ -308,12 +309,12 @@ int next_fd(int *state, int *rwx);
uxsel_id *uxsel_input_add(int fd, int rwx); /* returns an id */ uxsel_id *uxsel_input_add(int fd, int rwx); /* returns an id */
void uxsel_input_remove(uxsel_id *id); void uxsel_input_remove(uxsel_id *id);
/* uxcfg.c */ /* config-unix.c */
struct controlbox; struct controlbox;
void unix_setup_config_box( void unix_setup_config_box(
struct controlbox *b, bool midsession, int protocol); struct controlbox *b, bool midsession, int protocol);
/* gtkcfg.c */ /* config-gtk.c */
void gtk_setup_config_box( void gtk_setup_config_box(
struct controlbox *b, bool midsession, void *window); struct controlbox *b, bool midsession, void *window);
@ -335,7 +336,7 @@ void gtk_setup_config_box(
void (*putty_signal(int sig, void (*func)(int)))(int); void (*putty_signal(int sig, void (*func)(int)))(int);
void block_signal(int sig, bool block_it); void block_signal(int sig, bool block_it);
/* uxmisc.c */ /* utils */
void cloexec(int); void cloexec(int);
void noncloexec(int); void noncloexec(int);
bool nonblock(int); bool nonblock(int);
@ -351,7 +352,7 @@ bool init_ucs(struct unicode_data *ucsdata, char *line_codepage,
bool utf8_override, int font_charset, int vtmode); bool utf8_override, int font_charset, int vtmode);
/* /*
* Spare functions exported directly from uxnet.c. * Spare functions exported directly from network.c.
*/ */
void *sk_getxdmdata(Socket *sock, int *lenp); void *sk_getxdmdata(Socket *sock, int *lenp);
int sk_net_get_fd(Socket *sock); int sk_net_get_fd(Socket *sock);
@ -368,17 +369,17 @@ Socket *new_unix_listener(SockAddr *listenaddr, Plug *plug);
} while (0) } while (0)
/* /*
* Exports from uxser.c. * Exports from serial.c.
*/ */
extern const struct BackendVtable serial_backend; extern const struct BackendVtable serial_backend;
/* /*
* uxpeer.c, wrapping getsockopt(SO_PEERCRED). * peerinfo.c, wrapping getsockopt(SO_PEERCRED).
*/ */
bool so_peercred(int fd, int *pid, int *uid, int *gid); bool so_peercred(int fd, int *pid, int *uid, int *gid);
/* /*
* uxfdsock.c. * fd-socket.c.
*/ */
Socket *make_fd_socket(int infd, int outfd, int inerrfd, Socket *make_fd_socket(int infd, int outfd, int inerrfd,
SockAddr *addr, int port, Plug *plug); SockAddr *addr, int port, Plug *plug);
@ -396,7 +397,7 @@ void setup_fd_socket(Socket *s, int infd, int outfd, int inerrfd);
#endif #endif
/* /*
* uxpty.c. * pty.c.
*/ */
void pty_pre_init(void); /* pty+utmp setup before dropping privilege */ void pty_pre_init(void); /* pty+utmp setup before dropping privilege */
/* Pass in the argv[] for an instance of the pty backend created by /* Pass in the argv[] for an instance of the pty backend created by
@ -406,7 +407,7 @@ void pty_pre_init(void); /* pty+utmp setup before dropping privilege */
extern char **pty_argv; extern char **pty_argv;
/* /*
* gtkask.c. * askpass.c.
*/ */
char *gtk_askpass_main(const char *display, const char *wintitle, char *gtk_askpass_main(const char *display, const char *wintitle,
const char *prompt, bool *success); const char *prompt, bool *success);
@ -422,12 +423,12 @@ static inline bool sk_peer_trusted(Socket *sock)
} }
/* /*
* uxsftpserver.c. * sftpserver.c.
*/ */
extern const SftpServerVtable unix_live_sftpserver_vt; extern const SftpServerVtable unix_live_sftpserver_vt;
/* /*
* uxpoll.c. * utils/pollwrap.c.
*/ */
typedef struct pollwrapper pollwrapper; typedef struct pollwrapper pollwrapper;
pollwrapper *pollwrap_new(void); pollwrapper *pollwrap_new(void);
@ -446,7 +447,7 @@ static inline bool pollwrap_check_fd_rwx(pollwrapper *pw, int fd, int rwx)
} }
/* /*
* uxcliloop.c. * cliloop.c.
*/ */
typedef bool (*cliloop_pw_setup_t)(void *ctx, pollwrapper *pw); typedef bool (*cliloop_pw_setup_t)(void *ctx, pollwrapper *pw);
typedef void (*cliloop_pw_check_t)(void *ctx, pollwrapper *pw); typedef void (*cliloop_pw_check_t)(void *ctx, pollwrapper *pw);

View File

@ -745,7 +745,7 @@ int main(int argc, char **argv)
--argc; --argc;
/* Explicitly pass "plink" in place of appname for /* Explicitly pass "plink" in place of appname for
* error reporting purposes. appname will have been * error reporting purposes. appname will have been
* set by be_foo.c to something more generic, probably * set by be_list.c to something more generic, probably
* "PuTTY". */ * "PuTTY". */
provide_xrm_string(*++argv, "plink"); provide_xrm_string(*++argv, "plink");
} }

View File

@ -46,8 +46,8 @@ void printer_finish_job(printer_job *pj)
/* /*
* There's no sensible way to enumerate printers under Unix, since * There's no sensible way to enumerate printers under Unix, since
* practically any valid Unix command is a valid printer :-) So * practically any valid Unix command is a valid printer :-) So
* these are useless stub functions, and uxcfg.c will disable the * these are useless stub functions, and config-unix.c will disable
* drop-down list in the printer configurer. * the drop-down list in the printer configurer.
*/ */
printer_enum *printer_start_enum(int *nprinters_ptr) { printer_enum *printer_start_enum(int *nprinters_ptr) {
*nprinters_ptr = 0; *nprinters_ptr = 0;

View File

@ -15,7 +15,7 @@ const bool use_pty_argv = true;
const unsigned cmdline_tooltype = TOOLTYPE_NONNETWORK; const unsigned cmdline_tooltype = TOOLTYPE_NONNETWORK;
/* gtkwin.c will call this, and in pterm it's not needed */ /* window.c will call this, and in pterm it's not needed */
void noise_ultralight(NoiseSourceId id, unsigned long data) { } void noise_ultralight(NoiseSourceId id, unsigned long data) { }
const struct BackendVtable *select_backend(Conf *conf) const struct BackendVtable *select_backend(Conf *conf)

View File

@ -19,7 +19,7 @@
#include "gtkcompat.h" #include "gtkcompat.h"
/* /*
* Stubs to avoid uxpty.c needing to be linked in. * Stubs to avoid pty.c needing to be linked in.
*/ */
const bool use_pty_argv = false; const bool use_pty_argv = false;
char **pty_argv; /* never used */ char **pty_argv; /* never used */

View File

@ -1,5 +1,5 @@
/* /*
* uxsftp.c: the Unix-specific parts of PSFTP and PSCP. * sftp.c: the Unix-specific parts of PSFTP and PSCP.
*/ */
#include <sys/time.h> #include <sys/time.h>

View File

@ -1,5 +1,5 @@
/* /*
* uxstore.c: Unix-specific implementation of the interface defined * storage.c: Unix-specific implementation of the interface defined
* in storage.h. * in storage.h.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Header file for gtkfont.c. Has to be separate from unix.h * Header file for unifont.c. Has to be separate from unix.h
* because it depends on GTK data types, hence can't be included * because it depends on GTK data types, hence can't be included
* from cross-platform code (which doesn't go near GTK). * from cross-platform code (which doesn't go near GTK).
*/ */
@ -47,10 +47,10 @@
#endif #endif
/* /*
* Exports from gtkfont.c. * Exports from unifont.c.
*/ */
typedef struct UnifontVtable UnifontVtable; /* contents internal to typedef struct UnifontVtable UnifontVtable; /* contents internal to
* gtkfont.c */ * unifont.c */
typedef struct unifont { typedef struct unifont {
const struct UnifontVtable *vt; const struct UnifontVtable *vt;
/* /*

View File

@ -1,7 +1,7 @@
/* /*
* Display the fingerprints of the PGP Master Keys to the user. * Display the fingerprints of the PGP Master Keys to the user.
* *
* (This is in its own file rather than in uxcons.c, because it's * (This is in its own file rather than in console.c, because it's
* appropriate even for Unix GUI apps.) * appropriate even for Unix GUI apps.)
*/ */

View File

@ -2,10 +2,10 @@
* uxsel.c * uxsel.c
* *
* This module is a sort of all-purpose interchange for file * This module is a sort of all-purpose interchange for file
* descriptors. At one end it talks to uxnet.c and pty.c and * descriptors. At one end it talks to network.c and pty.c and
* anything else which might have one or more fds that need * anything else which might have one or more fds that need
* select() or poll()-type things doing to them during an extended * select() or poll()-type things doing to them during an extended
* program run; at the other end it talks to pterm.c or uxplink.c or * program run; at the other end it talks to window.c or plink.c or
* anything else which might have its own means of actually doing * anything else which might have its own means of actually doing
* those select()-type things. * those select()-type things.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* gtkwin.c: the main code that runs a PuTTY terminal emulator and * window.c: the main code that runs a PuTTY terminal emulator and
* backend in a GTK window. * backend in a GTK window.
*/ */
@ -4443,7 +4443,7 @@ static void compute_geom_hints(GtkFrontend *inst, GdkGeometry *geom)
#if GTK_CHECK_VERSION(3,0,0) #if GTK_CHECK_VERSION(3,0,0)
/* /*
* And if we're running a gtkapp.c based program and * And if we're running a main-gtk-application.c based program and
* GtkApplicationWindow has given us a menu bar inside the window, * GtkApplicationWindow has given us a menu bar inside the window,
* then we must take that into account as well. * then we must take that into account as well.
* *

View File

@ -1,5 +1,5 @@
/* /*
* ux_x11.c: fetch local auth data for X forwarding. * x11.c: fetch local auth data for X forwarding.
*/ */
#include <ctype.h> #include <ctype.h>

View File

@ -7,14 +7,8 @@
#ifndef NOT_X_WINDOWS #ifndef NOT_X_WINDOWS
/* /* Defined in unix/utils */
* x11misc.c.
*/
void x11_ignore_error(Display *disp, unsigned char errcode); void x11_ignore_error(Display *disp, unsigned char errcode);
/*
* gtkmisc.c
*/
Display *get_x11_display(void); Display *get_x11_display(void);
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
* wincfg.c - the Windows-specific parts of the PuTTY configuration * config.c - the Windows-specific parts of the PuTTY configuration
* box. * box.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* wincons.c - various interactive-prompt routines shared between * console.c - various interactive-prompt routines shared between
* the Windows console PuTTY tools * the Windows console PuTTY tools
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* winctrls.c: routines to self-manage the controls in a dialog * controls.c: routines to self-manage the controls in a dialog
* box. * box.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* windlg.c - dialogs for PuTTY(tel), including the configuration dialog. * dialog.c - dialogs for PuTTY(tel), including the configuration dialog.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,5 +1,5 @@
/* /*
* winhandl.c: Module to give Windows front ends the general * handle-io.c: Module to give Windows front ends the general
* ability to deal with consoles, pipes, serial ports, or any other * ability to deal with consoles, pipes, serial ports, or any other
* type of data stream accessed through a Windows API HANDLE rather * type of data stream accessed through a Windows API HANDLE rather
* than a WinSock SOCKET. * than a WinSock SOCKET.

View File

@ -17,7 +17,7 @@
* thread as blocking system calls and so once one is in progress it * thread as blocking system calls and so once one is in progress it
* can't sensibly be interrupted. Hence, after the user tries to * can't sensibly be interrupted. Hence, after the user tries to
* freeze one of these sockets, it's unavoidable that we may receive * freeze one of these sockets, it's unavoidable that we may receive
* one more load of data before we manage to get winhandl.c to stop * one more load of data before we manage to get handle-io.c to stop
* reading. * reading.
*/ */
typedef enum HandleSocketFreezeState { typedef enum HandleSocketFreezeState {
@ -82,7 +82,7 @@ static size_t handle_gotdata(
if (hs->frozen == FREEZING) { if (hs->frozen == FREEZING) {
/* /*
* If we've received data while this socket is supposed to * If we've received data while this socket is supposed to
* be frozen (because the read winhandl.c started before * be frozen (because the read handle-io.c started before
* sk_set_frozen was called has now returned) then buffer * sk_set_frozen was called has now returned) then buffer
* the data for when we unfreeze. * the data for when we unfreeze.
*/ */
@ -248,7 +248,7 @@ static void sk_handle_set_frozen(Socket *s, bool is_frozen)
case THAWING: case THAWING:
/* /*
* We were in the middle of emptying our bufchain, and got * We were in the middle of emptying our bufchain, and got
* frozen again. In that case, winhandl.c is already * frozen again. In that case, handle-io.c is already
* throttled, so just return to FROZEN state. The toplevel * throttled, so just return to FROZEN state. The toplevel
* callback will notice and disable itself. * callback will notice and disable itself.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* winhelp.c: centralised functions to launch Windows HTML Help files. * help.c: centralised functions to launch Windows HTML Help files.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,5 +1,5 @@
/* /*
* winjump.c: support for Windows 7 jump lists. * jump-list.c: support for Windows 7 jump lists.
* *
* The Windows 7 jumplist is a customizable list defined by the * The Windows 7 jumplist is a customizable list defined by the
* application. It is persistent across application restarts: the OS * application. It is persistent across application restarts: the OS

View File

@ -1,6 +1,6 @@
/* /*
* winproxy.c: Windows implementation of platform_new_connection(), * local-proxy.c: Windows implementation of platform_new_connection(),
* supporting an OpenSSH-like proxy command via the winhandl.c * supporting an OpenSSH-like proxy command via the handle-io.c
* mechanism. * mechanism.
*/ */

View File

@ -38,11 +38,11 @@ HANDLE connect_to_named_pipe(const char *pipename, char **err)
} }
/* /*
* If we got ERROR_PIPE_BUSY, wait for the server to * If we got ERROR_PIPE_BUSY, wait for the server to create a
* create a new pipe instance. (Since the server is * new pipe instance. (Since the server is expected to be
* expected to be winnps.c, which will do that immediately * named-pipe-server.c, which will do that immediately after a
* after a previous connection is accepted, that shouldn't * previous connection is accepted, that shouldn't take
* take excessively long.) * excessively long.)
*/ */
if (!WaitNamedPipe(pipename, NMPWAIT_USE_DEFAULT_WAIT)) { if (!WaitNamedPipe(pipename, NMPWAIT_USE_DEFAULT_WAIT)) {
*err = dupprintf( *err = dupprintf(

View File

@ -1,6 +1,6 @@
/* /*
* winnojmp.c: stub jump list functions for Windows executables that * no-jump-list.c: stub jump list functions for Windows executables
* don't update the jump list. * that don't update the jump list.
*/ */
void add_session_to_jumplist(const char * const sessionname) {} void add_session_to_jumplist(const char * const sessionname) {}

View File

@ -1,6 +1,6 @@
/* /*
* nohelp.c: implement the has_embedded_chm() function for * nohelp.c: implement the has_embedded_chm() function for
* applications that have no help file at all, so that misc.c's * applications that have no help file at all, so that buildinfo.c's
* buildinfo string knows not to talk meaninglessly about whether the * buildinfo string knows not to talk meaninglessly about whether the
* nonexistent help file is present. * nonexistent help file is present.
*/ */

View File

@ -187,7 +187,8 @@ static void end_passphrase_dialog(HWND hwnd, INT_PTR result)
} else { } else {
/* /*
* Destroy this passphrase dialog box before passing the * Destroy this passphrase dialog box before passing the
* results back to pageant.c, to avoid re-entrancy issues. * results back to the main pageant.c, to avoid re-entrancy
* issues.
* *
* If we successfully got a passphrase from the user, but it * If we successfully got a passphrase from the user, but it
* was _wrong_, then pageant_passphrase_request_success will * was _wrong_, then pageant_passphrase_request_success will
@ -828,7 +829,7 @@ static void update_sessions(void)
* communications. For backwards compatibility, and more particularly * communications. For backwards compatibility, and more particularly
* for compatibility with derived works of PuTTY still using the old * for compatibility with derived works of PuTTY still using the old
* Pageant client code, we accept it as an alternative to the one * Pageant client code, we accept it as an alternative to the one
* returned from get_user_sid() in winpgntc.c. * returned from get_user_sid().
*/ */
PSID get_default_sid(void) PSID get_default_sid(void)
{ {

View File

@ -207,7 +207,7 @@ typedef void *Ssh_gss_name;
extern HINSTANCE hinst; extern HINSTANCE hinst;
/* /*
* Help file stuff in winhelp.c. * Help file stuff in help.c.
*/ */
void init_help(void); void init_help(void);
void shutdown_help(void); void shutdown_help(void);
@ -217,7 +217,7 @@ void quit_help(HWND hwnd);
int has_embedded_chm(void); /* 1 = yes, 0 = no, -1 = N/A */ int has_embedded_chm(void); /* 1 = yes, 0 = no, -1 = N/A */
/* /*
* GUI seat methods in windlg.c, so that the vtable definition in * GUI seat methods in dialog.c, so that the vtable definition in
* window.c can refer to them. * window.c can refer to them.
*/ */
SeatPromptResult win_seat_confirm_ssh_host_key( SeatPromptResult win_seat_confirm_ssh_host_key(
@ -232,7 +232,7 @@ SeatPromptResult win_seat_confirm_weak_cached_hostkey(
void (*callback)(void *ctx, SeatPromptResult result), void *ctx); void (*callback)(void *ctx, SeatPromptResult result), void *ctx);
/* /*
* Windows-specific clipboard helper function shared with windlg.c, * Windows-specific clipboard helper function shared with dialog.c,
* which takes the data string in the system code page instead of * which takes the data string in the system code page instead of
* Unicode. * Unicode.
*/ */
@ -242,7 +242,7 @@ void write_aclip(int clipboard, char *, int, bool);
/* /*
* On Windows, we send MA_2CLK as the only event marking the second * On Windows, we send MA_2CLK as the only event marking the second
* press of a mouse button. Compare unix.h. * press of a mouse button. Compare unix/platform.h.
*/ */
#define MULTICLICK_ONLY_EVENT 1 #define MULTICLICK_ONLY_EVENT 1
@ -278,14 +278,14 @@ void write_aclip(int clipboard, char *, int, bool);
"All Files (*.*)\0*\0\0\0") "All Files (*.*)\0*\0\0\0")
/* /*
* Exports from winnet.c. * Exports from network.c.
*/ */
/* Report an event notification from WSA*Select */ /* Report an event notification from WSA*Select */
void select_result(WPARAM, LPARAM); void select_result(WPARAM, LPARAM);
/* Enumerate all currently live OS-level SOCKETs */ /* Enumerate all currently live OS-level SOCKETs */
SOCKET first_socket(int *); SOCKET first_socket(int *);
SOCKET next_socket(int *); SOCKET next_socket(int *);
/* Ask winnet.c whether we currently want to try to write to a SOCKET */ /* Ask network.c whether we currently want to try to write to a SOCKET */
bool socket_writable(SOCKET skt); bool socket_writable(SOCKET skt);
/* Force a refresh of the SOCKET list by re-calling do_select for each one */ /* Force a refresh of the SOCKET list by re-calling do_select for each one */
void socket_reselect_all(void); void socket_reselect_all(void);
@ -295,7 +295,7 @@ SockAddr *sk_namedpipe_addr(const char *pipename);
const char *winsock_error_string(int error); const char *winsock_error_string(int error);
/* /*
* winnet.c dynamically loads WinSock 2 or WinSock 1 depending on * network.c dynamically loads WinSock 2 or WinSock 1 depending on
* what it can get, which means any WinSock routines used outside * what it can get, which means any WinSock routines used outside
* that module must be exported from it as function pointers. So * that module must be exported from it as function pointers. So
* here they are. * here they are.
@ -321,13 +321,13 @@ DECL_WINDOWS_FUNCTION(extern, int, select,
#endif #endif
/* /*
* Implemented differently depending on the client of winnet.c, and * Implemented differently depending on the client of network.c, and
* called by winnet.c to turn on or off WSA*Select for a given socket. * called by network.c to turn on or off WSA*Select for a given socket.
*/ */
const char *do_select(SOCKET skt, bool enable); const char *do_select(SOCKET skt, bool enable);
/* /*
* Exports from winselgui.c and winselcli.c, each of which provides an * Exports from select-{gui,cli}.c, each of which provides an
* implementation of do_select. * implementation of do_select.
*/ */
void winselgui_set_hwnd(HWND hwnd); void winselgui_set_hwnd(HWND hwnd);
@ -350,14 +350,14 @@ void setup_handle_socket(Socket *s, HANDLE send_H, HANDLE recv_H,
Socket *new_named_pipe_client(const char *pipename, Plug *plug); /* winnpc */ Socket *new_named_pipe_client(const char *pipename, Plug *plug); /* winnpc */
Socket *new_named_pipe_listener(const char *pipename, Plug *plug); /* winnps */ Socket *new_named_pipe_listener(const char *pipename, Plug *plug); /* winnps */
/* A lower-level function in winnpc.c, which does most of the work of /* A lower-level function in named-pipe-client.c, which does most of
* new_named_pipe_client (including checking the ownership of what * the work of new_named_pipe_client (including checking the ownership
* it's connected to), but returns a plain HANDLE instead of wrapping * of what it's connected to), but returns a plain HANDLE instead of
* it into a Socket. */ * wrapping it into a Socket. */
HANDLE connect_to_named_pipe(const char *pipename, char **err); HANDLE connect_to_named_pipe(const char *pipename, char **err);
/* /*
* Exports from winctrls.c. * Exports from controls.c.
*/ */
struct ctlpos { struct ctlpos {
@ -372,7 +372,7 @@ struct ctlpos {
void init_common_controls(void); /* also does some DLL-loading */ void init_common_controls(void); /* also does some DLL-loading */
/* /*
* Exports from winutils.c. * Exports from utils.
*/ */
typedef struct filereq_tag filereq; /* cwd for file requester */ typedef struct filereq_tag filereq; /* cwd for file requester */
bool request_file(filereq *state, OPENFILENAME *of, bool preserve, bool save); bool request_file(filereq *state, OPENFILENAME *of, bool preserve, bool save);
@ -422,7 +422,7 @@ struct dlgparam {
}; };
/* /*
* Exports from winctrls.c. * Exports from controls.c.
*/ */
void ctlposinit(struct ctlpos *cp, HWND hwnd, void ctlposinit(struct ctlpos *cp, HWND hwnd,
int leftborder, int rightborder, int topborder); int leftborder, int rightborder, int topborder);
@ -547,13 +547,13 @@ void dp_add_tree(struct dlgparam *dp, struct winctrls *tree);
void dp_cleanup(struct dlgparam *dp); void dp_cleanup(struct dlgparam *dp);
/* /*
* Exports from wincfg.c. * Exports from config.c.
*/ */
void win_setup_config_box(struct controlbox *b, HWND *hwndp, bool has_help, void win_setup_config_box(struct controlbox *b, HWND *hwndp, bool has_help,
bool midsession, int protocol); bool midsession, int protocol);
/* /*
* Exports from windlg.c. * Exports from dialog.c.
*/ */
void defuse_showwindow(void); void defuse_showwindow(void);
bool do_config(Conf *); bool do_config(Conf *);
@ -566,7 +566,7 @@ void show_help(HWND hwnd);
HWND event_log_window(void); HWND event_log_window(void);
/* /*
* Exports from winmisc.c. * Exports from utils.
*/ */
extern DWORD osMajorVersion, osMinorVersion, osPlatformId; extern DWORD osMajorVersion, osMinorVersion, osPlatformId;
void init_winver(void); void init_winver(void);
@ -610,7 +610,7 @@ struct unicode_data;
void init_ucs(Conf *, struct unicode_data *); void init_ucs(Conf *, struct unicode_data *);
/* /*
* Exports from winhandl.c. * Exports from handle-io.c.
*/ */
#define HANDLE_FLAG_OVERLAPPED 1 #define HANDLE_FLAG_OVERLAPPED 1
#define HANDLE_FLAG_IGNOREEOF 2 #define HANDLE_FLAG_IGNOREEOF 2
@ -661,12 +661,12 @@ char *agent_mutex_name(void);
char *agent_named_pipe_name(void); char *agent_named_pipe_name(void);
/* /*
* Exports from winser.c. * Exports from serial.c.
*/ */
extern const struct BackendVtable serial_backend; extern const struct BackendVtable serial_backend;
/* /*
* Exports from winjump.c. * Exports from jump-list.c.
*/ */
#define JUMPLIST_SUPPORTED /* suppress #defines in putty.h */ #define JUMPLIST_SUPPORTED /* suppress #defines in putty.h */
void add_session_to_jumplist(const char * const sessionname); void add_session_to_jumplist(const char * const sessionname);
@ -675,12 +675,12 @@ void clear_jumplist(void);
bool set_explicit_app_user_model_id(void); bool set_explicit_app_user_model_id(void);
/* /*
* Exports from winnoise.c. * Exports from noise.c.
*/ */
bool win_read_random(void *buf, unsigned wanted); /* returns true on success */ bool win_read_random(void *buf, unsigned wanted); /* returns true on success */
/* /*
* Extra functions in winstore.c over and above the interface in * Extra functions in storage.c over and above the interface in
* storage.h. * storage.h.
* *
* These functions manipulate the Registry section which mirrors the * These functions manipulate the Registry section which mirrors the
@ -713,10 +713,10 @@ char *get_jumplist_registry_entries(void);
#define CLIPUI_DEFAULT_MOUSE CLIPUI_EXPLICIT #define CLIPUI_DEFAULT_MOUSE CLIPUI_EXPLICIT
#define CLIPUI_DEFAULT_INS CLIPUI_EXPLICIT #define CLIPUI_DEFAULT_INS CLIPUI_EXPLICIT
/* In winmisc.c */ /* In utils */
char *registry_get_string(HKEY root, const char *path, const char *leaf); char *registry_get_string(HKEY root, const char *path, const char *leaf);
/* In wincliloop.c */ /* In cliloop.c */
typedef bool (*cliloop_pre_t)(void *vctx, const HANDLE **extra_handles, typedef bool (*cliloop_pre_t)(void *vctx, const HANDLE **extra_handles,
size_t *n_extra_handles); size_t *n_extra_handles);
typedef bool (*cliloop_post_t)(void *vctx, size_t extra_handle_index); typedef bool (*cliloop_post_t)(void *vctx, size_t extra_handle_index);

View File

@ -1,6 +1,6 @@
/* /*
* security-api.h: some miscellaneous security-related helper functions, * security-api.h: some miscellaneous security-related helper functions,
* defined in winsecur.c, that use the advapi32 library. Also * defined in utils/security.c, that use the advapi32 library. Also
* centralises the machinery for dynamically loading that library. * centralises the machinery for dynamically loading that library.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Implementation of do_select() for winnet.c to use, suitable for use * Implementation of do_select() for network.c to use, suitable for use
* when there's no GUI window to have network activity reported to. * when there's no GUI window to have network activity reported to.
* *
* It uses WSAEventSelect, where available, to convert network * It uses WSAEventSelect, where available, to convert network

View File

@ -1,5 +1,5 @@
/* /*
* Implementation of do_select() for winnet.c to use, that uses * Implementation of do_select() for network.c to use, that uses
* WSAAsyncSelect to convert network activity into window messages, * WSAAsyncSelect to convert network activity into window messages,
* for integration into a GUI event loop. * for integration into a GUI event loop.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* winsftp.c: the Windows-specific parts of PSFTP and PSCP. * sftp.c: the Windows-specific parts of PSFTP and PSCP.
*/ */
#include <winsock2.h> /* need to put this first, for winelib builds */ #include <winsock2.h> /* need to put this first, for winelib builds */

View File

@ -1,5 +1,5 @@
/* /*
* winstore.c: Windows-specific implementation of the interface * storage.c: Windows-specific implementation of the interface
* defined in storage.h. * defined in storage.h.
*/ */

View File

@ -1,6 +1,6 @@
/* /*
* Small implementation of Seat and LogPolicy shared between window.c * Small implementation of Seat and LogPolicy shared between window.c
* and windlg.c. * and dialog.c.
*/ */
typedef struct WinGuiSeat WinGuiSeat; typedef struct WinGuiSeat WinGuiSeat;
@ -11,4 +11,4 @@ struct WinGuiSeat {
LogPolicy logpolicy; LogPolicy logpolicy;
}; };
extern const LogPolicyVtable win_gui_logpolicy_vt; /* in windlg.c */ extern const LogPolicyVtable win_gui_logpolicy_vt; /* in dialog.c */

View File

@ -1,5 +1,5 @@
/* /*
* winx11.c: fetch local auth data for X forwarding. * x11.c: fetch local auth data for X forwarding.
*/ */
#include <ctype.h> #include <ctype.h>