Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2010 Blender Foundation. All rights reserved. */
|
|
|
|
/** \file
|
|
* \ingroup GHOST
|
|
*/
|
|
|
|
#include <cstdio>
|
|
|
|
#include "GHOST_ISystemPaths.h"
|
|
#include "GHOST_Path-api.h"
|
|
#include "GHOST_Types.h"
|
|
#include "intern/GHOST_Debug.h"
|
|
|
|
GHOST_TSuccess GHOST_CreateSystemPaths(void)
|
|
{
|
|
return GHOST_ISystemPaths::create();
|
|
}
|
|
|
|
GHOST_TSuccess GHOST_DisposeSystemPaths(void)
|
|
{
|
|
return GHOST_ISystemPaths::dispose();
|
|
}
|
|
|
|
const char *GHOST_getSystemDir(int version, const char *versionstr)
|
|
{
|
|
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
|
|
return systemPaths ? systemPaths->getSystemDir(version, versionstr) : NULL;
|
|
}
|
|
|
|
const char *GHOST_getUserDir(int version, const char *versionstr)
|
|
{
|
|
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
|
|
return systemPaths ? systemPaths->getUserDir(version, versionstr) : NULL; /* shouldn't be NULL */
|
|
}
|
|
|
|
const char *GHOST_getUserSpecialDir(GHOST_TUserSpecialDirTypes type)
|
|
{
|
|
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
|
|
return systemPaths ? systemPaths->getUserSpecialDir(type) : NULL; /* shouldn't be NULL */
|
|
}
|
|
|
|
const char *GHOST_getBinaryDir()
|
|
{
|
|
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
|
|
return systemPaths ? systemPaths->getBinaryDir() : NULL; /* shouldn't be NULL */
|
|
}
|
|
|
|
void GHOST_addToSystemRecentFiles(const char *filename)
|
|
{
|
|
GHOST_ISystemPaths *systemPaths = GHOST_ISystemPaths::get();
|
|
if (systemPaths) {
|
|
systemPaths->addToSystemRecentFiles(filename);
|
|
}
|
|
}
|