KiCad PCB EDA Suite
Loading...
Searching...
No Matches
richio.cpp File Reference
#include <cstdarg>
#include <config.h>
#include <kiplatform/io.h>
#include <core/ignore.h>
#include <richio.h>
#include <errno.h>
#include <advanced_config.h>
#include <io/kicad/kicad_io_utils.h>
#include <wx/translation.h>
#include <wx/ffile.h>

Go to the source code of this file.

Macros

#define getc_unlocked   getc
 
#define NESTWIDTH   2
 

Functions

wxString SafeReadFile (const wxString &aFilePath, const wxString &aReadType)
 Nominally opens a file and reads it into a string.
 

Macro Definition Documentation

◆ getc_unlocked

#define getc_unlocked   getc

Definition at line 48 of file richio.cpp.

Referenced by FILE_LINE_READER::ReadLine().

◆ NESTWIDTH

#define NESTWIDTH   2

Referenced by OUTPUTFORMATTER::Print().

Function Documentation

◆ SafeReadFile()

wxString SafeReadFile ( const wxString & aFilePath,
const wxString & aReadType )

Nominally opens a file and reads it into a string.

But unlike other facilities, this handles mis-encoded Wine-written files on macOS.

Parameters
aFilePath
aReadType
Exceptions
IO_ERRORif the file can't be opened
Returns
the file contents

Definition at line 53 of file richio.cpp.

References _, and THROW_IO_ERROR.

Referenced by PIN_TABLE_IMPORT::ImportData(), LTSPICE_SCHEMATIC::Load(), SPICE_LIBRARY_PARSER::parseFile(), LTSPICE_SCHEMATIC::ReadAsyFile(), and LTSPICE_SCHEMATIC::ReadAsyFiles().