solvespace/src
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
..
cocoa Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
fonts Rewrite ttf2c to use GNU Unifont and merge with pngchar2c.pl. 2015-12-29 11:15:50 +08:00
gtk Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
icons Rewrite ttf2c to use GNU Unifont and merge with pngchar2c.pl. 2015-12-29 11:15:50 +08:00
srf Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
unix Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
win32 Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
bsp.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
clipboard.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
CMakeLists.txt Refactor Cnf* functions. 2016-01-13 06:45:16 +00:00
config.h.in Remove FLTK port. 2015-07-10 15:59:12 +03:00
confscreen.cpp Use C++ std::{min,max,swap} instead of custom ones. 2015-12-28 21:37:06 +08:00
constraint.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
constrainteq.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
describescreen.cpp Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
draw.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
drawconstraint.cpp Add a new length-difference constraint. 2015-12-28 21:37:07 +08:00
drawentity.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
dsc.h Call constructors and destructors in List and IdList. 2016-01-13 06:45:16 +00:00
entity.cpp Trim trailing whitespace. 2015-07-10 15:59:11 +03:00
export.cpp Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
exportstep.cpp Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
exportvector.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
expr.cpp Allow using the constant "pi" in expressions. 2015-12-28 21:37:07 +08:00
expr.h Optimize Expr::From(double) by statically allocating common constants. 2015-12-28 21:37:07 +08:00
file.cpp Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
font.table.h Moved most of the source into a src/ subdirectory 2013-11-19 18:17:32 -05:00
generate.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
glhelper.cpp Rewrite ttf2c to use GNU Unifont and merge with pngchar2c.pl. 2015-12-29 11:15:50 +08:00
graphicswin.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
group.cpp Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
groupmesh.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
lib.cpp Refactor Cnf* functions. 2016-01-13 06:45:16 +00:00
mesh.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
modify.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
mouse.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
polygon.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
polygon.h Rename RgbColor to RgbaColor. 2015-07-10 15:59:12 +03:00
request.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
sketch.h Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
solvespace.cpp Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
solvespace.h Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
style.cpp Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
system.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
textscreens.cpp Rewrite all path handling with std::string. 2016-01-13 06:45:16 +00:00
textwin.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
toolbar.cpp Rewrite png2c.pl in C++. 2015-12-29 11:15:50 +08:00
ttf.cpp Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
ui.h Add a new length-difference constraint. 2015-12-28 21:37:07 +08:00
undoredo.cpp Replace all ZERO and memset with C++11 brace-initialization. 2016-01-13 06:45:16 +00:00
util.cpp Rigorously treat paths on every platform. 2016-01-13 06:45:16 +00:00
view.cpp Moved most of the source into a src/ subdirectory 2013-11-19 18:17:32 -05:00