From: Pekka Riikonen Date: Wed, 1 Nov 2000 13:40:58 +0000 (+0000) Subject: Patches by cras: unsigned int's to unsigned short in packet X-Git-Tag: SILC.0.1~340 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=27aba07bdfc3db5b3976227302faf11dda64852e Patches by cras: unsigned int's to unsigned short in packet routines (bugs in HPUX). Removed config.h's from contrib's getopt.c --- diff --git a/apps/silc/silc.c b/apps/silc/silc.c index 938a27ba..203224cc 100644 --- a/apps/silc/silc.c +++ b/apps/silc/silc.c @@ -426,17 +426,19 @@ SILC_TASK_CALLBACK(silc_client_process_key_press) break; case CTRL('a'): case KEY_HOME: +#ifdef KEY_BEG case KEY_BEG: +#endif /* Beginning, Home */ silc_screen_input_cursor_home(app->screen); break; case CTRL('e'): +#ifdef KEY_END case KEY_END: - /* End */ - silc_screen_input_cursor_end(app->screen); - break; +#endif case KEY_LL: /* End */ + silc_screen_input_cursor_end(app->screen); break; case CTRL('g'): /* Bell, Ctrl^g */ @@ -481,8 +483,12 @@ static int silc_client_bad_keys(unsigned char key) case KEY_B2: case KEY_C1: case KEY_C3: +#ifdef KEY_UNDO case KEY_UNDO: +#endif +#ifdef KEY_EXIT case KEY_EXIT: +#endif case '\v': /* VT */ case '\E': /* we ignore ESC */ return TRUE; diff --git a/lib/contrib/getopt.c b/lib/contrib/getopt.c index 7a4673b8..1378a221 100644 --- a/lib/contrib/getopt.c +++ b/lib/contrib/getopt.c @@ -20,16 +20,6 @@ along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef HAVE_CONFIG_H -#if defined (emacs) || defined (CONFIG_BROKETS) -/* We use instead of "config.h" so that a compilation - using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h - (which it would do because it found this file in $srcdir). */ -#include -#else -#include "config.h" -#endif -#endif #ifndef __STDC__ /* This is a separate conditional since some stdc systems diff --git a/lib/contrib/getopt1.c b/lib/contrib/getopt1.c index f784b575..fe6bdd99 100644 --- a/lib/contrib/getopt1.c +++ b/lib/contrib/getopt1.c @@ -16,16 +16,6 @@ along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef HAVE_CONFIG_H -#if defined (emacs) || defined (CONFIG_BROKETS) -/* We use instead of "config.h" so that a compilation - using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h - (which it would do because it found this file in $srcdir). */ -#include -#else -#include "config.h" -#endif -#endif #include "getopt.h" diff --git a/lib/silccore/silcpacket.h b/lib/silccore/silcpacket.h index a13b7268..14b1c678 100644 --- a/lib/silccore/silcpacket.h +++ b/lib/silccore/silcpacket.h @@ -94,14 +94,14 @@ typedef unsigned char SilcPacketFlags; Packet flags. Flags are defined above. unsigned char *src_id - unsigned int src_id_len + unsigned short src_id_len unsigned char src_id_type Source ID, its length and type. On packet reception retuned ID's are always the hash values of the ID's from the packet. unsigned char *dst_id; - unsigned int dst_id_len; + unsigned short dst_id_len; unsigned char src_id_type; Destination ID, its length and type. On packet reception retuned @@ -119,15 +119,15 @@ typedef struct { SilcPacketFlags flags; unsigned char *src_id; - unsigned int src_id_len; + unsigned short src_id_len; unsigned char src_id_type; unsigned char *dst_id; - unsigned int dst_id_len; + unsigned short dst_id_len; unsigned char dst_id_type; - unsigned int truelen; - unsigned int padlen; + unsigned short truelen; + unsigned short padlen; /* For padding generation */ SilcRng rng; diff --git a/lib/silcske/payload_internal.h b/lib/silcske/payload_internal.h index 62de5011..c91b3aee 100644 --- a/lib/silcske/payload_internal.h +++ b/lib/silcske/payload_internal.h @@ -24,7 +24,7 @@ /* SILC Key Exchange Start Payload */ typedef struct { unsigned char flags; - unsigned int len; + unsigned short len; unsigned char *cookie; unsigned short cookie_len;