KiCad PCB EDA Suite
search_stack.cpp File Reference
#include <macros.h>
#include <search_stack.h>
#include <wx/tokenzr.h>

Go to the source code of this file.

Macros

#define PATH_SEPS   wxT( ":;\r\n" )
 

Functions

static wxString base_dir (const wxString &aRelativePath, const wxString &aBaseDir)
 

Macro Definition Documentation

#define PATH_SEPS   wxT( ":;\r\n" )

Definition at line 33 of file search_stack.cpp.

Referenced by SEARCH_STACK::Split().

Function Documentation

static wxString base_dir ( const wxString &  aRelativePath,
const wxString &  aBaseDir 
)
static

Definition at line 53 of file search_stack.cpp.

Referenced by SEARCH_STACK::FilenameWithRelativePathInSearchList().

54 {
55  wxFileName fn = aRelativePath;
56 
57  if( !fn.IsAbsolute() && !!aBaseDir )
58  {
59  wxASSERT_MSG( wxFileName( aBaseDir ).IsAbsolute(), wxT( "Must pass absolute path in aBaseDir" ) );
60  fn.MakeRelativeTo( aBaseDir );
61  }
62 
63  return fn.GetFullPath();
64 }