Patches by cras: unsigned int's to unsigned short in packet
authorPekka Riikonen <priikone@silcnet.org>
Wed, 1 Nov 2000 13:40:58 +0000 (13:40 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 1 Nov 2000 13:40:58 +0000 (13:40 +0000)
routines (bugs in HPUX). Removed config.h's from contrib's
getopt.c

apps/silc/silc.c
lib/contrib/getopt.c
lib/contrib/getopt1.c
lib/silccore/silcpacket.h
lib/silcske/payload_internal.h

index 938a27babaf11f7a66cbb4c29c7fc5cad1b1f11a..203224cc900566229cd23798bd6a08ee937ee1e9 100644 (file)
@@ -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;
index 7a4673b8d8db32e96c0449d8fccb507cb7446103..1378a221ab9d05365611fe4e79848c462cce56cf 100644 (file)
    along with this program; if not, write to the Free Software
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 \f
-#ifdef HAVE_CONFIG_H
-#if defined (emacs) || defined (CONFIG_BROKETS)
-/* We use <config.h> 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 <config.h>
-#else
-#include "config.h"
-#endif
-#endif
 
 #ifndef __STDC__
 /* This is a separate conditional since some stdc systems
index f784b5757c59e1cd26d45fc5ddb0273a7f50b0f4..fe6bdd992a4f3e84010c4695692ffa0ba2f8d4c5 100644 (file)
    along with this program; if not, write to the Free Software
    Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 \f
-#ifdef HAVE_CONFIG_H
-#if defined (emacs) || defined (CONFIG_BROKETS)
-/* We use <config.h> 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 <config.h>
-#else
-#include "config.h"
-#endif
-#endif
 
 #include "getopt.h"
 
index a13b726804da0ab0d67bd97650790d177bc03f1b..14b1c678fa07d3793a69db3617d85cf7521dbc11 100644 (file)
@@ -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;
index 62de501168903b12f7e4b04adafdddae6a36ba42..c91b3aeedf860de0ba64f4eb9c916dd16cae07eb 100644 (file)
@@ -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;