up a bunch of warnings, mostly unused variables. All fixed.
git-svn-id: svn://svn.tartarus.org/sgt/putty@1058
cda61777-01e9-0310-a592-
d414129be87e
+ * Exports from pageantc.c
+ */
+void agent_query(void *in, int inlen, void **out, int *outlen);
+int agent_exists(void);
+
+/*
* We need this to link with the RSA code, because rsaencrypt()
* pads its data with random bytes. Since we only use rsadecrypt()
* and the signing functions, which are deterministic, this should
* We need this to link with the RSA code, because rsaencrypt()
* pads its data with random bytes. Since we only use rsadecrypt()
* and the signing functions, which are deterministic, this should
* Find out if Pageant is already running.
*/
already_running = FALSE;
* Find out if Pageant is already running.
*/
already_running = FALSE;
- if (FindWindow("Pageant", "Pageant"))
already_running = TRUE;
else {
already_running = TRUE;
else {
}
static int alloc_channel_id(void) {
}
static int alloc_channel_id(void) {
- const int CHANNEL_NUMBER_OFFSET = 256;
- int low, high, mid;
+ const unsigned CHANNEL_NUMBER_OFFSET = 256;
+ unsigned low, high, mid;
int tsize;
struct ssh_channel *c;
int tsize;
struct ssh_channel *c;
if (pktin.type == SSH1_MSG_DISCONNECT) {
/* log reason code in disconnect message */
char buf[256];
if (pktin.type == SSH1_MSG_DISCONNECT) {
/* log reason code in disconnect message */
char buf[256];
- int msglen = GET_32BIT(pktin.body);
- int nowlen;
+ unsigned msglen = GET_32BIT(pktin.body);
+ unsigned nowlen;
strcpy(buf, "Remote sent disconnect: ");
nowlen = strlen(buf);
if (msglen > sizeof(buf)-nowlen-1)
strcpy(buf, "Remote sent disconnect: ");
nowlen = strlen(buf);
if (msglen > sizeof(buf)-nowlen-1)
/* log reason code in disconnect message */
char buf[256];
int reason = GET_32BIT(pktin.data+6);
/* log reason code in disconnect message */
char buf[256];
int reason = GET_32BIT(pktin.data+6);
- int msglen = GET_32BIT(pktin.data+10);
- int nowlen;
+ unsigned msglen = GET_32BIT(pktin.data+10);
+ unsigned nowlen;
if (reason > 0 && reason < lenof(ssh2_disconnect_reasons)) {
sprintf(buf, "Received disconnect message (%s)",
ssh2_disconnect_reasons[reason]);
if (reason > 0 && reason < lenof(ssh2_disconnect_reasons)) {
sprintf(buf, "Received disconnect message (%s)",
ssh2_disconnect_reasons[reason]);
} else if (pktin.type == SSH1_SMSG_X11_OPEN) {
/* Remote side is trying to open a channel to talk to our
* X-Server. Give them back a local channel number. */
} else if (pktin.type == SSH1_SMSG_X11_OPEN) {
/* Remote side is trying to open a channel to talk to our
* X-Server. Give them back a local channel number. */
- struct ssh_channel *c, *d;
logevent("Received X11 connect request");
/* Refuse if X11 forwarding is disabled. */
logevent("Received X11 connect request");
/* Refuse if X11 forwarding is disabled. */
} else if (pktin.type == SSH1_SMSG_AGENT_OPEN) {
/* Remote side is trying to open a channel to talk to our
* agent. Give them back a local channel number. */
} else if (pktin.type == SSH1_SMSG_AGENT_OPEN) {
/* Remote side is trying to open a channel to talk to our
* agent. Give them back a local channel number. */
struct ssh_channel *c;
/* Refuse if agent forwarding is disabled. */
struct ssh_channel *c;
/* Refuse if agent forwarding is disabled. */
ssh2_pkt_send();
sfree(c);
} else {
ssh2_pkt_send();
sfree(c);
} else {
- struct ssh_channel *d;
- unsigned i;
-
c->localid = alloc_channel_id();
c->closes = 0;
c->v2.remwindow = ssh2_pkt_getuint32();
c->localid = alloc_channel_id();
c->closes = 0;
c->v2.remwindow = ssh2_pkt_getuint32();
int ssh1_read_bignum(unsigned char *data, Bignum *result);
int bignum_bitcount(Bignum bn);
int ssh1_bignum_length(Bignum bn);
int ssh1_read_bignum(unsigned char *data, Bignum *result);
int bignum_bitcount(Bignum bn);
int ssh1_bignum_length(Bignum bn);
+int ssh2_bignum_length(Bignum bn);
int bignum_byte(Bignum bn, int i);
int bignum_bit(Bignum bn, int i);
void bignum_set_bit(Bignum bn, int i, int value);
int bignum_byte(Bignum bn, int i);
int bignum_bit(Bignum bn, int i);
void bignum_set_bit(Bignum bn, int i, int value);
-static int *rsa2_openssh_fmtkey(void *key, unsigned char *blob, int len) {
+static int rsa2_openssh_fmtkey(void *key, unsigned char *blob, int len) {
struct RSAKey *rsa = (struct RSAKey *)key;
int bloblen, i;
struct RSAKey *rsa = (struct RSAKey *)key;
int bloblen, i;
void term_size(int newrows, int newcols, int newsavelines) {
tree234 *newsb, *newscreen, *newalt;
unsigned long *newdisp, *newwant, *oldline, *line;
void term_size(int newrows, int newcols, int newsavelines) {
tree234 *newsb, *newscreen, *newalt;
unsigned long *newdisp, *newwant, *oldline, *line;
- int i, j, crows, ccols;
int posn, oldposn, furthest_back, oldsbsize;
int save_alt_which = alt_which;
int posn, oldposn, furthest_back, oldsbsize;
int save_alt_which = alt_which;
*/
static void swap_screen (int which) {
int t;
*/
static void swap_screen (int which) {
int t;
tree234 *ttr;
if (which == alt_which)
tree234 *ttr;
if (which == alt_which)
* Update the scroll bar.
*/
static void update_sbar(void) {
* Update the scroll bar.
*/
static void update_sbar(void) {
nscroll = count234(scrollback);
nscroll = count234(scrollback);
* whole line, or parts thereof.
*/
static void erase_lots (int line_only, int from_begin, int to_end) {
* whole line, or parts thereof.
*/
static void erase_lots (int line_only, int from_begin, int to_end) {
int erase_lattr;
unsigned long *ldata;
int erase_lattr;
unsigned long *ldata;
break;
case SEEN_ESCHASH:
{
break;
case SEEN_ESCHASH:
{
unsigned long nlattr;
unsigned long *ldata;
int i, j;
unsigned long nlattr;
unsigned long *ldata;
int i, j;
while (poslt(top, bottom)) {
int nl = FALSE;
unsigned long *ldata = lineptr(top.y);
while (poslt(top, bottom)) {
int nl = FALSE;
unsigned long *ldata = lineptr(top.y);
nlpos.y = top.y;
nlpos.x = cols;
nlpos.y = top.y;
nlpos.x = cols;
*/
static pos sel_spread_half (pos p, int dir) {
unsigned long *ldata;
*/
static pos sel_spread_half (pos p, int dir) {
unsigned long *ldata;
short wvalue;
ldata = lineptr(p.y);
short wvalue;
ldata = lineptr(p.y);
LOG(("deleting item %d from tree %p\n", index, t));
while (1) {
while (n) {
LOG(("deleting item %d from tree %p\n", index, t));
while (1) {
while (n) {