KiCad PCB EDA Suite
search_stack.cpp File Reference
#include <macros.h>
#include <search_stack.h>
#include <trace_helpers.h>
#include <wx/tokenzr.h>
#include <wx/log.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

◆ PATH_SEPS

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

Definition at line 35 of file search_stack.cpp.

Function Documentation

◆ base_dir()

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

Definition at line 55 of file search_stack.cpp.

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

Referenced by SEARCH_STACK::FilenameWithRelativePathInSearchList().