GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
kpse.cc File Reference
#include <cctype>
#include <cerrno>
#include <cstdlib>
#include <map>
#include <fstream>
#include <iostream>
#include <string>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "kpse.h"
#include "lo-sysdep.h"
#include "oct-env.h"
#include "oct-password.h"
#include "oct-time.h"
#include "pathsearch.h"
#include "unistd-wrappers.h"

Go to the source code of this file.

Macros

#define brace_whitespace(c)   (! (c) || (c) == ' ' || (c) == '\t' || (c) == '\n')
 
#define DIR_SEP_STRING   octave::sys::file_ops::dir_sep_str ()
 
#define ENV_SEP   octave::directory_path::path_sep_char ()
 
#define ENV_SEP_STRING   octave::directory_path::path_sep_str ()
 
#define IS_DEVICE_SEP(ch)   octave::sys::file_ops::is_dev_sep (ch)
 
#define IS_DIR_SEP(ch)   octave::sys::file_ops::is_dir_sep (ch)
 
#define IS_ENV_SEP(ch)   octave::directory_path::is_path_sep (ch)
 
#define KPSE_DEBUG
 
#define KPSE_DEBUG_EXPAND   1
 
#define KPSE_DEBUG_P(bit)   (kpse_debug & (1 << (bit)))
 
#define KPSE_DEBUG_SEARCH   2
 
#define KPSE_DEBUG_STAT   0
 
#define KPSE_DEBUG_VARS   3
 
#define KPSE_LAST_DEBUG   KPSE_DEBUG_VARS
 
#define NAME_BEGINS_WITH_DEVICE(name)    (name.length () > 0 && IS_DEVICE_SEP ((name)[1]))
 

Functions

std::list< std::string > kpse_all_path_find_first_of (const std::string &path, const std::list< std::string > &names)
 
std::list< std::string > kpse_all_path_search (const std::string &path, const std::string &name)
 
std::string kpse_element_dir (const std::string &elt)
 
std::string kpse_path_expand (const std::string &path)
 
std::string kpse_path_find_first_of (const std::string &path, const std::list< std::string > &names)
 
std::string kpse_path_search (const std::string &path, const std::string &name)
 
std::list< std::string > path_find_first_of (const std::string &path, const std::list< std::string > &names, bool all)
 

Variables

unsigned int kpse_debug = 0
 

Macro Definition Documentation

◆ brace_whitespace

#define brace_whitespace (   c)    (! (c) || (c) == ' ' || (c) == '\t' || (c) == '\n')

Definition at line 826 of file kpse.cc.

◆ DIR_SEP_STRING

#define DIR_SEP_STRING   octave::sys::file_ops::dir_sep_str ()

Definition at line 67 of file kpse.cc.

◆ ENV_SEP

#define ENV_SEP   octave::directory_path::path_sep_char ()

Definition at line 70 of file kpse.cc.

◆ ENV_SEP_STRING

#define ENV_SEP_STRING   octave::directory_path::path_sep_str ()

Definition at line 71 of file kpse.cc.

◆ IS_DEVICE_SEP

#define IS_DEVICE_SEP (   ch)    octave::sys::file_ops::is_dev_sep (ch)

Definition at line 63 of file kpse.cc.

◆ IS_DIR_SEP

#define IS_DIR_SEP (   ch)    octave::sys::file_ops::is_dir_sep (ch)

Definition at line 68 of file kpse.cc.

◆ IS_ENV_SEP

#define IS_ENV_SEP (   ch)    octave::directory_path::is_path_sep (ch)

Definition at line 72 of file kpse.cc.

◆ KPSE_DEBUG

#define KPSE_DEBUG

Definition at line 78 of file kpse.cc.

◆ KPSE_DEBUG_EXPAND

#define KPSE_DEBUG_EXPAND   1

Definition at line 84 of file kpse.cc.

◆ KPSE_DEBUG_P

#define KPSE_DEBUG_P (   bit)    (kpse_debug & (1 << (bit)))

Definition at line 81 of file kpse.cc.

◆ KPSE_DEBUG_SEARCH

#define KPSE_DEBUG_SEARCH   2

Definition at line 85 of file kpse.cc.

◆ KPSE_DEBUG_STAT

#define KPSE_DEBUG_STAT   0

Definition at line 83 of file kpse.cc.

◆ KPSE_DEBUG_VARS

#define KPSE_DEBUG_VARS   3

Definition at line 86 of file kpse.cc.

◆ KPSE_LAST_DEBUG

#define KPSE_LAST_DEBUG   KPSE_DEBUG_VARS

Definition at line 87 of file kpse.cc.

◆ NAME_BEGINS_WITH_DEVICE

#define NAME_BEGINS_WITH_DEVICE (   name)     (name.length () > 0 && IS_DEVICE_SEP ((name)[1]))

Definition at line 64 of file kpse.cc.

Function Documentation

◆ kpse_all_path_find_first_of()

std::list<std::string> kpse_all_path_find_first_of ( const std::string &  path,
const std::list< std::string > &  names 
)

Definition at line 746 of file kpse.cc.

Referenced by directory_path::find_all_first_of().

◆ kpse_all_path_search()

std::list< std::string > kpse_all_path_search ( const std::string &  path,
const std::string &  name 
)

Definition at line 566 of file kpse.cc.

Referenced by directory_path::find_all().

◆ kpse_element_dir()

std::string kpse_element_dir ( const std::string &  elt)

Definition at line 1025 of file kpse.cc.

References dir_exists(), DIR_SEP_STRING, IS_DEVICE_SEP, and IS_DIR_SEP.

Referenced by directory_path::all_directories().

◆ kpse_path_expand()

std::string kpse_path_expand ( const std::string &  path)

Definition at line 757 of file kpse.cc.

References len.

◆ kpse_path_find_first_of()

std::string kpse_path_find_first_of ( const std::string &  path,
const std::list< std::string > &  names 
)

Definition at line 730 of file kpse.cc.

Referenced by directory_path::find_first_of().

◆ kpse_path_search()

std::string kpse_path_search ( const std::string &  path,
const std::string &  name 
)

Definition at line 555 of file kpse.cc.

Referenced by directory_path::find_first().

◆ path_find_first_of()

std::list<std::string> path_find_first_of ( const std::string &  path,
const std::list< std::string > &  names,
bool  all 
)

Definition at line 576 of file kpse.cc.

Variable Documentation

◆ kpse_debug

unsigned int kpse_debug = 0

Definition at line 91 of file kpse.cc.