/[tar]/tar/src/names.c
ViewVC logotype

Diff of /tar/src/names.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by gray, Mon Sep 1 17:01:35 2003 UTC revision 1.26 by gray, Thu Sep 4 15:47:26 2003 UTC
# Line 1043  safer_name_suffix (char const *file_name Line 1043  safer_name_suffix (char const *file_name
1043    return (char *) p;    return (char *) p;
1044  }  }
1045    
1046    char const *
1047    cut_path_elements (char const *file_name, size_t num)
1048    {
1049      char const *p = file_name;
1050      if (ISSLASH (*p))
1051        p++;
1052      for (; *p; p++)
1053        {
1054          if (ISSLASH (*p))
1055            {
1056              if (--num == 0)
1057                return p + 1;
1058            }
1059        }
1060      return NULL;
1061    }
1062    
1063  /* Return nonzero if NAME contains ".." as a path name component.  */  /* Return nonzero if NAME contains ".." as a path name component.  */
1064  bool  bool
1065  contains_dot_dot (char const *name)  contains_dot_dot (char const *name)

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26