fetchmail-friends
[Top] [All Lists]

[fetchmail]Suggested change to rcfile_y.y

2004-01-16 10:26:32
Hello,
The following addition to rcfile_y.y (from v6.2.4) helps a lot when building fetchmail for DOS-ish systems like windows, dos, or os/2. It is particularly effective when it parses environment variables like HOME.

Change (starting at line 497)
    if (!file[0]         ||             /* null path */
         file[0] == '/'  ||             /* absolute path */
         strcmp(file, "-") == 0 ||    /* stdin/stdout */
         !dir[0])                       /* we don't HAVE_GETCWD */
        return xstrdup (file);

to
    if (!file[0]         ||             /* null path */
         file[0] == '/'  ||             /* absolute path */
         file[0] == '\\' ||             /* absolute path */
         NULL != strstr(file, ":\\") ||       /* absolute path & drive letter */
         file[1] == ':'  ||             /* drive specified */
         strcmp(file, "-") == 0 ||    /* stdin/stdout */
         !dir[0])                       /* we don't HAVE_GETCWD */
        return xstrdup (file);


--
jimoe at sohnen-moe dot com


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]Suggested change to rcfile_y.y, James M Moe <=