MAOS
Multithreaded Adaptive Optics Simulator
path.h File Reference

Functions

void addpath2 (int priority, const char *format,...) CHECK_ARG(2)
 
void addpath (const char *path)
 
void rmpath (const char *path)
 
void printpath (void)
 
char * find_file (const char *fn)
 
char * search_file (const char *fn)
 
void freepath (void)
 
char * find_config (const char *name)
 

Detailed Description

This file contains function managing the searching path for files, behaves like PATH in POSIX systems.

Function Documentation

◆ addpath2()

void addpath2 ( int  priority,
const char *  format,
  ... 
)

Add a directory to path. Higher priority is searched first.

◆ addpath()

void addpath ( const char *  path)

Add a directory to path with default priority of 0.

◆ rmpath()

void rmpath ( const char *  path)

Remove a directory from path.

◆ printpath()

void printpath ( void  )

Print current path.

◆ find_file()

char* find_file ( const char *  fn)

Locate a file in path and return its absolute filename. Will emit error if not found.

◆ search_file()

char* search_file ( const char *  fn)

Try to find a file in path and return its absolute filename if exist, NULL otherwise.

◆ freepath()

void freepath ( void  )

Empty the path.

◆ find_config()

char* find_config ( const char *  name)

Find the directory that hold the configuration files. name is "maos" for maos, "skyc" for skyc.