-
Notifications
You must be signed in to change notification settings - Fork 8
/
unixisms.h
39 lines (31 loc) · 964 Bytes
/
unixisms.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* unixisms.h: Copyright (C) 2011-2022 by
* Brian Raiter <[email protected]>
* License GPLv2+: GNU GPL version 2 or later.
*/
#ifndef _unixisms_h_
#define _unixisms_h_
/*
* Basic functionality not provided by the standard C library. The
* implementation of these functions is platform-dependent.
*/
/* Change the current directory to the given pathname.
*/
extern int changedir(char const *name);
/* Remember the current directory.
*/
extern int savedir(void);
/* Change back to the directory that was remembered by savedir(). This
* function may be called repeatedly.
*/
extern int restoredir(void);
/* Forget the directory remembered by savedir().
*/
extern void unsavedir(void);
/* Return true if the given pathname is a directory.
*/
extern int fileisdir(char const *name);
/* Return a pointer to the base filename part of the given pathname,
* after any directories.
*/
extern char const *getbasefilename(char const *name);
#endif