- len = clean_line (line);
-
- /* Extracting name is a bit of black magic and we have to do it
- before `strtok' inserted extra \0 characters in the line
- string. For the moment let us just suppose that the name starts at
- column 39 of the listing. This way we could also recognize
- filenames that begin with a series of space characters (but who
- really wants to use such filenames anyway?). */
- if (len < 40) goto continue_loop;
- tok = line + 39;
- cur.name = xstrdup(tok);
- DEBUGP (("Name: '%s'\n", cur.name));
-
- /* First column: mm-dd-yy. Should atoi() on the month fail, january
- will be assumed. */
+ len = clean_line (line, len);
+
+ /* Name begins at 39 column of the listing if date presented in `mm-dd-yy'
+ format or at 41 column if date presented in `mm-dd-yyyy' format. Thus,
+ we cannot extract name before we parse date. Using this information we
+ also can recognize filenames that begin with a series of space
+ characters (but who really wants to use such filenames anyway?). */
+ if (len < 40) continue;
+ filename = line + 39;
+
+ /* First column: mm-dd-yy or mm-dd-yyyy. Should atoi() on the month fail,
+ january will be assumed. */