home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / REN / RTR / REN. next >
Encoding:
Text File  |  1998-07-24  |  1.1 KB  |  44 lines

  1. --- Makefile.orig    Wed Jan 29 14:33:27 1997
  2. +++ Makefile    Wed Jan 29 14:39:59 1997
  3. @@ -1,8 +1,10 @@
  4.  all:    ren ren.1
  5.  
  6.  ren:    ren.c
  7. -    $(CC) -o ren $(CFLAGS) ren.c
  8. +    $(CC) -o ren $(CFLAGS) ren.c -lbsd
  9.  install:    all
  10. -    @echo "install according to local convention"
  11. +    install -s ren <installdir>/bin
  12. +    install ren.1 <installsharedir>/man/man1
  13. +
  14.  clean:
  15.      rm -f core a.out ren ren.o
  16. --- ren.c.orig    Fri Jan 31 19:59:12 1997
  17. +++ ren.c    Fri Jan 31 20:20:20 1997
  18. @@ -1,6 +1,6 @@
  19.  #include <stdio.h>
  20. +#include <unistd.h>
  21.  #include <sys/file.h>
  22. -#include <sys/types.h>
  23.  #include <sys/dir.h>
  24.  
  25.  #define MAXWILD 20
  26. @@ -193,7 +193,7 @@
  27.      if ((nfils = scandir(".", pdot, NULL, alphasort)) < 0) {
  28.          fputs("Strange, can not scan ", stderr);
  29.          fputs(path, stderr);
  30. -        fputc('\n');
  31. +        fputc('\n', stderr);
  32.          exit(1);
  33.      }
  34.      *pfilrep = (REP **)malloc(nfils * sizeof(REP *));
  35. @@ -235,7 +235,7 @@
  36.                  fputs(dot[i]->d_name, stderr);
  37.                  fputs("' would have to be renamed to empty string.\n",
  38.                      stderr);
  39. -                fputs("Aborting, no renames done.\n");
  40. +                fputs("Aborting, no renames done.\n", stderr);
  41.                  exit(1);
  42.              }
  43.          }
  44.