[BACK]Return to xinstall.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / xinstall

Diff for /src/usr.bin/xinstall/xinstall.c between version 1.34 and 1.35

version 1.34, 2003/06/03 02:56:24 version 1.35, 2003/06/10 22:20:54
Line 90 
Line 90 
 void    file_flush(int, int);  void    file_flush(int, int);
   
 int  int
 main(argc, argv)  main(int argc, char *argv[])
         int argc;  
         char *argv[];  
 {  {
         struct stat from_sb, to_sb;          struct stat from_sb, to_sb;
         mode_t *set;          mode_t *set;
Line 211 
Line 209 
  *      build a path name and install the file   *      build a path name and install the file
  */   */
 void  void
 install(from_name, to_name, fset, flags)  install(char *from_name, char *to_name, u_long fset, u_int flags)
         char *from_name, *to_name;  
         u_long fset;  
         u_int flags;  
 {  {
         struct stat from_sb, to_sb;          struct stat from_sb, to_sb;
         struct utimbuf utb;          struct utimbuf utb;
Line 416 
Line 411 
  *      copy from one file to another   *      copy from one file to another
  */   */
 void  void
 copy(from_fd, from_name, to_fd, to_name, size, sparse)  copy(int from_fd, char *from_name, int to_fd, char *to_name, off_t size,
         int from_fd, to_fd;      int sparse)
         char *from_name, *to_name;  
         off_t size;  
         int sparse;  
 {  {
         ssize_t nr, nw;          ssize_t nr, nw;
         int serrno;          int serrno;
Line 495 
Line 487 
  *      compare two files; non-zero means files differ   *      compare two files; non-zero means files differ
  */   */
 int  int
 compare(from_fd, from_name, from_len, to_fd, to_name, to_len)  compare(int from_fd, const char *from_name, size_t from_len, int to_fd,
         int from_fd;      const char *to_name, size_t to_len)
         const char *from_name;  
         size_t from_len;  
         int to_fd;  
         const char *to_name;  
         size_t to_len;  
 {  {
         caddr_t p1, p2;          caddr_t p1, p2;
         size_t length, remainder;          size_t length, remainder;
Line 546 
Line 533 
  *      use strip(1) to strip the target file   *      use strip(1) to strip the target file
  */   */
 void  void
 strip(to_name)  strip(char *to_name)
         char *to_name;  
 {  {
         int serrno, status;          int serrno, status;
         char * volatile path_strip;          char * volatile path_strip;
Line 575 
Line 561 
  *      build directory heirarchy   *      build directory heirarchy
  */   */
 void  void
 install_dir(path)  install_dir(char *path)
         char *path;  
 {  {
         char *p;          char *p;
         struct stat sb;          struct stat sb;
Line 607 
Line 592 
  *      print a usage message and die   *      print a usage message and die
  */   */
 void  void
 usage()  usage(void)
 {  {
         (void)fprintf(stderr, "\          (void)fprintf(stderr, "\
 usage: install [-bCcpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2\n\  usage: install [-bCcpSs] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2\n\
Line 622 
Line 607 
  *      create a temporary file based on path and open it   *      create a temporary file based on path and open it
  */   */
 int  int
 create_tempfile(path, temp, tsize)  create_tempfile(char *path, char *temp, size_t tsize)
         char *path;  
         char *temp;  
         size_t tsize;  
 {  {
         char *p;          char *p;
   
Line 646 
Line 628 
  *      create a new file, overwriting an existing one if necessary   *      create a new file, overwriting an existing one if necessary
  */   */
 int  int
 create_newfile(path, sbp)  create_newfile(char *path, struct stat *sbp)
         char *path;  
         struct stat *sbp;  
 {  {
         char backup[MAXPATHLEN];          char backup[MAXPATHLEN];
   
Line 720 
Line 700 
  */   */
   
 int  int
 file_write(fd, str, cnt, rem, isempt, sz)  file_write(int fd, char *str, size_t cnt, int *rem, int *isempt, int sz)
         int fd;  
         char *str;  
         size_t cnt;  
         int *rem;  
         int *isempt;  
         int sz;  
 {  {
         char *pt;          char *pt;
         char *end;          char *end;
Line 803 
Line 777 
  *      let us create a hole at the end. To get the last block with zeros, we   *      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).   *      write the last BYTE with a zero (back up one byte and write a zero).
  */   */
   
 void  void
 file_flush(int fd, int isempt)  file_flush(int fd, int isempt)
 {  {

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35