ANSI-ify a few straggler K&R-style function definitions.
We still had a couple of these left in ancient src/port/ files. Convert them to modern style in preparation for switching to a version of pg_bsd_indent that doesn't cope well with K&R style. Discussion: https://postgr.es/m/16886.1558104483@sss.pgh.pa.us
This commit is contained in:
parent
93f03dad82
commit
da71f98efb
|
@ -302,12 +302,7 @@ STATIC prtab(char *, unsigned char *, int);
|
||||||
|
|
||||||
#ifndef LARGEDATA
|
#ifndef LARGEDATA
|
||||||
STATIC
|
STATIC
|
||||||
permute(cp, out, p, chars_in)
|
permute(unsigned char *cp, C_block *out, C_block *p, int chars_in)
|
||||||
unsigned char *cp;
|
|
||||||
C_block *out;
|
|
||||||
C_block *p;
|
|
||||||
int chars_in;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
DCL_BLOCK(D, D0, D1);
|
DCL_BLOCK(D, D0, D1);
|
||||||
C_block *tp;
|
C_block *tp;
|
||||||
|
@ -490,9 +485,7 @@ extern char *__bcrypt(const char *, const char *); /* XXX */
|
||||||
* followed by an encryption produced by the "key" and "setting".
|
* followed by an encryption produced by the "key" and "setting".
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
crypt(key, setting)
|
crypt(const char *key, const char *setting)
|
||||||
const char *key;
|
|
||||||
const char *setting;
|
|
||||||
{
|
{
|
||||||
char *encp;
|
char *encp;
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
@ -631,8 +624,7 @@ static volatile int des_ready = 0;
|
||||||
* Set up the key schedule from the key.
|
* Set up the key schedule from the key.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
des_setkey(key)
|
des_setkey(const char *key)
|
||||||
const char *key;
|
|
||||||
{
|
{
|
||||||
DCL_BLOCK(K, K0, K1);
|
DCL_BLOCK(K, K0, K1);
|
||||||
C_block *ptabp;
|
C_block *ptabp;
|
||||||
|
@ -664,11 +656,7 @@ const char *key;
|
||||||
* compiler and machine architecture.
|
* compiler and machine architecture.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
des_cipher(in, out, salt, num_iter)
|
des_cipher(const char *in, char *out, long salt, int num_iter)
|
||||||
const char *in;
|
|
||||||
char *out;
|
|
||||||
long salt;
|
|
||||||
int num_iter;
|
|
||||||
{
|
{
|
||||||
/* variables that we want in registers, most important first */
|
/* variables that we want in registers, most important first */
|
||||||
#if defined(pdp11)
|
#if defined(pdp11)
|
||||||
|
@ -808,7 +796,7 @@ int num_iter;
|
||||||
* done at compile time, if the compiler were capable of that sort of thing.
|
* done at compile time, if the compiler were capable of that sort of thing.
|
||||||
*/
|
*/
|
||||||
STATIC
|
STATIC
|
||||||
init_des()
|
init_des(void)
|
||||||
{
|
{
|
||||||
int i,
|
int i,
|
||||||
j;
|
j;
|
||||||
|
@ -973,12 +961,10 @@ init_des()
|
||||||
* "perm" must be all-zeroes on entry to this routine.
|
* "perm" must be all-zeroes on entry to this routine.
|
||||||
*/
|
*/
|
||||||
STATIC
|
STATIC
|
||||||
init_perm(perm, p, chars_in, chars_out)
|
init_perm(C_block perm[64 / CHUNKBITS][1 << CHUNKBITS],
|
||||||
C_block perm[64 / CHUNKBITS][1 << CHUNKBITS];
|
unsigned char p[64],
|
||||||
unsigned char p[64];
|
|
||||||
int chars_in,
|
int chars_in,
|
||||||
chars_out;
|
int chars_out)
|
||||||
|
|
||||||
{
|
{
|
||||||
int i,
|
int i,
|
||||||
j,
|
j,
|
||||||
|
@ -1005,8 +991,7 @@ int chars_in,
|
||||||
*/
|
*/
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
int
|
int
|
||||||
setkey(key)
|
setkey(const char *key)
|
||||||
const char *key;
|
|
||||||
{
|
{
|
||||||
int i,
|
int i,
|
||||||
j,
|
j,
|
||||||
|
@ -1030,9 +1015,7 @@ const char *key;
|
||||||
* "encrypt" routine (for backwards compatibility)
|
* "encrypt" routine (for backwards compatibility)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
encrypt(block, flag)
|
encrypt(char *block, int flag)
|
||||||
char *block;
|
|
||||||
int flag;
|
|
||||||
{
|
{
|
||||||
int i,
|
int i,
|
||||||
j,
|
j,
|
||||||
|
@ -1066,11 +1049,7 @@ int flag;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
STATIC
|
STATIC
|
||||||
prtab(s, t, num_rows)
|
prtab(char *s, unsigned char *t, int num_rows)
|
||||||
char *s;
|
|
||||||
unsigned char *t;
|
|
||||||
int num_rows;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int i,
|
int i,
|
||||||
j;
|
j;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#if HAVE_IEEEFP_H
|
#if HAVE_IEEEFP_H
|
||||||
#include <ieeefp.h>
|
#include <ieeefp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
isinf(double d)
|
isinf(double d)
|
||||||
{
|
{
|
||||||
|
@ -44,9 +45,9 @@ isinf(double d)
|
||||||
#if HAVE_FP_CLASS_H
|
#if HAVE_FP_CLASS_H
|
||||||
#include <fp_class.h>
|
#include <fp_class.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
isinf(x)
|
isinf(double x)
|
||||||
double x;
|
|
||||||
{
|
{
|
||||||
#if HAVE_FP_CLASS
|
#if HAVE_FP_CLASS
|
||||||
int fpclass = fp_class(x);
|
int fpclass = fp_class(x);
|
||||||
|
@ -60,7 +61,9 @@ double x;
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(HAVE_CLASS)
|
#elif defined(HAVE_CLASS)
|
||||||
|
|
||||||
int
|
int
|
||||||
isinf(double x)
|
isinf(double x)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +75,7 @@ isinf(double x)
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue