Skip to content

Get SysInfo command reports incorrect path separator on Windows #4

@j4james

Description

@j4james

Given the argument 6, the y (Get SysInfo) command is supposed to return the operating system's path separator. On Windows I would have expected this to be a backslash, but it's not.

The reason for this behaviour is that FBBI is determining which separator to return by testing the __MSDOS__ define. A more accurate result might be accomplished by testing both __MSDOS__ and _WIN32. So maybe something like this:

#if defined(__MSDOS__) || defined(_WIN32) 
  ip_push(i, (long)0|'\\');  /* MS-DOS or Windows paradigm */
#else
  ip_push(i, (long)0|'/');   /* probably.  Mac users will have 2 suffer 4 now :-> */
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions