Published in <sxszo0af9k6.fsf@florida.arsdigita.de>.
+2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * progress.c (struct progress_implementation): Use PARAMS when
+ declaring the parameters of *create, *update, *finish, and
+ *set_params.
+
+ * netrc.c: Ditto.
+
+ * http.c: Reformat some function definitions so that ansi2knr can
+ read them.
+
+ * hash.c (struct hash_table): Use the PARAMS macro around
+ parameters in the declaration of hash_function and test_function.
+ (prime_size): Spell 2580823717UL and 3355070839UL as (unsigned
+ long)0x99d43ea5 and (unsigned long)0xc7fa5177 respectively, so
+ that pre-ANSI compilers can read them.
+ (find_mapping): Use PARAMS when declaring EQUALS.
+ (hash_table_put): Ditto.
+
+ * ftp.h: Wrap the parameters of ftp_index declaration in PARAMS.
+
+ * cookies.c (cookie_new): Use (unsigned long)0 instead of 0UL,
+ which was unsupported by pre-ANSI compilers.
+
+ From Nelson H. F. Beebe <beebe@math.utah.edu>, for the most part.
+
2002-04-11 Hrvoje Niksic <hniksic@arsdigita.com>
* url.c (url_filename): Use compose_file_name regardless of
/* If we don't know better, assume cookie is non-permanent and valid
for the entire session. */
- cookie->expiry_time = ~0UL;
+ cookie->expiry_time = ~(unsigned long)0;
/* Assume default port. */
cookie->port = 80;
struct fileinfo *ftp_parse_ls PARAMS ((const char *, const enum stype));
uerr_t ftp_loop PARAMS ((struct url *, int *));
-uerr_t ftp_index (const char *, struct url *, struct fileinfo *);
+uerr_t ftp_index PARAMS ((const char *, struct url *, struct fileinfo *));
char ftp_process_type PARAMS ((const char *));
};
struct hash_table {
- unsigned long (*hash_function) (const void *);
- int (*test_function) (const void *, const void *);
+ unsigned long (*hash_function) PARAMS ((const void *));
+ int (*test_function) PARAMS ((const void *, const void *));
int size; /* size of the array */
int count; /* number of non-empty, non-deleted
10445899, 13579681, 17653589, 22949669, 29834603, 38784989,
50420551, 65546729, 85210757, 110774011, 144006217, 187208107,
243370577, 316381771, 411296309, 534685237, 695090819, 903618083,
- 1174703521, 1527114613, 1985248999, 2580823717UL, 3355070839UL
+ 1174703521, 1527114613, 1985248999,
+ (unsigned long)0x99d43ea5, (unsigned long)0xc7fa5177
};
int i;
for (i = 0; i < ARRAY_SIZE (primes); i++)
struct mapping *mappings = ht->mappings;
int size = ht->size;
struct mapping *mp = mappings + HASH_POSITION (ht, key);
- int (*equals) (const void *, const void *) = ht->test_function;
+ int (*equals) PARAMS ((const void *, const void *)) = ht->test_function;
LOOP_NON_EMPTY (mp, mappings, size)
if (equals (key, mp->key))
{
struct mapping *mappings = ht->mappings;
int size = ht->size;
- int (*equals) (const void *, const void *) = ht->test_function;
+ int (*equals) PARAMS ((const void *, const void *)) = ht->test_function;
struct mapping *mp = mappings + HASH_POSITION (ht, key);
If a previous connection was persistent, it is closed. */
-static void
-register_persistent (const char *host, unsigned short port, int fd
#ifdef HAVE_SSL
- , SSL *ssl
-#endif
- )
+static void
+register_persistent (const char *host, unsigned short port, int fd, SSL *ssl)
{
+#else
+static void
+register_persistent (const char *host, unsigned short port, int fd)
+{
+#endif
if (pc_active_p)
{
if (pc_last_fd == fd)
/* Return non-zero if a persistent connection is available for
connecting to HOST:PORT. */
-static int
-persistent_available_p (const char *host, unsigned short port
#ifdef HAVE_SSL
- , int ssl
-#endif
- )
+static int
+persistent_available_p (const char *host, unsigned short port, int ssl)
{
+#else
+static int
+persistent_available_p (const char *host, unsigned short port)
+{
+#endif
int success;
struct address_list *this_host_ip;
null-terminated string once character to the left.
Used in processing \ and " constructs in the netrc file */
static void
-shift_left(char *string){
+shift_left(char *string)
+{
char *p;
for (p=string; *p; ++p)
struct progress_implementation {
char *name;
- void *(*create) (long, long);
- void (*update) (void *, long, long);
- void (*finish) (void *, long);
- void (*set_params) (const char *);
+ void *(*create) PARAMS ((long, long));
+ void (*update) PARAMS ((void *, long, long));
+ void (*finish) PARAMS ((void *, long));
+ void (*set_params) PARAMS ((const char *));
};
/* Necessary forward declarations. */