shithub: femtolisp

ref: c6a977063e97d4d1a9b4c07d2e0c7d0ceb02a6c0
dir: /llt/dirpath.h/

View raw version
#ifndef __DIRPATH_H_
#define __DIRPATH_H_

#ifdef WIN32
#define PATHSEP '\\'
#define PATHSEPSTRING "\\"
#define PATHLISTSEP ';'
#define PATHLISTSEPSTRING ";"
#define ISPATHSEP(c) ((c)=='/' || (c)=='\\')
#define MAXPATHLEN 1024
#else
#define PATHSEP '/'
#define PATHSEPSTRING "/"
#define PATHLISTSEP ':'
#define PATHLISTSEPSTRING ":"
#define ISPATHSEP(c) ((c)=='/')
#endif

void get_cwd(char *buf, size_t size);
int set_cwd(char *buf);
char *get_exename(char *buf, size_t size);
void path_to_dirname(char *path);

#endif