Patch #: 121 Type: cleanup Priority: low Modification: avoid compiler warning messages Submitted: Edward Moy Archived: munnari.OZ.AU mac/cap.patches/cap60.patch121 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch121' Summary: cast arguments, fix definitions as appropriate File: cap60/applications/aufs/afpdid.c File: cap60/applications/aufs/afposenum.c File: cap60/applications/aufs/afpspd.c File: cap60/applications/lwsrv/lwsrv.c File: cap60/contrib/lwrename.c File: cap60/etc/atis.c File: cap60/lib/cap/ablog.c File: cap60/lib/cap/abkip.c File: cap60/samples/tlw.c File: cap60/samples/ash.c *** applications/aufs/afpdid.c.orig Wed Mar 13 20:18:21 1991 --- applications/aufs/afpdid.c Tue Jul 28 01:29:37 1992 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/03/13 20:17:39 $ ! * $Header: afpdid.c,v 2.2 91/03/13 20:17:39 djh Exp $ ! * $Revision: 2.2 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1992/07/27 15:29:09 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpdid.c,v 2.3 1992/07/27 15:29:09 djh Rel djh $ ! * $Revision: 2.3 $ */ /* *************** *** 602,615 **** /* only possible subdir */ #ifdef SHORT_NAMES if (eptype == 0x02) { ! if (strcmp(efn, (char *) VolName(*ivol)) != 0) return(aeObjectNotFound); } else { ! if (strcmp(efn, (char *) VolSName(*ivol)) != 0) return(aeObjectNotFound); } #else SHORT_NAMES ! if (strcmp(efn, (char *) VolName(*ivol)) != 0) return(aeObjectNotFound); #endif SHORT_NAMES id = irootd; --- 602,615 ---- /* only possible subdir */ #ifdef SHORT_NAMES if (eptype == 0x02) { ! if (strcmp((char *)efn, (char *)VolName(*ivol)) != 0) return(aeObjectNotFound); } else { ! if (strcmp((char *)efn, (char *)VolSName(*ivol)) != 0) return(aeObjectNotFound); } #else SHORT_NAMES ! if (strcmp((char *)efn, (char *)VolName(*ivol)) != 0) return(aeObjectNotFound); #endif SHORT_NAMES id = irootd; *************** *** 644,657 **** if (id == iprootd && *efn != '\0') { /* special check */ #ifdef SHORT_NAMES if (eptype == 0x02) { ! if (strcmp(efn, (char *) VolName(*ivol)) != 0) return(aeObjectNotFound); } else { ! if (strcmp(efn, (char *) VolSName(*ivol)) != 0) return(aeObjectNotFound); } #else SHORT_NAMES ! if (strcmp(efn, (char *) VolName(*ivol)) != 0) return(aeObjectNotFound); #endif SHORT_NAMES *file = '\0'; --- 644,657 ---- if (id == iprootd && *efn != '\0') { /* special check */ #ifdef SHORT_NAMES if (eptype == 0x02) { ! if (strcmp((char *)efn, (char *)VolName(*ivol)) != 0) return(aeObjectNotFound); } else { ! if (strcmp((char *)efn, (char *)VolSName(*ivol)) != 0) return(aeObjectNotFound); } #else SHORT_NAMES ! if (strcmp((char *)efn, (char *)VolName(*ivol)) != 0) return(aeObjectNotFound); #endif SHORT_NAMES *file = '\0'; *** applications/aufs/afposenum.c.orig Wed Jul 15 19:36:27 1992 --- applications/aufs/afposenum.c Tue Jul 28 01:33:15 1992 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1992/07/15 09:36:07 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afposenum.c,v 2.7 1992/07/15 09:36:07 djh Rel djh $ ! * $Revision: 2.7 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1992/07/27 15:32:49 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afposenum.c,v 2.8 1992/07/27 15:32:49 djh Rel djh $ ! * $Revision: 2.8 $ */ /* *************** *** 379,385 **** int period = 0; int altered = 0; int i=0,j=0,k=0; ! byte hex2nibble(); char sname[MAXSFLEN+4]; /* slop */ if (DBENU) --- 379,385 ---- int period = 0; int altered = 0; int i=0,j=0,k=0; ! private byte hex2nibble(); char sname[MAXSFLEN+4]; /* slop */ if (DBENU) *** applications/aufs/afpspd.c.orig Thu Feb 28 23:44:40 1991 --- applications/aufs/afpspd.c Tue Jul 28 01:36:44 1992 *************** *** 157,163 **** K = 0; PART[K] = S; while ((S = (char*)index(S,'/')) != NULL) { ! *S++ = NULL; PART[++K] = S; if (K >= MAX_LEVEL) return NULL; --- 157,163 ---- K = 0; PART[K] = S; while ((S = (char*)index(S,'/')) != NULL) { ! *S++ = 0; PART[++K] = S; if (K >= MAX_LEVEL) return NULL; *** applications/lwsrv/lwsrv.c.orig Thu Jul 16 16:56:21 1992 --- applications/lwsrv/lwsrv.c Tue Jul 28 01:40:13 1992 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1992/07/16 06:56:11 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrv.c,v 2.23 1992/07/16 06:56:11 djh Rel djh $"; ! static char revision[] = "$Revision: 2.23 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1992/07/27 15:39:52 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrv.c,v 2.24 1992/07/27 15:39:52 djh Rel djh $"; ! static char revision[] = "$Revision: 2.24 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter *************** *** 393,399 **** private int is_child = 0; ! private int cleanup() { int i; --- 393,399 ---- private int is_child = 0; ! private void cleanup() { int i; *************** *** 446,452 **** { int err,i,cno,errcount; int prtno,prtcount; ! int cleanup(); void childdone(); doargs(argc,argv); /* handle args */ --- 446,452 ---- { int err,i,cno,errcount; int prtno,prtcount; ! void cleanup(); void childdone(); doargs(argc,argv); /* handle args */ *** contrib/lwrename.c.orig Tue Jul 28 01:44:09 1992 --- contrib/lwrename.c Tue Jul 28 01:44:18 1992 *************** *** 317,322 **** --- 317,323 ---- char *str; { register char *cp; + char *malloc(); if((cp = malloc(strlen(str) + 1)) == NULL) { fprintf(stderr, "%s: newstring: Out of memory\n", myname); *** etc/atis.c.orig Tue Jun 23 21:36:38 1992 --- etc/atis.c Tue Jul 28 02:01:33 1992 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1992/06/23 11:36:25 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/etc/RCS/atis.c,v 2.8 1992/06/23 11:36:25 djh Rel djh $"; ! static char revision[] = "$Revision: 2.8 $"; /* * atis.c - a simple appletalk information server --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1992/07/27 16:01:11 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/etc/RCS/atis.c,v 2.9 1992/07/27 16:01:11 djh Rel djh $"; ! static char revision[] = "$Revision: 2.9 $"; /* * atis.c - a simple appletalk information server *************** *** 153,159 **** #else NOSIGMASK sigsetmask(mask); #endif NOSIGMASK ! (void)signal(SIGHUP, (int (*)())nbp_reload); } void --- 153,159 ---- #else NOSIGMASK sigsetmask(mask); #endif NOSIGMASK ! (void)signal(SIGHUP, nbp_reload); } void *************** *** 182,188 **** #else NOSIGMASK sigsetmask(mask); #endif NOSIGMASK ! (void)signal(SIGQUIT, (int (*)())nbp_dump); } void --- 182,188 ---- #else NOSIGMASK sigsetmask(mask); #endif NOSIGMASK ! (void)signal(SIGQUIT, nbp_dump); } void *************** *** 206,212 **** logit(0, "DEBUGGING OFF"); if (tempdebugfile) nologitfile(); ! signal(SIGEMT, (int (*)())atis_undebug); #ifdef NOSIGMASK sigrelse(DBUGSIG); sigrelse(NDBGSIG); --- 206,212 ---- logit(0, "DEBUGGING OFF"); if (tempdebugfile) nologitfile(); ! signal(SIGEMT, atis_undebug); #ifdef NOSIGMASK sigrelse(DBUGSIG); sigrelse(NDBGSIG); *************** *** 233,239 **** if ((dlevel = get_debug_level()) < L_LVLMAX) set_debug_level(++dlevel); logit(0, "DEBUG LEVEL %d", dlevel); ! signal(SIGIOT, (int (*)())atis_debuginc); #ifdef NOSIGMASK sigrelse(DBUGSIG); sigrelse(NDBGSIG); --- 233,239 ---- if ((dlevel = get_debug_level()) < L_LVLMAX) set_debug_level(++dlevel); logit(0, "DEBUG LEVEL %d", dlevel); ! signal(SIGIOT, atis_debuginc); #ifdef NOSIGMASK sigrelse(DBUGSIG); sigrelse(NDBGSIG); *************** *** 441,451 **** abInit(TRUE); /* init driver */ nbpInit(); /* init NBP */ nbptab_init(); ! (void)signal(SIGHUP, (int (*)())nbp_reload); ! (void)signal(SIGQUIT, (int (*)())nbp_dump); ! (void)signal(SIGTERM, (int (*)())atis_end); ! (void)signal(SIGIOT, (int (*)())atis_debuginc); ! (void)signal(SIGEMT, (int (*)())atis_undebug); logit(0, "Reply num max for lkup reply is %d (based on %d)", NUMREPLYMAX, NBPTUPSIZE); --- 441,451 ---- abInit(TRUE); /* init driver */ nbpInit(); /* init NBP */ nbptab_init(); ! (void)signal(SIGHUP, nbp_reload); ! (void)signal(SIGQUIT, nbp_dump); ! (void)signal(SIGTERM, atis_end); ! (void)signal(SIGIOT, atis_debuginc); ! (void)signal(SIGEMT, atis_undebug); logit(0, "Reply num max for lkup reply is %d (based on %d)", NUMREPLYMAX, NBPTUPSIZE); *** lib/cap/ablog.c.orig Wed Mar 13 20:16:36 1991 --- lib/cap/ablog.c Tue Jul 28 02:03:32 1992 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 91/03/13 20:16:05 $"; ! static char rcsident[] = "$Header: ablog.c,v 2.2 91/03/13 20:16:05 djh Exp $"; ! static char revision[] = "$Revision: 2.2 $"; /* * ablog.c - simple logging facility --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1992/07/27 16:03:20 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/lib/cap/RCS/ablog.c,v 2.3 1992/07/27 16:03:20 djh Rel djh $"; ! static char revision[] = "$Revision: 2.3 $"; /* * ablog.c - simple logging facility *************** *** 84,90 **** #endif USEVPRINTF { long time(); ! char *mytod(); #ifdef USEVPRINTF register char *fmt; va_list args; --- 84,90 ---- #endif USEVPRINTF { long time(); ! static char *mytod(); #ifdef USEVPRINTF register char *fmt; va_list args; *** lib/cap/abkip.c.orig Thu Feb 28 23:42:55 1991 --- lib/cap/abkip.c Tue Jul 28 02:05:38 1992 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/02/15 22:47:15 $ ! * $Header: abkip.c,v 2.1 91/02/15 22:47:15 djh Rel $ ! * $Revision: 2.1 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1992/07/27 16:05:21 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abkip.c,v 2.2 1992/07/27 16:05:21 djh Rel djh $ ! * $Revision: 2.2 $ */ /* *************** *** 238,244 **** abInit(disp) { int i; ! word getPRange(); for (i=0; i < ddpMaxSkt+1; i++) { skt2fd[i] = -1; /* mark all these as unused */ --- 238,244 ---- abInit(disp) { int i; ! private word getPRange(); for (i=0; i < ddpMaxSkt+1; i++) { skt2fd[i] = -1; /* mark all these as unused */ *** samples/tlw.c.orig Tue Jun 23 21:46:14 1992 --- samples/tlw.c Tue Jul 28 02:09:03 1992 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1992/06/23 11:46:04 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/samples/RCS/tlw.c,v 2.6 1992/06/23 11:46:04 djh Rel djh $"; ! static char revision[] = "$Revision: 2.6 $"; /* * tlw - UNIX AppleTalk test program - talk to laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1992/07/27 16:08:44 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/samples/RCS/tlw.c,v 2.7 1992/07/27 16:08:44 djh Rel djh $"; ! static char revision[] = "$Revision: 2.7 $"; /* * tlw - UNIX AppleTalk test program - talk to laserwriter *************** *** 36,41 **** --- 36,47 ---- #include /* include appletalk definitions */ #include /* overrides for non-4.3 systems */ + + #ifdef USESTRINGDOTH + # include + #else USESTRINGDOTH + # include + #endif USESTRINGDOTH #ifndef CAPPRINTERS #define CAPPRINTERS "/etc/cap.printers" *** samples/ash.c.orig Thu Feb 28 23:44:04 1991 --- samples/ash.c Tue Jul 28 02:14:17 1992 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/02/15 23:03:18 $ ! * $Header: ash.c,v 2.1 91/02/15 23:03:18 djh Rel $ ! * $Revision: 2.1 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1992/07/27 16:13:43 $ ! * $Header: /mac/src/cap60/samples/RCS/ash.c,v 2.2 1992/07/27 16:13:43 djh Rel djh $ ! * $Revision: 2.2 $ */ /* *************** *** 726,732 **** if (path == NULL) /* NULL name means no file */ return; ! if ((p = rindex(path, '/')) == NULL) p = (char *)path; else p++; /* skip over the slash */ --- 726,732 ---- if (path == NULL) /* NULL name means no file */ return; ! if ((p = rindex((char *)path, '/')) == NULL) p = (char *)path; else p++; /* skip over the slash */ *************** *** 750,756 **** close(tmpfd); } else { bzero(epar.fdp_finfo, sizeof(epar.fdp_finfo)); ! strcpy(epar.fdp_finfo, "TEXTEDIT"); } } if (setfinderinfo(srn, volid, dirid, p, &epar) != noErr) --- 750,756 ---- close(tmpfd); } else { bzero(epar.fdp_finfo, sizeof(epar.fdp_finfo)); ! strcpy((char *)epar.fdp_finfo, "TEXTEDIT"); } } if (setfinderinfo(srn, volid, dirid, p, &epar) != noErr) *************** *** 760,766 **** return; } strcpy(buf,"tvol/.resource/"); ! strcat(buf,path); if ((myfd = open(buf,O_RDONLY)) < 0) { perror(buf); return; --- 760,766 ---- return; } strcpy(buf,"tvol/.resource/"); ! strcat(buf,(char *)path); if ((myfd = open(buf,O_RDONLY)) < 0) { perror(buf); return; *** lib/cap/abversion.c.orig Sun Jul 26 00:46:23 1992 --- lib/cap/abversion.c Tue Jul 28 02:27:24 1992 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1992/07/25 14:46:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abversion.c,v 2.20 1992/07/25 14:46:17 djh Rel djh $ ! * $Revision: 2.20 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1992/07/27 16:27:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abversion.c,v 2.21 1992/07/27 16:27:17 djh Rel djh $ ! * $Revision: 2.21 $ */ /* *************** *** 31,37 **** myversion.cv_name = "CAP"; myversion.cv_version = 6; myversion.cv_subversion = 0; ! myversion.cv_patchlevel = 120; myversion.cv_rmonth = "July"; myversion.cv_ryear = "1992"; switch (lap_proto) { --- 31,37 ---- myversion.cv_name = "CAP"; myversion.cv_version = 6; myversion.cv_subversion = 0; ! myversion.cv_patchlevel = 121; myversion.cv_rmonth = "July"; myversion.cv_ryear = "1992"; switch (lap_proto) { *** README.orig Sun Jul 26 00:47:07 1992 --- README Tue Jul 28 02:28:20 1992 *************** *** 2,8 **** CAP - Columbia AppleTalk Package for UNIX o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 120, July 1992 Notice ------ --- 2,8 ---- CAP - Columbia AppleTalk Package for UNIX o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 121, July 1992 Notice ------