diff libpurple/ciphers/des.c @ 31802:ca94413ccd0e

Named initializers and most other C99isms don't work in Visual C++ .NET 2005 in C mode. This is troublesome for Instantbird. This remedies the problem for the cipher code, which allows Instantbird's libpurple build to work again. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author Florian Quèze <florian@instantbird.org>
date Sun, 13 Mar 2011 16:47:36 +0000
parents 2d3c1197f930
children
line wrap: on
line diff
--- a/libpurple/ciphers/des.c	Sun Mar 13 16:43:09 2011 +0000
+++ b/libpurple/ciphers/des.c	Sun Mar 13 16:47:36 2011 +0000
@@ -460,11 +460,24 @@
 }
 
 static PurpleCipherOps DESOps = {
-	.init = des_init,
-	.uninit = des_uninit,
-	.encrypt = des_encrypt,
-	.decrypt = des_decrypt,
-	.set_key = des_set_key,
+	NULL,              /* Set option */
+	NULL,              /* Get option */
+	des_init,          /* init */
+ 	NULL,              /* reset */
+	des_uninit,        /* uninit */
+	NULL,              /* set iv */
+	NULL,              /* append */
+	NULL,              /* digest */
+	des_encrypt,       /* encrypt */
+	des_decrypt,       /* decrypt */
+	NULL,              /* set salt */
+	NULL,              /* get salt size */
+	des_set_key,       /* set key */
+	NULL,              /* get key size */
+	NULL,              /* set batch mode */
+	NULL,              /* get batch mode */
+	NULL,              /* get block size */
+	NULL               /* set key with len */
 };
 
 /******************************************************************************
@@ -798,14 +811,24 @@
 }
 
 static PurpleCipherOps DES3Ops = {
-	.init = des3_init,
-	.uninit = des3_uninit,
-	.set_iv = des3_set_iv,
-	.encrypt = des3_encrypt,
-	.decrypt = des3_decrypt,
-	.set_key = des3_set_key,
-	.set_batch_mode = des3_set_batch,
-	.get_batch_mode = des3_get_batch,
+	NULL,              /* Set option */
+	NULL,              /* Get option */
+	des3_init,         /* init */
+	NULL,              /* reset */
+	des3_uninit,       /* uninit */
+	des3_set_iv,       /* set iv */
+	NULL,              /* append */
+	NULL,              /* digest */
+	des3_encrypt,      /* encrypt */
+	des3_decrypt,      /* decrypt */
+	NULL,              /* set salt */
+	NULL,              /* get salt size */
+	des3_set_key,      /* set key */
+	NULL,              /* get key size */
+	des3_set_batch,    /* set batch mode */
+	des3_get_batch,    /* get batch mode */
+	NULL,              /* get block size */
+	NULL               /* set key with len */
 };
 
 /******************************************************************************