From 7613acc70e37ebabd7743da02da4f4ff0d218d5c Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 10 Oct 2001 03:18:22 +0000 Subject: Don't conditionalize prototypes; delete macros supporting it. (Maybe overdone; don't worry about restoring them when importing new versions of code.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13792 dc483132-0cff-0310-8789-dd5450dbe970 --- src/windows/wintel/ChangeLog | 5 ++ src/windows/wintel/enc_des.c | 16 ++--- src/windows/wintel/enc_des.h | 116 ++++++++++++++++------------------ src/windows/wintel/encrypt.c | 4 +- src/windows/wintel/encrypt.h | 144 ++++++++++++++++++++----------------------- 5 files changed, 137 insertions(+), 148 deletions(-) (limited to 'src/windows') diff --git a/src/windows/wintel/ChangeLog b/src/windows/wintel/ChangeLog index fda97b4108..f1125bc0c9 100644 --- a/src/windows/wintel/ChangeLog +++ b/src/windows/wintel/ChangeLog @@ -1,3 +1,8 @@ +2001-10-09 Ken Raeburn + + * enc_des.c, enc_des.h, encrypt.c, encrypt.h: Make prototypes + unconditional. Don't define P(). + 2001-10-05 Ken Raeburn * font.c, k5stream.c, k5stream.h, screen.c, screen.h, telnet.c, diff --git a/src/windows/wintel/enc_des.c b/src/windows/wintel/enc_des.c index fa1edc69b0..7bf72f4880 100644 --- a/src/windows/wintel/enc_des.c +++ b/src/windows/wintel/enc_des.c @@ -104,14 +104,14 @@ struct keyidlist { extern kstream EncryptKSGlobalHack; -void fb64_stream_iv P((Block, struct stinfo *)); -void fb64_init P((struct fb *)); -static int fb64_start P((struct fb *, int, int)); -int fb64_is P((unsigned char *, int, struct fb *)); -int fb64_reply P((unsigned char *, int, struct fb *)); -static void fb64_session P((Session_Key *, int, struct fb *)); -void fb64_stream_key P((Block, struct stinfo *)); -int fb64_keyid P((int, unsigned char *, int *, struct fb *)); +void fb64_stream_iv (Block, struct stinfo *); +void fb64_init (struct fb *); +static int fb64_start (struct fb *, int, int); +int fb64_is (unsigned char *, int, struct fb *); +int fb64_reply (unsigned char *, int, struct fb *); +static void fb64_session (Session_Key *, int, struct fb *); +void fb64_stream_key (Block, struct stinfo *); +int fb64_keyid (int, unsigned char *, int *, struct fb *); void cfb64_init(server) diff --git a/src/windows/wintel/enc_des.h b/src/windows/wintel/enc_des.h index dbfb99e4af..c4108eba5d 100644 --- a/src/windows/wintel/enc_des.h +++ b/src/windows/wintel/enc_des.h @@ -55,75 +55,67 @@ * this software for any purpose. It is provided "as is" without express * or implied warranty. */ -#if !defined(P) -#ifdef __STDC__ -#define P(x) x -#else -#define P(x) () -#endif -#endif - #ifdef ENCRYPTION -void encrypt_init P((char *, int)); -Encryptions *findencryption P((int)); -void encrypt_send_supprt P((void)); -void encrypt_auto P((int)); -void decrypt_auto P((int)); -void encrypt_is P((unsigned char *, int)); -void encrypt_reply P((unsigned char *, int)); -void encrypt_start_input P((int)); -void encrypt_session_key P((Session_Key *, int)); -void encrypt_end_input P((void)); -void encrypt_start_output P((int)); -void encrypt_end_output P((void)); -void encrypt_send_request_start P((void)); -void encrypt_send_request_end P((void)); -void encrypt_send_end P((void)); -void encrypt_wait P((void)); -int encrypt_is_encrypting P((void)); -void encrypt_send_support P((void)); -void encrypt_send_keyid P((int, unsigned char *, int, int)); -int net_write P((unsigned char *, int)); +void encrypt_init (char *, int); +Encryptions *findencryption (int); +void encrypt_send_supprt (void); +void encrypt_auto (int); +void decrypt_auto (int); +void encrypt_is (unsigned char *, int); +void encrypt_reply (unsigned char *, int); +void encrypt_start_input (int); +void encrypt_session_key (Session_Key *, int); +void encrypt_end_input (void); +void encrypt_start_output (int); +void encrypt_end_output (void); +void encrypt_send_request_start (void); +void encrypt_send_request_end (void); +void encrypt_send_end (void); +void encrypt_wait (void); +int encrypt_is_encrypting (void); +void encrypt_send_support (void); +void encrypt_send_keyid (int, unsigned char *, int, int); +int net_write (unsigned char *, int); #ifdef TELENTD -void encrypt_wait P((void)); +void encrypt_wait (void); #else -int encrypt_cmd P((int, char **)); -void encrypt_display P((void)); +int encrypt_cmd (int, char **); +void encrypt_display (void); #endif -void krbdes_encrypt P((unsigned char *, int)); -int krbdes_decrypt P((int)); -int krbdes_is P((unsigned char *, int)); -int krbdes_reply P((unsigned char *, int)); -void krbdes_init P((int)); -int krbdes_start P((int, int)); -void krbdes_session P((Session_Key *, int)); -void krbdes_printsub P((unsigned char *, int, unsigned char *, int)); +void krbdes_encrypt (unsigned char *, int); +int krbdes_decrypt (int); +int krbdes_is (unsigned char *, int); +int krbdes_reply (unsigned char *, int); +void krbdes_init (int); +int krbdes_start (int, int); +void krbdes_session (Session_Key *, int); +void krbdes_printsub (unsigned char *, int, unsigned char *, int); -void cfb64_encrypt P((unsigned char *, int)); -int cfb64_decrypt P((int)); -void cfb64_init P((int)); -int cfb64_start P((int, int)); -int cfb64_is P((unsigned char *, int)); -int cfb64_reply P((unsigned char *, int)); -void cfb64_session P((Session_Key *, int)); -int cfb64_keyid P((int, unsigned char *, int *)); -void cfb64_printsub P((unsigned char *, int, unsigned char *, int)); +void cfb64_encrypt (unsigned char *, int); +int cfb64_decrypt (int); +void cfb64_init (int); +int cfb64_start (int, int); +int cfb64_is (unsigned char *, int); +int cfb64_reply (unsigned char *, int); +void cfb64_session (Session_Key *, int); +int cfb64_keyid (int, unsigned char *, int *); +void cfb64_printsub (unsigned char *, int, unsigned char *, int); -void ofb64_encrypt P((unsigned char *, int)); -int ofb64_decrypt P((int)); -void ofb64_init P((int)); -int ofb64_start P((int, int)); -int ofb64_is P((unsigned char *, int)); -int ofb64_reply P((unsigned char *, int)); -void ofb64_session P((Session_Key *, int)); -int ofb64_keyid P((int, unsigned char *, int *)); -void ofb64_printsub P((unsigned char *, int, unsigned char *, int)); +void ofb64_encrypt (unsigned char *, int); +int ofb64_decrypt (int); +void ofb64_init (int); +int ofb64_start (int, int); +int ofb64_is (unsigned char *, int); +int ofb64_reply (unsigned char *, int); +void ofb64_session (Session_Key *, int); +int ofb64_keyid (int, unsigned char *, int *); +void ofb64_printsub (unsigned char *, int, unsigned char *, int); -int des_new_random_key P((Block)); -void des_set_random_generator_seed P((Block)); -void des_key_sched P((Block, Schedule)); -void des_ecb_encrypt P((Block, Block, Schedule, int)); -int des_string_to_key P((char *, Block)); +int des_new_random_key (Block); +void des_set_random_generator_seed (Block); +void des_key_sched (Block, Schedule); +void des_ecb_encrypt (Block, Block, Schedule, int); +int des_string_to_key (char *, Block); #endif /* ENCRYPTION */ diff --git a/src/windows/wintel/encrypt.c b/src/windows/wintel/encrypt.c index bbb5496d6b..6d97ccd5d3 100644 --- a/src/windows/wintel/encrypt.c +++ b/src/windows/wintel/encrypt.c @@ -86,8 +86,8 @@ * These function pointers point to the current routines * for encrypting and decrypting data. */ -void (*encrypt_output) P((unsigned char *, int)); -int (*decrypt_input) P((int)); +void (*encrypt_output) (unsigned char *, int); +int (*decrypt_input) (int); #ifdef DEBUG int encrypt_debug_mode = 1; diff --git a/src/windows/wintel/encrypt.h b/src/windows/wintel/encrypt.h index a0ae799b79..3d8a025b9a 100644 --- a/src/windows/wintel/encrypt.h +++ b/src/windows/wintel/encrypt.h @@ -78,14 +78,6 @@ typedef struct { unsigned char *data; } Session_Key; -#if !defined(P) -#ifdef __STDC__ -#define P(x) x -#else -#define P(x) () -#endif -#endif - #ifdef DEBUG int printsub(char, unsigned char *, size_t); #endif @@ -95,90 +87,90 @@ void encrypt_parse(kstream, unsigned char *, int); typedef struct { char *name; int type; - void (*output) P((unsigned char *, int)); - int (*input) P((int)); - void (*init) P((int)); - int (*start) P((int, int)); - int (*is) P((unsigned char *, int)); - int (*reply) P((unsigned char *, int)); - void (*session) P((Session_Key *, int)); - int (*keyid) P((int, unsigned char *, int *)); - void (*printsub) P((unsigned char *, int, unsigned char *, int)); + void (*output) (unsigned char *, int); + int (*input) (int); + void (*init) (int); + int (*start) (int, int); + int (*is) (unsigned char *, int); + int (*reply) (unsigned char *, int); + void (*session) (Session_Key *, int); + int (*keyid) (int, unsigned char *, int *); + void (*printsub) (unsigned char *, int, unsigned char *, int); } Encryptions; #define SK_DES 1 /* Matched Kerberos v5 ENCTYPE_DES */ -void encrypt_init P((kstream, char *, int)); -Encryptions *findencryption P((int)); -void encrypt_send_supprt P((void)); -void encrypt_auto P((int)); -void decrypt_auto P((int)); -void encrypt_is P((unsigned char *, int)); -void encrypt_reply P((unsigned char *, int)); -void encrypt_start_input P((int)); -void encrypt_session_key P((Session_Key *, int)); -void encrypt_end_input P((void)); -void encrypt_start_output P((int)); -void encrypt_end_output P((void)); -void encrypt_send_request_start P((void)); -void encrypt_send_request_end P((void)); -void encrypt_send_end P((void)); -void encrypt_wait P((void)); -int encrypt_is_encrypting P((void)); -void encrypt_send_support P((void)); -void encrypt_send_keyid P((int, unsigned char *, int, int)); -int net_write P((unsigned char *, int)); - -int encrypt_cmd P((int, char **)); -void encrypt_display P((void)); - -void krbdes_encrypt P((unsigned char *, int)); -int krbdes_decrypt P((int)); -int krbdes_is P((unsigned char *, int)); -int krbdes_reply P((unsigned char *, int)); -void krbdes_init P((int)); -int krbdes_start P((int, int)); -void krbdes_session P((Session_Key *, int)); -void krbdes_printsub P((unsigned char *, int, unsigned char *, int)); - -void cfb64_encrypt P((unsigned char *, int)); -int cfb64_decrypt P((int)); -void cfb64_init P((int)); -int cfb64_start P((int, int)); -int cfb64_is P((unsigned char *, int)); -int cfb64_reply P((unsigned char *, int)); -void cfb64_session P((Session_Key *, int)); -int cfb64_keyid P((int, unsigned char *, int *)); -void cfb64_printsub P((unsigned char *, int, unsigned char *, int)); - -void ofb64_encrypt P((unsigned char *, int)); -int ofb64_decrypt P((int)); -void ofb64_init P((int)); -int ofb64_start P((int, int)); -int ofb64_is P((unsigned char *, int)); -int ofb64_reply P((unsigned char *, int)); -void ofb64_session P((Session_Key *, int)); -int ofb64_keyid P((int, unsigned char *, int *)); -void ofb64_printsub P((unsigned char *, int, unsigned char *, int)); +void encrypt_init (kstream, char *, int); +Encryptions *findencryption (int); +void encrypt_send_supprt (void); +void encrypt_auto (int); +void decrypt_auto (int); +void encrypt_is (unsigned char *, int); +void encrypt_reply (unsigned char *, int); +void encrypt_start_input (int); +void encrypt_session_key (Session_Key *, int); +void encrypt_end_input (void); +void encrypt_start_output (int); +void encrypt_end_output (void); +void encrypt_send_request_start (void); +void encrypt_send_request_end (void); +void encrypt_send_end (void); +void encrypt_wait (void); +int encrypt_is_encrypting (void); +void encrypt_send_support (void); +void encrypt_send_keyid (int, unsigned char *, int, int); +int net_write (unsigned char *, int); + +int encrypt_cmd (int, char **); +void encrypt_display (void); + +void krbdes_encrypt (unsigned char *, int); +int krbdes_decrypt (int); +int krbdes_is (unsigned char *, int); +int krbdes_reply (unsigned char *, int); +void krbdes_init (int); +int krbdes_start (int, int); +void krbdes_session (Session_Key *, int); +void krbdes_printsub (unsigned char *, int, unsigned char *, int); + +void cfb64_encrypt (unsigned char *, int); +int cfb64_decrypt (int); +void cfb64_init (int); +int cfb64_start (int, int); +int cfb64_is (unsigned char *, int); +int cfb64_reply (unsigned char *, int); +void cfb64_session (Session_Key *, int); +int cfb64_keyid (int, unsigned char *, int *); +void cfb64_printsub (unsigned char *, int, unsigned char *, int); + +void ofb64_encrypt (unsigned char *, int); +int ofb64_decrypt (int); +void ofb64_init (int); +int ofb64_start (int, int); +int ofb64_is (unsigned char *, int); +int ofb64_reply (unsigned char *, int); +void ofb64_session (Session_Key *, int); +int ofb64_keyid (int, unsigned char *, int *); +void ofb64_printsub (unsigned char *, int, unsigned char *, int); int KRB5_CALLCONV - des_new_random_key P((Block)); + des_new_random_key (Block); void KRB5_CALLCONV - des_set_random_generator_seed P((Block)); + des_set_random_generator_seed (Block); void KRB5_CALLCONV - des_key_sched P((Block, Schedule)); + des_key_sched (Block, Schedule); void KRB5_CALLCONV - des_ecb_encrypt P((Block, Block, Schedule, int)); + des_ecb_encrypt (Block, Block, Schedule, int); -/* int des_string_to_key P((char *, Block)); */ +/* int des_string_to_key (char *, Block); */ #ifdef DEBUG extern int encrypt_debug_mode; #endif -extern int (*decrypt_input) P((int)); -extern void (*encrypt_output) P((unsigned char *, int)); +extern int (*decrypt_input) (int); +extern void (*encrypt_output) (unsigned char *, int); int decrypt_ks_hack(unsigned char *, int); -- cgit