NEURON
fileio.cpp File Reference
#include <../../nrnconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdarg>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <locale>
#include <optional>
#include <regex>
#include "ocmisc.h"
#include "hocstr.h"
#include "parse.hpp"
#include "hocparse.h"
#include <errno.h>
#include "nrnfilewrap.h"
#include <fmt/format.h>

Go to the source code of this file.

Functions

void hoc_stdout (void)
 
void hoc_ropen (void)
 
void hoc_wopen (void)
 
const char * expand_env_var (const char *s)
 
char * hoc_current_xopen (void)
 
int hoc_xopen1 (const char *name, const char *rcs)
 
void hoc_xopen (void)
 
void hoc_Fprint (void)
 
void hoc_PRintf (void)
 
void hoc_Sprint (void)
 
double hoc_scan (FILE *fi)
 
double hoc_fw_scan (NrnFILEWrap *fi)
 
void hoc_Fscan (void)
 
void hoc_Getstr (void)
 
void hoc_sprint1 (char **ppbuf, int argn)
 
static auto split_paths (const std::string &input)
 
static auto default_search_paths ()
 
static std::optional< std::string > search_hoc_files_regex (const std::regex &pattern, const std::vector< std::string > &paths)
 
static int hoc_Load_file (int, const char *)
 
static void hoc_load (const char *stype)
 
void hoc_load_proc (void)
 
void hoc_load_func (void)
 
void hoc_load_template (void)
 
void hoc_load_file (void)
 
char * hoc_back2forward (char *)
 
void hoc_getcwd (void)
 
void hoc_machine_name (void)
 
int hoc_chdir (const char *path)
 
void hoc_Chdir (void)
 
void nrnpy_set_pr_etal (int(*cbpr_stdoe)(int, char *), int(*cbpass)())
 
void nrnpy_pass ()
 
void hoc_execerr_ext (const char *fmt,...)
 printf style specification of hoc_execerror message. More...
 

Variables

char * neuron_home
 
NrnFILEWraphoc_frin
 
FILE * hoc_fout
 
size_t hoc_xopen_file_size_
 
char * hoc_xopen_file_
 
static constexpr auto hoc_load_file_size_ = 1024
 
int nrn_is_python_extension
 
int(* nrnpy_pr_stdoe_callback )(int, char *)
 
static int(* nrnpy_pass_callback )()
 

Function Documentation

◆ default_search_paths()

static auto default_search_paths ( )
static

Definition at line 514 of file fileio.cpp.

◆ hoc_back2forward()

char* hoc_back2forward ( char *  )

◆ hoc_Chdir()

void hoc_Chdir ( void  )

Definition at line 804 of file fileio.cpp.

◆ hoc_current_xopen()

char* hoc_current_xopen ( void  )

Definition at line 161 of file fileio.cpp.

◆ hoc_Fprint()

void hoc_Fprint ( void  )

Definition at line 243 of file fileio.cpp.

◆ hoc_Fscan()

void hoc_Fscan ( void  )

Definition at line 322 of file fileio.cpp.

◆ hoc_fw_scan()

double hoc_fw_scan ( NrnFILEWrap fi)

Definition at line 302 of file fileio.cpp.

◆ hoc_getcwd()

void hoc_getcwd ( void  )

Definition at line 766 of file fileio.cpp.

◆ hoc_Getstr()

void hoc_Getstr ( void  )

Definition at line 337 of file fileio.cpp.

◆ hoc_load()

static void hoc_load ( const char *  stype)
static

Definition at line 578 of file fileio.cpp.

◆ hoc_Load_file()

static int hoc_Load_file ( int  always,
const char *  name 
)
static

Definition at line 629 of file fileio.cpp.

◆ hoc_load_file()

void hoc_load_file ( void  )

Definition at line 614 of file fileio.cpp.

◆ hoc_load_func()

void hoc_load_func ( void  )

Definition at line 603 of file fileio.cpp.

◆ hoc_load_proc()

void hoc_load_proc ( void  )

Definition at line 598 of file fileio.cpp.

◆ hoc_load_template()

void hoc_load_template ( void  )

Definition at line 608 of file fileio.cpp.

◆ hoc_machine_name()

void hoc_machine_name ( void  )

Definition at line 787 of file fileio.cpp.

◆ hoc_PRintf()

void hoc_PRintf ( void  )

Definition at line 254 of file fileio.cpp.

◆ hoc_ropen()

void hoc_ropen ( void  )

Definition at line 60 of file fileio.cpp.

◆ hoc_scan()

double hoc_scan ( FILE *  fi)

Definition at line 280 of file fileio.cpp.

◆ hoc_Sprint()

void hoc_Sprint ( void  )

Definition at line 268 of file fileio.cpp.

◆ hoc_stdout()

void hoc_stdout ( void  )

Definition at line 29 of file fileio.cpp.

◆ hoc_wopen()

void hoc_wopen ( void  )

Definition at line 88 of file fileio.cpp.

◆ hoc_xopen()

void hoc_xopen ( void  )

Definition at line 232 of file fileio.cpp.

◆ nrnpy_set_pr_etal()

void nrnpy_set_pr_etal ( int(*)(int, char *)  cbpr_stdoe,
int(*)()  cbpass 
)

Definition at line 814 of file fileio.cpp.

◆ search_hoc_files_regex()

static std::optional<std::string> search_hoc_files_regex ( const std::regex &  pattern,
const std::vector< std::string > &  paths 
)
static

Definition at line 534 of file fileio.cpp.

◆ split_paths()

static auto split_paths ( const std::string &  input)
static

Definition at line 486 of file fileio.cpp.

Variable Documentation

◆ hoc_fout

FILE* hoc_fout

Definition at line 27 of file fileio.cpp.

◆ hoc_frin

NrnFILEWrap* hoc_frin

Definition at line 26 of file fileio.cpp.

◆ hoc_load_file_size_

constexpr auto hoc_load_file_size_ = 1024
staticconstexpr

Definition at line 628 of file fileio.cpp.

◆ hoc_xopen_file_

char* hoc_xopen_file_

Definition at line 159 of file fileio.cpp.

◆ hoc_xopen_file_size_

size_t hoc_xopen_file_size_

Definition at line 158 of file fileio.cpp.

◆ neuron_home

char* neuron_home
extern

Definition at line 227 of file hoc_init.cpp.

◆ nrn_is_python_extension

int nrn_is_python_extension

Definition at line 810 of file fileio.cpp.

◆ nrnpy_pass_callback

int(* nrnpy_pass_callback) () ( )
static

Definition at line 812 of file fileio.cpp.

◆ nrnpy_pr_stdoe_callback

int(* nrnpy_pr_stdoe_callback) (int, char *) ( int  ,
char *   
)

Definition at line 811 of file fileio.cpp.