YAP 7.1.0
absf.c File Reference

absolute file name: C ut in a different light More...

#include "Yap.h"
#include "YapFlags.h"
#include "yapio.h"
#include "sysbits.h"
#include <cwalk.h>

Go to the source code of this file.

Macros

#define ABSOLUTE_FILE_NAME_DEFS()
 
#define PAR(x, y, z)   z
 
#define PAR(x, y, z)    { x, y, z }
 

Typedefs

typedef enum ABSOLUTE_FILE_NAME_enum_ absolute_file_name_choices_t
 

Enumerations

enum  ABSOLUTE_FILE_NAME_enum_ { ABSOLUTE_FILE_NAME_DEFS =() }
 

Functions

const char * Yap_AbsoluteFile (const char *spec, bool ok)
 generate absolute path, if ok first expand SICStus Prolog style More...
 
bool Yap_IsAbsolutePath (const char *p0, bool expand)
 
const char * Yap_GetFileName (Term t USES_REGS)
 
void Yap_InitAbsfPreds (void)
 

Detailed Description

absolute file name: C ut in a different light

Author
VITOR SANTOS COSTA vsc@V.nosp@m.ITOR.nosp@m.s-MBP.nosp@m..lan
Date
Wed Jan 20 00:45:56 2016

lo *

Definition in file absf.c.

Macro Definition Documentation

◆ ABSOLUTE_FILE_NAME_DEFS

#define ABSOLUTE_FILE_NAME_DEFS ( )
Value:
PAR("access", isatom, ABSOLUTE_FILE_NAME_ACCESS) , \
PAR("expand", booleanFlag, ABSOLUTE_FILE_NAME_EXPAND), \
PAR("extensions", ok, ABSOLUTE_FILE_NAME_EXTENSIONS) , \
PAR("file_errors", is_file_errors, ABSOLUTE_FILE_NAME_FILE_ERRORS), \
PAR("file_type", is_file_type, ABSOLUTE_FILE_NAME_FILE_TYPE) , \
PAR("glob", ok, ABSOLUTE_FILE_NAME_GLOB) , \
PAR("relative_to", isatom, ABSOLUTE_FILE_NAME_RELATIVE_TO), \
PAR("solutions", issolutions, ABSOLUTE_FILE_NAME_SOLUTIONS) , \
PAR("verbose_file_search", booleanFlag, ABSOLUTE_FILE_NAME_VERBOSE_FILE_SEARCH), \
PAR(NULL, ok, ABSOLUTE_FILE_NAME_END)

Definition at line 890 of file absf.c.

◆ PAR [1/2]

#define PAR (   x,
  y,
 
)    z

Definition at line 910 of file absf.c.

◆ PAR [2/2]

#define PAR (   x,
  y,
 
)     { x, y, z }

Definition at line 910 of file absf.c.

Enumeration Type Documentation

◆ ABSOLUTE_FILE_NAME_enum_

enum ABSOLUTE_FILE_NAME_enum_

Definition at line 904 of file absf.c.

Function Documentation

◆ Yap_AbsoluteFile()

const char * Yap_AbsoluteFile ( const char *  spec,
bool  ok 
)

generate absolute path, if ok first expand SICStus Prolog style

Parameters
[in]specthe file path, including ~ and $
[in]okwhere to process ~ and $
Returns
tmp, or NULL, in malloced memory

spec gothe original spec;

rc0 may be an outout buffer rc1 the internal buffer

PlExpandVars

spec gothe original spec; rc1 the internal buffer

Definition at line 145 of file absf.c.

◆ Yap_GetFileName()

const char * Yap_GetFileName ( Term t  USES_REGS)

Definition at line 606 of file absf.c.

◆ Yap_InitAbsfPreds()

void Yap_InitAbsfPreds ( void  )

Definition at line 998 of file absf.c.

◆ Yap_IsAbsolutePath()

bool Yap_IsAbsolutePath ( const char *  p0,
bool  expand 
)

Definition at line 512 of file absf.c.