From 514966789a3d510160d798645ece92c94505ee79 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sat, 6 Apr 1996 00:47:39 +0000 Subject: [PATCH] use "void *" instead of "caddr_t" everywhere --- src/comm.cc | 8 ++++---- src/disk.cc | 46 +++++++++++++++++++++++----------------------- src/ftp.cc | 30 +++++++++++++++--------------- src/gopher.cc | 28 ++++++++++++++-------------- src/http.cc | 44 ++++++++++++++++++++++---------------------- src/ipcache.cc | 12 ++++++------ src/stat.cc | 8 ++++---- src/store.cc | 16 ++++++++-------- src/wais.cc | 28 ++++++++++++++-------------- 9 files changed, 110 insertions(+), 110 deletions(-) diff --git a/src/comm.cc b/src/comm.cc index 41aa1437cc..f6c474f54f 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,5 +1,5 @@ -/* $Id: comm.cc,v 1.14 1996/04/01 18:21:48 wessels Exp $ */ +/* $Id: comm.cc,v 1.15 1996/04/05 17:47:39 wessels Exp $ */ /* DEBUG: Section 5 comm: socket level functions */ @@ -702,7 +702,7 @@ int comm_set_select_handler(fd, type, handler, client_data) unsigned int type; /* 01 - read; 10 - write; 100 - except; 1000 - timeout ; 10000 - lifetime */ int (*handler) (); - caddr_t client_data; + void * client_data; { return (comm_set_select_handler_plus_timeout(fd, type, handler, client_data, 0)); @@ -714,7 +714,7 @@ int comm_set_select_handler_plus_timeout(fd, type, handler, client_data, timeout unsigned int type; /* 01 - read; 10 - write; 100 - except; 1000 - timeout ; 10000 - lifetime */ int (*handler) (); - caddr_t client_data; + void * client_data; time_t timeout; { if (type & COMM_SELECT_TIMEOUT) { @@ -749,7 +749,7 @@ int comm_get_select_handler(fd, type, handler_ptr, client_data_ptr) int fd; unsigned int type; int (**handler_ptr) (); - caddr_t *client_data_ptr; + void **client_data_ptr; { if (type & COMM_SELECT_TIMEOUT) { *handler_ptr = fd_table[fd].timeout_handler; diff --git a/src/disk.cc b/src/disk.cc index 16690a9a54..91319f3963 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -1,4 +1,4 @@ -/* $Id: disk.cc,v 1.7 1996/03/29 21:16:08 wessels Exp $ */ +/* $Id: disk.cc,v 1.8 1996/04/05 17:47:41 wessels Exp $ */ /* DEBUG: Section 6 disk: disk I/O routines */ @@ -14,9 +14,9 @@ typedef struct _dread_ctrl { char *buf; int cur_len; int end_of_file; - int (*handler) _PARAMS((int fd, char *buf, int size, int errflag, caddr_t data, + int (*handler) _PARAMS((int fd, char *buf, int size, int errflag, void * data, int offset)); - caddr_t client_data; + void * client_data; } dread_ctrl; typedef struct _dwalk_ctrl { @@ -24,14 +24,14 @@ typedef struct _dwalk_ctrl { off_t offset; char *buf; /* line buffer */ int cur_len; /* line len */ - int (*handler) _PARAMS((int fd, int errflag, caddr_t data)); - caddr_t client_data; - int (*line_handler) _PARAMS((int fd, char *buf, int size, caddr_t line_data)); - caddr_t line_data; + int (*handler) _PARAMS((int fd, int errflag, void * data)); + void * client_data; + int (*line_handler) _PARAMS((int fd, char *buf, int size, void * line_data)); + void * line_data; } dwalk_ctrl; typedef struct _dwrite_q { - caddr_t buf; + char *buf; int len; int cur_offset; struct _dwrite_q *next; @@ -290,7 +290,7 @@ int diskHandleWrite(fd, entry) lseek(fd, 0, SEEK_END); for (;;) { - len = write(fd, entry->write_q->buf + entry->write_q->cur_offset, + len = write(fd, (entry->write_q->buf) + entry->write_q->cur_offset, entry->write_q->len - entry->write_q->cur_offset); file_table[fd].at_eof = YES; @@ -305,7 +305,7 @@ int diskHandleWrite(fd, entry) comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) diskHandleWrite, - (caddr_t) entry); + (void *) entry); entry->write_daemon = PRESENT; return DISK_OK; default: @@ -372,14 +372,14 @@ int diskHandleWrite(fd, entry) safe_free(q); /* Schedule next write * comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) diskHandleWrite, - * (caddr_t) entry); + * (void *) entry); */ entry->write_daemon = PRESENT; /* Repeat loop */ } else { /* !Block_completed; block incomplete */ /* reschedule */ comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) diskHandleWrite, - (caddr_t) entry); + (void *) entry); entry->write_daemon = PRESENT; return DISK_OK; } @@ -393,7 +393,7 @@ int diskHandleWrite(fd, entry) /* call a handle when writing is complete. */ int file_write(fd, ptr_to_buf, len, access_code, handle, handle_data) int fd; - caddr_t ptr_to_buf; + char* ptr_to_buf; int len; int access_code; void (*handle) (); @@ -434,7 +434,7 @@ int file_write(fd, ptr_to_buf, len, access_code, handle, handle_data) if (file_table[fd].write_daemon == NOT_PRESENT) { /* got to start write routine for this fd */ comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) diskHandleWrite, - (caddr_t) & file_table[fd]); + (void *) & file_table[fd]); } return DISK_OK; } @@ -484,7 +484,7 @@ int diskHandleRead(fd, ctrl_dat) /* reschedule if need more data. */ if (ctrl_dat->cur_len < ctrl_dat->req_len) { comm_set_select_handler(fd, COMM_SELECT_READ, (PF) diskHandleRead, - (caddr_t) ctrl_dat); + (void *) ctrl_dat); return DISK_OK; } else { /* all data we need is here. */ @@ -503,11 +503,11 @@ int diskHandleRead(fd, ctrl_dat) * call handler when a reading is complete. */ int file_read(fd, buf, req_len, offset, handler, client_data) int fd; - caddr_t buf; + char *buf; int req_len; int offset; FILE_READ_HD handler; - caddr_t client_data; + void * client_data; { dread_ctrl *ctrl_dat; @@ -523,7 +523,7 @@ int file_read(fd, buf, req_len, offset, handler, client_data) ctrl_dat->client_data = client_data; comm_set_select_handler(fd, COMM_SELECT_READ, (PF) diskHandleRead, - (caddr_t) ctrl_dat); + (void *) ctrl_dat); return DISK_OK; } @@ -590,7 +590,7 @@ int diskHandleWalk(fd, walk_dat) /* reschedule it for next line. */ comm_set_select_handler(fd, COMM_SELECT_READ, (PF) diskHandleWalk, - (caddr_t) walk_dat); + (void *) walk_dat); return DISK_OK; } @@ -602,9 +602,9 @@ int diskHandleWalk(fd, walk_dat) int file_walk(fd, handler, client_data, line_handler, line_data) int fd; FILE_WALK_HD handler; - caddr_t client_data; + void * client_data; FILE_WALK_LHD line_handler; - caddr_t line_data; + void * line_data; { dwalk_ctrl *walk_dat; @@ -613,7 +613,7 @@ int file_walk(fd, handler, client_data, line_handler, line_data) memset(walk_dat, '\0', sizeof(dwalk_ctrl)); walk_dat->fd = fd; walk_dat->offset = 0; - walk_dat->buf = (caddr_t) xcalloc(1, DISK_LINE_LEN); + walk_dat->buf = (void *) xcalloc(1, DISK_LINE_LEN); walk_dat->cur_len = 0; walk_dat->handler = handler; walk_dat->client_data = client_data; @@ -621,7 +621,7 @@ int file_walk(fd, handler, client_data, line_handler, line_data) walk_dat->line_data = line_data; comm_set_select_handler(fd, COMM_SELECT_READ, (PF) diskHandleWalk, - (caddr_t) walk_dat); + (void *) walk_dat); return DISK_OK; } diff --git a/src/ftp.cc b/src/ftp.cc index e6c09da76c..e81d416c8e 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,4 +1,4 @@ -/* $Id: ftp.cc,v 1.21 1996/04/04 18:41:24 wessels Exp $ */ +/* $Id: ftp.cc,v 1.22 1996/04/05 17:47:42 wessels Exp $ */ /* * DEBUG: Section 9 ftp: FTP @@ -161,7 +161,7 @@ int ftpReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) ftpReadReply, - (caddr_t) data); + (void *) data); comm_set_stall(fd, getStallDelay()); /* dont try reading again for a while */ return 0; } @@ -182,7 +182,7 @@ int ftpReadReply(fd, data) /* reinstall handlers */ /* XXX This may loop forever */ comm_set_select_handler(fd, COMM_SELECT_READ, - (PF) ftpReadReply, (caddr_t) data); + (PF) ftpReadReply, (void *) data); /* note there is no ftpReadReplyTimeout. Timeouts are handled * by `ftpget'. */ } else { @@ -220,7 +220,7 @@ int ftpReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) ftpReadReply, - (caddr_t) data); + (void *) data); } else if (entry->flag & CLIENT_ABORT_REQUEST) { /* append the last bit of info we get */ storeAppend(entry, buf, len); @@ -239,11 +239,11 @@ int ftpReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) ftpReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) ftpLifetimeExpire, - (caddr_t) data, + (void *) data, getReadTimeout()); } return 0; @@ -277,11 +277,11 @@ void ftpSendComplete(fd, buf, size, errflag, data) comm_set_select_handler(data->ftp_fd, COMM_SELECT_READ, (PF) ftpReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(data->ftp_fd, COMM_SELECT_TIMEOUT, (PF) ftpLifetimeExpire, - (caddr_t) data, getReadTimeout()); + (void *) data, getReadTimeout()); } } @@ -367,7 +367,7 @@ void ftpSendRequest(fd, data) strcat(buf, data->password); strcat(buf, space); debug(9, 5, "ftpSendRequest: FD %d: buf '%s'\n", fd, buf); - data->icp_rwd_ptr = icpWrite(fd, buf, strlen(buf), 30, ftpSendComplete, (caddr_t) data); + data->icp_rwd_ptr = icpWrite(fd, buf, strlen(buf), 30, ftpSendComplete, (void *) data); } void ftpConnInProgress(fd, data) @@ -386,7 +386,7 @@ void ftpConnInProgress(fd, data) comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) ftpConnInProgress, - (caddr_t) data); + (void *) data); return; case EISCONN: debug(9, 5, "ftpConnInProgress: FD %d is now connected.", fd); @@ -400,7 +400,7 @@ void ftpConnInProgress(fd, data) comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) ftpSendRequest, - (caddr_t) data); + (void *) data); } @@ -443,9 +443,9 @@ int ftpStart(unusedfd, url, entry) } else { debug(9, 5, "ftpStart: FD %d: EINPROGRESS.\n", data->ftp_fd); comm_set_select_handler(data->ftp_fd, COMM_SELECT_LIFETIME, - (PF) ftpLifetimeExpire, (caddr_t) data); + (PF) ftpLifetimeExpire, (void *) data); comm_set_select_handler(data->ftp_fd, COMM_SELECT_WRITE, - (PF) ftpConnInProgress, (caddr_t) data); + (PF) ftpConnInProgress, (void *) data); return COMM_OK; } } @@ -458,13 +458,13 @@ int ftpStart(unusedfd, url, entry) comm_set_select_handler(data->ftp_fd, COMM_SELECT_WRITE, (PF) ftpSendRequest, - (caddr_t) data); + (void *) data); comm_set_fd_lifetime(data->ftp_fd, getClientLifetime()); comm_set_select_handler(data->ftp_fd, COMM_SELECT_LIFETIME, (PF) ftpLifetimeExpire, - (caddr_t) data); + (void *) data); if (!BIT_TEST(entry->flag, ENTRY_PRIVATE)) storeSetPublicKey(entry); /* Make it public */ diff --git a/src/gopher.cc b/src/gopher.cc index e716a209f1..c120ed567d 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,4 +1,4 @@ -/* $Id: gopher.cc,v 1.16 1996/04/05 17:22:19 wessels Exp $ */ +/* $Id: gopher.cc,v 1.17 1996/04/05 17:47:42 wessels Exp $ */ /* * DEBUG: Section 10 gopher: GOPHER @@ -633,12 +633,12 @@ int gopherReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) gopherReadReply, - (caddr_t) data); + (void *) data); /* don't install read timeout until we are below the GAP */ comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) NULL, - (caddr_t) NULL, + (void *) NULL, (time_t) 0); comm_set_stall(fd, getStallDelay()); /* dont try reading again for a while */ return 0; @@ -661,9 +661,9 @@ int gopherReadReply(fd, data) /* reinstall handlers */ /* XXX This may loop forever */ comm_set_select_handler(fd, COMM_SELECT_READ, - (PF) gopherReadReply, (caddr_t) data); + (PF) gopherReadReply, (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, - (PF) gopherReadReplyTimeout, (caddr_t) data, getReadTimeout()); + (PF) gopherReadReplyTimeout, (void *) data, getReadTimeout()); } else { BIT_RESET(entry->flag, CACHABLE); BIT_SET(entry->flag, RELEASE_REQUEST); @@ -698,11 +698,11 @@ int gopherReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) gopherReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) gopherReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } else if (entry->flag & CLIENT_ABORT_REQUEST) { /* append the last bit of info we got */ @@ -725,11 +725,11 @@ int gopherReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) gopherReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) gopherReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } put_free_4k_page(buf, __FILE__, __LINE__); @@ -797,11 +797,11 @@ void gopherSendComplete(fd, buf, size, errflag, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) gopherReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) gopherReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); comm_set_fd_lifetime(fd, -1); /* disable */ @@ -846,7 +846,7 @@ int gopherSendRequest(fd, data) len, 30, gopherSendComplete, - (caddr_t) data); + (void *) data); return 0; } @@ -922,11 +922,11 @@ int gopherStart(unusedfd, url, entry) comm_set_select_handler(sock, COMM_SELECT_LIFETIME, (PF) gopherLifetimeExpire, - (caddr_t) data); + (void *) data); comm_set_select_handler(sock, COMM_SELECT_WRITE, (PF) gopherSendRequest, - (caddr_t) data); + (void *) data); if (!BIT_TEST(entry->flag, ENTRY_PRIVATE)) storeSetPublicKey(entry); /* Make it public */ diff --git a/src/http.cc b/src/http.cc index 4f10143c0f..a08208e861 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,4 +1,4 @@ -/* $Id: http.cc,v 1.30 1996/04/05 17:22:20 wessels Exp $ */ +/* $Id: http.cc,v 1.31 1996/04/05 17:47:43 wessels Exp $ */ /* * DEBUG: Section 11 http: HTTP @@ -281,12 +281,12 @@ static void httpReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) httpReadReply, - (caddr_t) data); + (void *) data); /* don't install read timeout until we are below the GAP */ comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) NULL, - (caddr_t) NULL, + (void *) NULL, (time_t) 0); /* dont try reading again for a while */ comm_set_stall(fd, getStallDelay()); @@ -310,9 +310,9 @@ static void httpReadReply(fd, data) /* reinstall handlers */ /* XXX This may loop forever */ comm_set_select_handler(fd, COMM_SELECT_READ, - (PF) httpReadReply, (caddr_t) data); + (PF) httpReadReply, (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, - (PF) httpReadReplyTimeout, (caddr_t) data, getReadTimeout()); + (PF) httpReadReplyTimeout, (void *) data, getReadTimeout()); } else { BIT_RESET(entry->flag, CACHABLE); BIT_SET(entry->flag, RELEASE_REQUEST); @@ -336,11 +336,11 @@ static void httpReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) httpReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) httpReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } else if (entry->flag & CLIENT_ABORT_REQUEST) { /* append the last bit of info we get */ @@ -354,11 +354,11 @@ static void httpReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) httpReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) httpReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } } @@ -394,11 +394,11 @@ static void httpSendComplete(fd, buf, size, errflag, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) httpReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) httpReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); comm_set_fd_lifetime(fd, -1); /* disable lifetime DPW */ } @@ -476,7 +476,7 @@ static void httpSendRequest(fd, data) len, 30, httpSendComplete, - (caddr_t) data); + (void *) data); } static void httpConnInProgress(fd, data) @@ -496,7 +496,7 @@ static void httpConnInProgress(fd, data) comm_set_select_handler(fd, COMM_SELECT_WRITE, (PF) httpConnInProgress, - (caddr_t) data); + (void *) data); return; case EISCONN: break; /* cool, we're connected */ @@ -508,7 +508,7 @@ static void httpConnInProgress(fd, data) } /* Call the real write handler, now that we're fully connected */ comm_set_select_handler(fd, COMM_SELECT_WRITE, - (PF) httpSendRequest, (caddr_t) data); + (PF) httpSendRequest, (void *) data); } int proxyhttpStart(e, url, entry) @@ -564,18 +564,18 @@ int proxyhttpStart(e, url, entry) } else { debug(11, 5, "proxyhttpStart: FD %d: EINPROGRESS.\n", sock); comm_set_select_handler(sock, COMM_SELECT_LIFETIME, - (PF) httpLifetimeExpire, (caddr_t) data); + (PF) httpLifetimeExpire, (void *) data); comm_set_select_handler(sock, COMM_SELECT_WRITE, - (PF) httpConnInProgress, (caddr_t) data); + (PF) httpConnInProgress, (void *) data); return COMM_OK; } } /* Install connection complete handler. */ fd_note(sock, entry->url); comm_set_select_handler(sock, COMM_SELECT_LIFETIME, - (PF) httpLifetimeExpire, (caddr_t) data); + (PF) httpLifetimeExpire, (void *) data); comm_set_select_handler(sock, COMM_SELECT_WRITE, - (PF) httpSendRequest, (caddr_t) data); + (PF) httpSendRequest, (void *) data); return COMM_OK; } @@ -631,17 +631,17 @@ int httpStart(unusedfd, url, type, req_hdr, entry) } else { debug(11, 5, "httpStart: FD %d: EINPROGRESS.\n", sock); comm_set_select_handler(sock, COMM_SELECT_LIFETIME, - (PF) httpLifetimeExpire, (caddr_t) data); + (PF) httpLifetimeExpire, (void *) data); comm_set_select_handler(sock, COMM_SELECT_WRITE, - (PF) httpConnInProgress, (caddr_t) data); + (PF) httpConnInProgress, (void *) data); return COMM_OK; } } /* Install connection complete handler. */ fd_note(sock, entry->url); comm_set_select_handler(sock, COMM_SELECT_LIFETIME, - (PF) httpLifetimeExpire, (caddr_t) data); + (PF) httpLifetimeExpire, (void *) data); comm_set_select_handler(sock, COMM_SELECT_WRITE, - (PF) httpSendRequest, (caddr_t) data); + (PF) httpSendRequest, (void *) data); return COMM_OK; } diff --git a/src/ipcache.cc b/src/ipcache.cc index 6c0345dabe..76424a45cd 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,4 +1,4 @@ -/* $Id: ipcache.cc,v 1.12 1996/04/04 05:19:49 wessels Exp $ */ +/* $Id: ipcache.cc,v 1.13 1996/04/05 17:47:45 wessels Exp $ */ /* * DEBUG: Section 14 ipcache: IP Cache @@ -25,7 +25,7 @@ long ipcache_high = 200; typedef struct _ip_pending { int fd; IPH handler; - caddr_t data; + void * data; struct _ip_pending *next; } IpPending; @@ -551,7 +551,7 @@ void ipcache_call_pending(entry) void ipcache_call_pending_badname(fd, handler, data) int fd; IPH handler; - caddr_t data; + void * data; { debug(14, 4, "ipcache_call_pending_badname: Bad Name: Calling handler with NULL result.\n"); handler(fd, NULL, data); @@ -929,7 +929,7 @@ int ipcache_dnsHandleRead(fd, data) } /* reschedule */ comm_set_select_handler(data->inpipe, COMM_SELECT_READ, - (PF) ipcache_dnsHandleRead, (caddr_t) data); + (PF) ipcache_dnsHandleRead, (void *) data); return 0; } @@ -937,7 +937,7 @@ int ipcache_nbgethostbyname(name, fd, handler, data) char *name; int fd; IPH handler; - caddr_t data; + void * data; { ipcache_entry *e; IpPending *pending; @@ -1145,7 +1145,7 @@ void ipcache_init() comm_set_select_handler(dns_child_table[i]->inpipe, COMM_SELECT_READ, (PF) ipcache_dnsHandleRead, - (caddr_t) dns_child_table[i]); + (void *) dns_child_table[i]); debug(14, 3, "ipcache_init: 'dns_server' %d started\n", i); } } diff --git a/src/stat.cc b/src/stat.cc index d7901f82c5..2351a3a514 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,4 +1,4 @@ -/* $Id: stat.cc,v 1.16 1996/04/04 18:41:27 wessels Exp $ */ +/* $Id: stat.cc,v 1.17 1996/04/05 17:47:47 wessels Exp $ */ /* * DEBUG: Section 18 stat @@ -271,7 +271,7 @@ void log_get_start(obj, sentry) strcpy(tmp, open_bracket); storeAppend(sentry, tmp, 2); file_walk(obj->logfile_fd, (FILE_WALK_HD) logReadEndHandler, - (caddr_t) data, (FILE_WALK_LHD) logReadHandler, (caddr_t) data); + (void *) data, (FILE_WALK_LHD) logReadHandler, (void *) data); return; } @@ -319,8 +319,8 @@ void cached_get_start(obj, sentry) data->sentry = sentry; data->fd = file_open((char *) config_file, NULL, O_RDONLY); storeAppend(sentry, open_bracket, (int) strlen(open_bracket)); - file_walk(data->fd, (FILE_WALK_HD) cachedReadEndHandler, (caddr_t) data, - (FILE_WALK_LHD) cachedReadHandler, (caddr_t) data); + file_walk(data->fd, (FILE_WALK_HD) cachedReadEndHandler, (void *) data, + (FILE_WALK_LHD) cachedReadHandler, (void *) data); } diff --git a/src/store.cc b/src/store.cc index 8a79803a0c..fa1bc75ce6 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,5 +1,5 @@ -/* $Id: store.cc,v 1.30 1996/04/05 16:57:27 wessels Exp $ */ +/* $Id: store.cc,v 1.31 1996/04/05 17:47:48 wessels Exp $ */ /* * DEBUG: Section 20 store @@ -624,7 +624,7 @@ int storeRegister(e, fd, handler, data) StoreEntry *e; int fd; PIF handler; - caddr_t data; + void * data; { PendingEntry *pe = (PendingEntry *) xmalloc(sizeof(PendingEntry)); int old_size, i, j; @@ -919,7 +919,7 @@ int storeSwapInHandle(fd_notused, buf, len, flag, e, offset_notused) SWAP_BUF, e->mem_obj->swap_offset, (FILE_READ_HD) storeSwapInHandle, - (caddr_t) e); + (void *) e); } else { /* complete swapping in */ storeSetMemStatus(e, IN_MEMORY); @@ -984,7 +984,7 @@ int storeSwapInStart(e) SWAP_BUF, e->mem_obj->swap_offset, (FILE_READ_HD) storeSwapInHandle, - (caddr_t) e); + (void *) e); return 0; } @@ -1489,8 +1489,8 @@ StoreEntry *storeGetNext() /* walk through every single entry in the storage and invoke a given routine */ int storeWalkThrough(proc, data) - int (*proc) _PARAMS((StoreEntry * e, caddr_t data)); - caddr_t data; + int (*proc) _PARAMS((StoreEntry * e, void * data)); + void * data; { StoreEntry *e = NULL; int count = 0; @@ -1511,7 +1511,7 @@ int storeWalkThrough(proc, data) /* return 1 if it expired, 0 if not */ int removeOldEntry(e, data) StoreEntry *e; - caddr_t data; + void * data; { time_t curtime = *((time_t *) data); @@ -1536,7 +1536,7 @@ int storePurgeOld() int n; debug(20, 3, "storePurgeOld: Begin purging TTL-expired objects\n"); - n = storeWalkThrough(removeOldEntry, (caddr_t) & cached_curtime); + n = storeWalkThrough(removeOldEntry, (void *) & cached_curtime); debug(20, 3, "storePurgeOld: Done purging TTL-expired objects.\n"); debug(20, 3, "storePurgeOld: %d objects expired\n", n); return n; diff --git a/src/wais.cc b/src/wais.cc index 8652cd433a..d2b1d57ec6 100644 --- a/src/wais.cc +++ b/src/wais.cc @@ -1,4 +1,4 @@ -/* $Id: wais.cc,v 1.18 1996/04/05 17:22:22 wessels Exp $ */ +/* $Id: wais.cc,v 1.19 1996/04/05 17:47:50 wessels Exp $ */ /* * DEBUG: Section 24 wais @@ -100,12 +100,12 @@ void waisReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) waisReadReply, - (caddr_t) data); + (void *) data); /* don't install read handler while we're above the gap */ comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) NULL, - (caddr_t) NULL, + (void *) NULL, (time_t) 0); /* dont try reading again for a while */ comm_set_stall(fd, getStallDelay()); @@ -127,9 +127,9 @@ void waisReadReply(fd, data) /* reinstall handlers */ /* XXX This may loop forever */ comm_set_select_handler(fd, COMM_SELECT_READ, - (PF) waisReadReply, (caddr_t) data); + (PF) waisReadReply, (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, - (PF) waisReadReplyTimeout, (caddr_t) data, getReadTimeout()); + (PF) waisReadReplyTimeout, (void *) data, getReadTimeout()); } else { BIT_RESET(entry->flag, CACHABLE); BIT_SET(entry->flag, RELEASE_REQUEST); @@ -154,22 +154,22 @@ void waisReadReply(fd, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) waisReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) waisReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } else { storeAppend(entry, buf, len); comm_set_select_handler(fd, COMM_SELECT_READ, (PF) waisReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) waisReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } } @@ -195,11 +195,11 @@ void waisSendComplete(fd, buf, size, errflag, data) comm_set_select_handler(fd, COMM_SELECT_READ, (PF) waisReadReply, - (caddr_t) data); + (void *) data); comm_set_select_handler_plus_timeout(fd, COMM_SELECT_TIMEOUT, (PF) waisReadReplyTimeout, - (caddr_t) data, + (void *) data, getReadTimeout()); } safe_free(buf); /* Allocated by waisSendRequest. */ @@ -230,7 +230,7 @@ void waisSendRequest(fd, data) else sprintf(buf, "%s %s%c%c", data->type, data->request, CR, LF); debug(24, 6, "waisSendRequest - buf:%s\n", buf); - icpWrite(fd, buf, len, 30, waisSendComplete, (caddr_t) data); + icpWrite(fd, buf, len, 30, waisSendComplete, (void *) data); } int waisStart(unusedfd, url, type, mime_hdr, entry) @@ -290,9 +290,9 @@ int waisStart(unusedfd, url, type, mime_hdr, entry) } /* Install connection complete handler. */ comm_set_select_handler(sock, COMM_SELECT_LIFETIME, - (PF) waisLifetimeExpire, (caddr_t) data); + (PF) waisLifetimeExpire, (void *) data); comm_set_select_handler(sock, COMM_SELECT_WRITE, - (PF) waisSendRequest, (caddr_t) data); + (PF) waisSendRequest, (void *) data); if (!BIT_TEST(entry->flag, ENTRY_PRIVATE)) storeSetPublicKey(entry); /* Make it public */ return COMM_OK; -- 2.47.3