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

Diff for /src/usr.bin/find/misc.c between version 1.8 and 1.9

version 1.8, 2003/06/03 02:56:08 version 1.9, 2003/06/26 07:27:29
Line 39 
Line 39 
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
   #include <sys/uio.h>
   
 #include <err.h>  #include <err.h>
 #include <errno.h>  #include <errno.h>
Line 55 
Line 56 
  *      Replace occurrences of {} in s1 with s2 and return the result string.   *      Replace occurrences of {} in s1 with s2 and return the result string.
  */   */
 void  void
 brace_subst(orig, store, path, len)  brace_subst(char *orig, char **store, char *path, int len)
         char *orig, **store, *path;  
         int len;  
 {  {
         int plen;          int plen;
         char ch, *p;          char ch, *p;
Line 82 
Line 81 
  *      input. If the input is 'y' then 1 is returned.   *      input. If the input is 'y' then 1 is returned.
  */   */
 int  int
 queryuser(argv)  queryuser(char **argv)
         char **argv;  
 {  {
         int ch, first, nl;          int ch, first, nl;
   
Line 116 
Line 114 
  *      malloc with error checking.   *      malloc with error checking.
  */   */
 void *  void *
 emalloc(len)  emalloc(u_int len)
         u_int len;  
 {  {
         void *p;          void *p;
   
Line 132 
Line 129 
  */   */
 /* ARGSUSED */  /* ARGSUSED */
 void  void
 show_path(sig)  show_path(int signo)
         int sig;  
 {  {
         int save_errno = errno;          int save_errno = errno;
         extern FTSENT *entry;          extern FTSENT *entry;
           struct iovec iov[3];
   
         if (entry != NULL) {          if (entry != NULL) {
                 write(STDERR_FILENO, "find path: ", 11);                  iov[0].iov_base = "find path: ";
                 write(STDERR_FILENO, entry->fts_path, entry->fts_pathlen);                  iov[0].iov_len = strlen(iov[0].iov_base);
                 write(STDERR_FILENO, "\n", 1);                  iov[1].iov_base = entry->fts_path;
                   iov[1].iov_len = entry->fts_pathlen;
                   iov[2].iov_base = "\n";
                   iov[2].iov_len = strlen(iov[2].iov_base);
                   writev(STDERR_FILENO, iov, 3);
                 errno = save_errno;                  errno = save_errno;
         }          }
 }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9