ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.c
(Generate patch)

Comparing libeio/eio.c (file contents):
Revision 1.113 by root, Sun Oct 9 22:25:00 2011 UTC vs.
Revision 1.114 by root, Fri Dec 30 07:38:00 2011 UTC

1487 } 1487 }
1488 } 1488 }
1489 1489
1490 errno = ENAMETOOLONG; 1490 errno = ENAMETOOLONG;
1491 if (res + 1 + len + 1 >= tmp1) 1491 if (res + 1 + len + 1 >= tmp1)
1492 return; 1492 return -1;
1493 1493
1494 /* copy one component */ 1494 /* copy one component */
1495 *res = '/'; 1495 *res = '/';
1496 memcpy (res + 1, beg, len); 1496 memcpy (res + 1, beg, len);
1497 1497
1966 { 1966 {
1967 if (ent->type == EIO_DT_UNKNOWN) 1967 if (ent->type == EIO_DT_UNKNOWN)
1968 { 1968 {
1969 if (*name == '.') /* leading dots are likely directories, and, in any case, rare */ 1969 if (*name == '.') /* leading dots are likely directories, and, in any case, rare */
1970 ent->score = 1; 1970 ent->score = 1;
1971 else if (!strchr (name, '.')) /* absense of dots indicate likely dirs */ 1971 else if (!strchr (name, '.')) /* absence of dots indicate likely dirs */
1972 ent->score = len <= 2 ? 4 - len : len <= 4 ? 4 : len <= 7 ? 5 : 6; /* shorter == more likely dir, but avoid too many classes */ 1972 ent->score = len <= 2 ? 4 - len : len <= 4 ? 4 : len <= 7 ? 5 : 6; /* shorter == more likely dir, but avoid too many classes */
1973 } 1973 }
1974 else if (ent->type == EIO_DT_DIR) 1974 else if (ent->type == EIO_DT_DIR)
1975 ent->score = 0; 1975 ent->score = 0;
1976 } 1976 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines