Skip to content

Commit 4ff7537

Browse files
committed
More C style to D style array decalaration.
1 parent 90a7409 commit 4ff7537

File tree

18 files changed

+31
-31
lines changed

18 files changed

+31
-31
lines changed

deimos/openssl/aes.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ nothrow:
7575
/* This should be a hidden type, but EVP requires that the size be known */
7676
struct aes_key_st {
7777
version (AES_LONG) {
78-
c_ulong rd_key[4* (AES_MAXNR + 1)];
78+
c_ulong[4* (AES_MAXNR + 1)] rd_key;
7979
} else {
80-
uint rd_key[4* (AES_MAXNR + 1)];
80+
uint[4* (AES_MAXNR + 1)] rd_key;
8181
}
8282
int rounds;
8383
};
@@ -119,8 +119,8 @@ void AES_ofb128_encrypt(const(ubyte)* in_, ubyte* out_,
119119
ubyte* ivec, int* num);
120120
void AES_ctr128_encrypt(const(ubyte)* in_, ubyte* out_,
121121
size_t length, const(AES_KEY)* key,
122-
ubyte ivec[AES_BLOCK_SIZE],
123-
ubyte ecount_buf[AES_BLOCK_SIZE],
122+
ubyte[AES_BLOCK_SIZE] ivec,
123+
ubyte[AES_BLOCK_SIZE] ecount_buf,
124124
uint* num);
125125
/* NB: the IV is _two_ blocks long */
126126
void AES_ige_encrypt(const(ubyte)* in_, ubyte* out_,

deimos/openssl/asn1t.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ nothrow:
148148
*/
149149
150150
#define ASN1_SEQUENCE(tname) \
151-
static const ASN1_TEMPLATE tname##_seq_tt[]
151+
static const ASN1_TEMPLATE[] tname##_seq_tt
152152
153153
#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
154154
@@ -252,7 +252,7 @@ nothrow:
252252
*/
253253
254254
#define ASN1_CHOICE(tname) \
255-
static const ASN1_TEMPLATE tname##_ch_tt[]
255+
static const ASN1_TEMPLATE[] tname##_ch_tt
256256
257257
#define ASN1_CHOICE_cb(tname, cb) \
258258
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \
@@ -392,7 +392,7 @@ nothrow:
392392
/* Macros for the ASN1_ADB structure */
393393
394394
#define ASN1_ADB(name) \
395-
static const ASN1_ADB_TABLE name##_adbtbl[]
395+
static const ASN1_ADB_TABLE[] name##_adbtbl
396396
397397
#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
398398

deimos/openssl/blowfish.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ enum BF_ROUNDS = 16;
100100
enum BF_BLOCK = 8;
101101

102102
struct bf_key_st {
103-
BF_LONG P[BF_ROUNDS+2];
104-
BF_LONG S[4*256];
103+
BF_LONG[BF_ROUNDS+2] P;
104+
BF_LONG[4*256] S;
105105
}
106106
alias bf_key_st BF_KEY;
107107

deimos/openssl/camellia.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ void Camellia_ofb128_encrypt(const(ubyte)* in_, ubyte* out_,
120120
ubyte* ivec, int* num);
121121
void Camellia_ctr128_encrypt(const(ubyte)* in_, ubyte* out_,
122122
size_t length, const(CAMELLIA_KEY)* key,
123-
ubyte ivec[CAMELLIA_BLOCK_SIZE],
124-
ubyte ecount_buf[CAMELLIA_BLOCK_SIZE],
123+
ubyte[CAMELLIA_BLOCK_SIZE] ivec,
124+
ubyte[CAMELLIA_BLOCK_SIZE] ecount_buf,
125125
uint* num);

deimos/openssl/cast_.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ enum CAST_BLOCK = 8;
7878
enum CAST_KEY_LENGTH = 16;
7979

8080
struct cast_key_st {
81-
CAST_LONG data[32];
81+
CAST_LONG[32] data;
8282
int short_key; /* Use reduced rounds for short key */
8383
}
8484
alias cast_key_st CAST_KEY;

deimos/openssl/des.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct DES_ks
8383
DES_cblock cblock;
8484
/* make sure things are correct size on machines with
8585
* 8 byte longs */
86-
DES_LONG deslong[2];
86+
DES_LONG[2] deslong;
8787
}
8888
ks_[16] ks;
8989
}
@@ -205,7 +205,7 @@ void DES_ofb_encrypt(const(ubyte)* in_,ubyte* out_,int numbits,
205205
void DES_pcbc_encrypt(const(ubyte)* input,ubyte* output,
206206
c_long length,DES_key_schedule* schedule,DES_cblock* ivec,
207207
int enc);
208-
DES_LONG DES_quad_cksum(const(ubyte)* input,DES_cblock output[],
208+
DES_LONG DES_quad_cksum(const(ubyte)* input,DES_cblock[] output,
209209
c_long length,int out_count,DES_cblock* seed);
210210
int DES_random_key(DES_cblock* ret);
211211
void DES_set_odd_parity(DES_cblock* key);

deimos/openssl/ebcdic.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ alias _openssl_os_toebcdic os_toebcdic;
1010
alias _openssl_ebcdic2ascii ebcdic2ascii;
1111
alias _openssl_ascii2ebcdic ascii2ebcdic;
1212

13-
extern const ubyte _openssl_os_toascii[256];
14-
extern const ubyte _openssl_os_toebcdic[256];
13+
extern const ubyte[256] _openssl_os_toascii;
14+
extern const ubyte[256] _openssl_os_toebcdic;
1515
void* _openssl_ebcdic2ascii(void* dest, const(void)* srce, size_t count);
1616
void* _openssl_ascii2ebcdic(void* dest, const(void)* srce, size_t count);

deimos/openssl/ec.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ int EC_POINTs_make_affine(const(EC_GROUP)* group, size_t num, EC_POINT*[] points
637637
* \param ctx BN_CTX object (optional)
638638
* \return 1 on success and 0 if an error occured
639639
*/
640-
int EC_POINTs_mul(const(EC_GROUP)* group, EC_POINT* r, const(BIGNUM)* n, size_t num, const(EC_POINT)* p[], const(BIGNUM)* m[], BN_CTX* ctx);
640+
int EC_POINTs_mul(const(EC_GROUP)* group, EC_POINT* r, const(BIGNUM)* n, size_t num, const(EC_POINT)*[] p, const(BIGNUM)*[] m, BN_CTX* ctx);
641641

642642
/** Computes r = generator* n + q* m
643643
* \param group underlying EC_GROUP object

deimos/openssl/idea.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern (C):
7676
nothrow:
7777

7878
struct idea_key_st {
79-
IDEA_INT data[9][6];
79+
IDEA_INT[9][6] data;
8080
}
8181
alias idea_key_st IDEA_KEY_SCHEDULE;
8282

deimos/openssl/md4.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ enum MD4_DIGEST_LENGTH = 16;
101101
struct MD4state_st {
102102
MD4_LONG A,B,C,D;
103103
MD4_LONG Nl,Nh;
104-
MD4_LONG data[MD4_LBLOCK];
104+
MD4_LONG[MD4_LBLOCK] data;
105105
uint num;
106106
}
107107
alias MD4state_st MD4_CTX;

0 commit comments

Comments
 (0)