diff options
author | Karl Ramm <kcr@1ts.org> | 2011-02-02 05:26:26 +0000 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2011-02-02 05:26:26 +0000 |
commit | 71928f99ec3b0f5984d83438da266c7ef97afb5a (patch) | |
tree | dd57f77793dc4495dd085d0342ceef599f53b81a | |
parent | b24cbe87f78de4fda81ed0fc5502275e77d51a28 (diff) |
It is still not the 80s anymore -- remove all caddr_ts
-rw-r--r-- | h/zephyr/zephyr.h | 2 | ||||
-rw-r--r-- | lib/ZParseNot.c | 2 | ||||
-rw-r--r-- | server/kstuff.c | 4 | ||||
-rw-r--r-- | server/realm.c | 4 | ||||
-rw-r--r-- | server/server.c | 8 | ||||
-rw-r--r-- | server/timer.c | 4 | ||||
-rw-r--r-- | zhm/queue.c | 4 | ||||
-rw-r--r-- | zhm/timer.c | 4 | ||||
-rw-r--r-- | zhm/zhm.c | 2 | ||||
-rw-r--r-- | zwgc/X_driver.c | 46 | ||||
-rw-r--r-- | zwgc/X_gram.c | 2 | ||||
-rw-r--r-- | zwgc/xcut.c | 4 | ||||
-rw-r--r-- | zwgc/xshow.c | 2 |
13 files changed, 44 insertions, 44 deletions
diff --git a/h/zephyr/zephyr.h b/h/zephyr/zephyr.h index 99874fd..536175a 100644 --- a/h/zephyr/zephyr.h +++ b/h/zephyr/zephyr.h @@ -111,7 +111,7 @@ typedef struct _ZNotice_t { char *z_ascii_checksum; int z_num_other_fields; char *z_other_fields[Z_MAXOTHERFIELDS]; - caddr_t z_message; + char *z_message; int z_message_len; int z_num_hdr_fields; char **z_hdr_fields; diff --git a/lib/ZParseNot.c b/lib/ZParseNot.c index d610049..9143a12 100644 --- a/lib/ZParseNot.c +++ b/lib/ZParseNot.c @@ -308,7 +308,7 @@ ZParseNotice(char *buffer, if (numfields || *(ptr - 1) != '\0') BAD_PACKET("end of headers"); - notice->z_message = (caddr_t) ptr; + notice->z_message = (void *)ptr; notice->z_message_len = len-(ptr-buffer); return (ZERR_NONE); diff --git a/server/kstuff.c b/server/kstuff.c index 5f9cc4f..0743ece 100644 --- a/server/kstuff.c +++ b/server/kstuff.c @@ -69,7 +69,7 @@ GetKerberosData(int fd, /* file descr. to read from */ return(KFAILURE); } for (i=0; i<ticket.length; i++) { - if (read(fd, (caddr_t) &(ticket.dat[i]), 1) != 1) { + if (read(fd, &ticket.dat[i], 1) != 1) { syslog(LOG_WARNING,"bad tkt read"); return(KFAILURE); } @@ -116,7 +116,7 @@ SendKerberosData(int fd, /* file descriptor to write onto */ size_to_write = strlen (p); if ((written = write(fd, p, size_to_write)) != size_to_write) return (written < 0) ? errno : ZSRV_PKSHORT; - if ((written = write(fd, (caddr_t) (ticket->dat), ticket->length)) + if ((written = write(fd, ticket->dat, ticket->length)) != ticket->length) return (written < 0) ? errno : ZSRV_PKSHORT; diff --git a/server/realm.c b/server/realm.c index 225bbae..56bd71e 100644 --- a/server/realm.c +++ b/server/realm.c @@ -505,7 +505,7 @@ realm_init(void) for (jj = 0; jj < rlmnames[ii].nused; jj++) { hp = gethostbyname(rlmnames[ii].servers[jj]); if (hp) { - memmove((caddr_t) &addresses[found], (caddr_t)hp->h_addr, + memmove(&addresses[found], hp->h_addr, sizeof(struct in_addr)); found++; } else @@ -894,7 +894,7 @@ realm_sendit(ZNotice_t *notice, ZRealm *realm, int ack_to_sender) { - caddr_t pack; + char *pack; int packlen; Code_t retval; Unacked *nacked; diff --git a/server/server.c b/server/server.c index eab6ab1..9de847c 100644 --- a/server/server.c +++ b/server/server.c @@ -87,7 +87,7 @@ static void server_queue(Server *, int, void *, int, static void server_hello(Server *, int); static void setup_server(Server *, struct in_addr *); static void srv_rexmit(void *); -static void server_forw_reliable(Server *, caddr_t, int, ZNotice_t *); +static void server_forw_reliable(Server *, void *, int, ZNotice_t *); static Code_t admin_dispatch(ZNotice_t *, int, struct sockaddr_in *, Server *); static Code_t kill_clt(ZNotice_t *, Server *); @@ -538,7 +538,7 @@ server_kill_clt(Client *client) char buf[512], *lyst[2]; ZNotice_t notice; ZNotice_t *pnotice; /* speed hack */ - caddr_t pack; + char *pack; int packlen, auth; Code_t retval; @@ -1220,7 +1220,7 @@ server_forward(ZNotice_t *notice, struct sockaddr_in *who) { int i; - caddr_t pack; + void *pack; int packlen; Code_t retval; @@ -1256,7 +1256,7 @@ server_forward(ZNotice_t *notice, static void server_forw_reliable(Server *server, - caddr_t pack, + void *pack, int packlen, ZNotice_t *notice) { diff --git a/server/timer.c b/server/timer.c index fe4b064..932c819 100644 --- a/server/timer.c +++ b/server/timer.c @@ -49,11 +49,11 @@ static const char rcsid[] = * Timer *timer_set_rel (time_rel, proc, arg) * long time_rel; * void (*proc)(); - * caddr_t arg; + * void *arg; * Timer *timer_set_abs (time_abs, proc, arg) * long time_abs; * void (*proc)(); - * caddr_t arg; + * void *arg; * * void timer_reset(tmr) * Timer *tmr; diff --git a/zhm/queue.c b/zhm/queue.c index b028f7c..c44a19a 100644 --- a/zhm/queue.c +++ b/zhm/queue.c @@ -22,7 +22,7 @@ typedef struct _Queue { Timer *timer; int retries; ZNotice_t notice; - caddr_t packet; + void *packet; struct sockaddr_in reply; struct _Queue *next, **prev_p; } Queue; @@ -176,7 +176,7 @@ static Code_t dump_queue(void) { Queue *entry; - caddr_t mp; + void *mp; int ml; DPR("Dumping queue...\n"); diff --git a/zhm/timer.c b/zhm/timer.c index 4fb764e..296b47e 100644 --- a/zhm/timer.c +++ b/zhm/timer.c @@ -50,11 +50,11 @@ static const char rcsid[] = * Timer *timer_set_rel (time_rel, proc, arg) * long time_rel; * void (*proc)(); - * caddr_t arg; + * void *arg; * Timer *timer_set_abs (time_abs, proc, arg) * long time_abs; * void (*proc)(); - * caddr_t arg; + * void *arg; * * void timer_reset(tmr) * Timer *tmr; @@ -495,7 +495,7 @@ detach(void) * doesn't already have one. POSIX systems won't include * <sys/ioctl.h> (see ../h/sysdep.h); if TIOCNOTTY is defined anyway, * this is unnecessary but won't hurt. */ - ioctl(i, TIOCNOTTY, (caddr_t) 0); + ioctl(i, TIOCNOTTY, NULL); #endif close(i); } diff --git a/zwgc/X_driver.c b/zwgc/X_driver.c index a51ddd1..51c8ea0 100644 --- a/zwgc/X_driver.c +++ b/zwgc/X_driver.c @@ -210,31 +210,31 @@ x_string_to_color(char *name, */ static XrmOptionDescRec cmd_options[] = { - {"+rv", "*reverseVideo", XrmoptionNoArg, (caddr_t) "off"}, - {"+synchronous", "*synchronous", XrmoptionNoArg, (caddr_t) "off"}, - {"-background", "*background", XrmoptionSepArg, (caddr_t) NULL}, - {"-bd", "*borderColor", XrmoptionSepArg, (caddr_t) NULL}, - {"-bg", "*background", XrmoptionSepArg, (caddr_t) NULL}, - {"-bordercolor", "*borderColor", XrmoptionSepArg, (caddr_t) NULL}, - {"-borderwidth", ".borderWidth", XrmoptionSepArg, (caddr_t) NULL}, - {"-bw", ".borderWidth", XrmoptionSepArg, (caddr_t) NULL}, - {"-display", ".display", XrmoptionSepArg, (caddr_t) NULL}, - {"-fg", "*foreground", XrmoptionSepArg, (caddr_t) NULL}, - {"-fn", "*font", XrmoptionSepArg, (caddr_t) NULL}, - {"-font", "*font", XrmoptionSepArg, (caddr_t) NULL}, - {"-foreground", "*foreground", XrmoptionSepArg, (caddr_t) NULL}, - {"-geometry", ".geometry", XrmoptionSepArg, (caddr_t) NULL}, - {"-iconname", ".iconName", XrmoptionSepArg, (caddr_t) NULL}, + {"+rv", "*reverseVideo", XrmoptionNoArg, (XPointer) "off"}, + {"+synchronous", "*synchronous", XrmoptionNoArg, (XPointer) "off"}, + {"-background", "*background", XrmoptionSepArg, (XPointer) NULL}, + {"-bd", "*borderColor", XrmoptionSepArg, (XPointer) NULL}, + {"-bg", "*background", XrmoptionSepArg, (XPointer) NULL}, + {"-bordercolor", "*borderColor", XrmoptionSepArg, (XPointer) NULL}, + {"-borderwidth", ".borderWidth", XrmoptionSepArg, (XPointer) NULL}, + {"-bw", ".borderWidth", XrmoptionSepArg, (XPointer) NULL}, + {"-display", ".display", XrmoptionSepArg, (XPointer) NULL}, + {"-fg", "*foreground", XrmoptionSepArg, (XPointer) NULL}, + {"-fn", "*font", XrmoptionSepArg, (XPointer) NULL}, + {"-font", "*font", XrmoptionSepArg, (XPointer) NULL}, + {"-foreground", "*foreground", XrmoptionSepArg, (XPointer) NULL}, + {"-geometry", ".geometry", XrmoptionSepArg, (XPointer) NULL}, + {"-iconname", ".iconName", XrmoptionSepArg, (XPointer) NULL}, #ifdef CMU_ZWGCPLUS - {"-lifespan", "*lifespan", XrmoptionSepArg, (caddr_t) NULL}, + {"-lifespan", "*lifespan", XrmoptionSepArg, (XPointer) NULL}, #endif - {"-name", ".name", XrmoptionSepArg, (caddr_t) NULL}, - {"-reverse", "*reverseVideo", XrmoptionNoArg, (caddr_t) "on"}, - {"-rv", "*reverseVideo", XrmoptionNoArg, (caddr_t) "on"}, - {"-transient", "*transient", XrmoptionNoArg, (caddr_t) "on"}, - {"-synchronous", "*synchronous", XrmoptionNoArg, (caddr_t) "on"}, - {"-title", ".title", XrmoptionSepArg, (caddr_t) NULL}, - {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL} }; + {"-name", ".name", XrmoptionSepArg, (XPointer) NULL}, + {"-reverse", "*reverseVideo", XrmoptionNoArg, (XPointer) "on"}, + {"-rv", "*reverseVideo", XrmoptionNoArg, (XPointer) "on"}, + {"-transient", "*transient", XrmoptionNoArg, (XPointer) "on"}, + {"-synchronous", "*synchronous", XrmoptionNoArg, (XPointer) "on"}, + {"-title", ".title", XrmoptionSepArg, (XPointer) NULL}, + {"-xrm", NULL, XrmoptionResArg, (XPointer) NULL} }; #define NUMBER_OF_OPTIONS ((sizeof (cmd_options))/ sizeof(cmd_options[0])) diff --git a/zwgc/X_gram.c b/zwgc/X_gram.c index bd3ab5b..998d087 100644 --- a/zwgc/X_gram.c +++ b/zwgc/X_gram.c @@ -371,7 +371,7 @@ x_gram_create(Display *dpy, XChangeProperty(dpy, w, net_wm_desktop, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &all_desktops, 1); - XSaveContext(dpy, w, desc_context, (caddr_t)gram); + XSaveContext(dpy, w, desc_context, (XPointer)gram); gram->can_die.tv_sec = 0; diff --git a/zwgc/xcut.c b/zwgc/xcut.c index b82d9a8..fea0c27 100644 --- a/zwgc/xcut.c +++ b/zwgc/xcut.c @@ -132,7 +132,7 @@ xunmark(Display *dpy, XContext desc_context) { if (gram == NULL) - if (XFindContext(dpy, w, desc_context, (caddr_t *) &gram)) + if (XFindContext(dpy, w, desc_context, (XPointer *) &gram)) return; xmarkClear(); @@ -206,7 +206,7 @@ xcut(Display *dpy, * If event is for a window that's not ours anymore (say we're * in the process of deleting it...), ignore it: */ - if (XFindContext(dpy, w, desc_context, (caddr_t *) &gram)) + if (XFindContext(dpy, w, desc_context, (XPointer *) &gram)) return; /* diff --git a/zwgc/xshow.c b/zwgc/xshow.c index 026c954..894e25d 100644 --- a/zwgc/xshow.c +++ b/zwgc/xshow.c @@ -602,7 +602,7 @@ xhandleevent(Display *dpy, { x_gram *gram; - if (XFindContext(dpy, w, desc_context, (caddr_t *)&gram)) + if (XFindContext(dpy, w, desc_context, (XPointer *)&gram)) return; if (event->type == Expose) |