solvespace/src/unix
whitequark 5c9c32cfc7 Rigorously treat paths on every platform.
After this commit, SolveSpace deals with paths as follows:

  * Paths are generally treated as opaque platform-specific strings.
    This helps on Linux, because paths on Linux don't have any
    specific encoding and it helps to avoid any operations on them.

  * The UI in some places wants to get a basename. In this case,
    the newly introduced PATH_SEP is used. This allows to treat
    backslash as a regular character, which it is on Linux and OS X.

  * The only place where any nontrivial operations on paths are
    performed is the g->impFile/impFileRel logic.

    Specifically, when saved, g->impFile always contains an absolute
    path with separators of the current platform, and g->impFileRel
    always contains a relative path with UNIX separators. This allows
    to treat backslash as a regular character.

    Old files will contain g->impFileRel with Windows separators;
    these are detected by looking for a drive letter in g->impFile
    and in that case mapping Windows separators to UNIX ones.

There is no need to treat UNIX separators (forward slashes) in
any special way on Windows because there is no way on Windows,
not even via UNC paths, to create or address a directory entry
with a forward slash in its name.
2016-01-13 06:45:16 +00:00
..
gloffscreen.cpp Fix read of uninitialized memory. 2015-12-28 21:37:06 +08:00
gloffscreen.h Implement OS X port. 2015-07-10 15:59:12 +03:00
solvespace-16x16.png Add a desktop file in the format understandable by Ubuntu. 2015-07-10 15:59:12 +03:00
solvespace-24x24.png Add a desktop file in the format understandable by Ubuntu. 2015-07-10 15:59:12 +03:00
solvespace-32x32.png Add a desktop file in the format understandable by Ubuntu. 2015-07-10 15:59:12 +03:00
solvespace-48x48.png Add a desktop file in the format understandable by Ubuntu. 2015-07-10 15:59:12 +03:00
solvespace.desktop Add a desktop file in the format understandable by Ubuntu. 2015-07-10 15:59:12 +03:00
unixutil.cpp Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00