=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/xinstall/xinstall.c,v retrieving revision 1.34 retrieving revision 1.35 diff -c -r1.34 -r1.35 *** src/usr.bin/xinstall/xinstall.c 2003/06/03 02:56:24 1.34 --- src/usr.bin/xinstall/xinstall.c 2003/06/10 22:20:54 1.35 *************** *** 1,4 **** ! /* $OpenBSD: xinstall.c,v 1.34 2003/06/03 02:56:24 millert Exp $ */ /* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: xinstall.c,v 1.35 2003/06/10 22:20:54 deraadt Exp $ */ /* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */ /* *************** *** 40,46 **** #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #endif ! static char rcsid[] = "$OpenBSD: xinstall.c,v 1.34 2003/06/03 02:56:24 millert Exp $"; #endif /* not lint */ #include --- 40,46 ---- #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #endif ! static char rcsid[] = "$OpenBSD: xinstall.c,v 1.35 2003/06/10 22:20:54 deraadt Exp $"; #endif /* not lint */ #include *************** *** 90,98 **** void file_flush(int, int); int ! main(argc, argv) ! int argc; ! char *argv[]; { struct stat from_sb, to_sb; mode_t *set; --- 90,96 ---- void file_flush(int, int); int ! main(int argc, char *argv[]) { struct stat from_sb, to_sb; mode_t *set; *************** *** 211,220 **** * build a path name and install the file */ void ! install(from_name, to_name, fset, flags) ! char *from_name, *to_name; ! u_long fset; ! u_int flags; { struct stat from_sb, to_sb; struct utimbuf utb; --- 209,215 ---- * build a path name and install the file */ void ! install(char *from_name, char *to_name, u_long fset, u_int flags) { struct stat from_sb, to_sb; struct utimbuf utb; *************** *** 416,426 **** * copy from one file to another */ void ! copy(from_fd, from_name, to_fd, to_name, size, sparse) ! int from_fd, to_fd; ! char *from_name, *to_name; ! off_t size; ! int sparse; { ssize_t nr, nw; int serrno; --- 411,418 ---- * copy from one file to another */ void ! copy(int from_fd, char *from_name, int to_fd, char *to_name, off_t size, ! int sparse) { ssize_t nr, nw; int serrno; *************** *** 495,507 **** * compare two files; non-zero means files differ */ int ! compare(from_fd, from_name, from_len, to_fd, to_name, to_len) ! int from_fd; ! const char *from_name; ! size_t from_len; ! int to_fd; ! const char *to_name; ! size_t to_len; { caddr_t p1, p2; size_t length, remainder; --- 487,494 ---- * compare two files; non-zero means files differ */ int ! compare(int from_fd, const char *from_name, size_t from_len, int to_fd, ! const char *to_name, size_t to_len) { caddr_t p1, p2; size_t length, remainder; *************** *** 546,553 **** * use strip(1) to strip the target file */ void ! strip(to_name) ! char *to_name; { int serrno, status; char * volatile path_strip; --- 533,539 ---- * use strip(1) to strip the target file */ void ! strip(char *to_name) { int serrno, status; char * volatile path_strip; *************** *** 575,582 **** * build directory heirarchy */ void ! install_dir(path) ! char *path; { char *p; struct stat sb; --- 561,567 ---- * build directory heirarchy */ void ! install_dir(char *path) { char *p; struct stat sb; *************** *** 607,613 **** * print a usage message and die */ void ! usage() { (void)fprintf(stderr, "\ usage: install [-bCcpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2\n\ --- 592,598 ---- * print a usage message and die */ void ! usage(void) { (void)fprintf(stderr, "\ usage: install [-bCcpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2\n\ *************** *** 622,631 **** * create a temporary file based on path and open it */ int ! create_tempfile(path, temp, tsize) ! char *path; ! char *temp; ! size_t tsize; { char *p; --- 607,613 ---- * create a temporary file based on path and open it */ int ! create_tempfile(char *path, char *temp, size_t tsize) { char *p; *************** *** 646,654 **** * create a new file, overwriting an existing one if necessary */ int ! create_newfile(path, sbp) ! char *path; ! struct stat *sbp; { char backup[MAXPATHLEN]; --- 628,634 ---- * create a new file, overwriting an existing one if necessary */ int ! create_newfile(char *path, struct stat *sbp) { char backup[MAXPATHLEN]; *************** *** 720,732 **** */ int ! file_write(fd, str, cnt, rem, isempt, sz) ! int fd; ! char *str; ! size_t cnt; ! int *rem; ! int *isempt; ! int sz; { char *pt; char *end; --- 700,706 ---- */ int ! file_write(int fd, char *str, size_t cnt, int *rem, int *isempt, int sz) { char *pt; char *end; *************** *** 803,809 **** * let us create a hole at the end. To get the last block with zeros, we * write the last BYTE with a zero (back up one byte and write a zero). */ - void file_flush(int fd, int isempt) { --- 777,782 ----