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

Diff for /src/usr.bin/file/Attic/fsmagic.c between version 1.4 and 1.5

version 1.4, 1998/07/10 15:05:22 version 1.5, 1999/12/06 00:32:29
Line 132 
Line 132 
   
                             if ((tmp = strrchr(fn,  '/')) == NULL) {                              if ((tmp = strrchr(fn,  '/')) == NULL) {
                                 tmp = buf; /* in current directory anyway */                                  tmp = buf; /* in current directory anyway */
                             }                              } else if (strlen(fn) + strlen(buf) > sizeof(buf2)-1) {
                             else {                                  ckfprintf(stdout, "name too long %s", fn);
                                 strcpy (buf2, fn);  /* take directory part */                                  return 1;
                               } else {
                                   strcpy (buf2, fn);  /* ok; take directory part */
                                 buf2[tmp-fn+1] = '\0';                                  buf2[tmp-fn+1] = '\0';
                                 strcat (buf2, buf); /* plus (relative) symlink */                                  strcat (buf2, buf); /* ok; plus (relative) symlink */
                                 tmp = buf2;                                  tmp = buf2;
                             }                              }
                             if (stat(tmp, &tstatbuf) < 0) {                              if (stat(tmp, &tstatbuf) < 0) {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5