2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c3/cwd.c File Reference


Detailed Description

getcwd [Sec. 3.6.4]

Definition in file cwd.c.

Go to the source code of this file.

Compounds

struct  pathlist_node

Defines

#define SAME_INODE(s1, s2)

Functions

bool push_pathlist (struct pathlist_node **head, const char *name)
void free_pathlist (struct pathlist_node **head)
char * get_pathlist (struct pathlist_node *head)
char * getcwdx (void)
int main (void)


Define Documentation

#define SAME_INODE s1,
s2   ) 
 

Value:

((s1).st_dev == (s2).st_dev &&\
                            (s1).st_ino == (s2).st_ino)

Definition at line 77 of file cwd.c.

Referenced by getcwdx().


Function Documentation

void free_pathlist struct pathlist_node **  head  )  [static]
 

Definition at line 45 of file cwd.c.

References pathlist_node::c_next, and head.

Referenced by getcwdx(), and main().

char* get_pathlist struct pathlist_node head  )  [static]
 

Definition at line 56 of file cwd.c.

References pathlist_node::c_name, pathlist_node::c_next, EC_CLEANUP_BGN, EC_CLEANUP_END, ec_null, and head.

Referenced by getcwdx(), and main().

char* getcwdx void   ) 
 

Definition at line 80 of file cwd.c.

References chdir(), close(), closedir(), EC_CLEANUP, EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_false, ec_neg1, ec_null, errno, fchdir(), free_pathlist(), get_pathlist(), head, lstat(), open(), opendir(), push_pathlist(), readdir(), and SAME_INODE.

Referenced by main().

int main void   ) 
 

Definition at line 133 of file cwd.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_false, ec_null, exit(), free_pathlist(), get_pathlist(), getcwdx(), head, and push_pathlist().

bool push_pathlist struct pathlist_node **  head,
const char *  name
[static]
 

Definition at line 30 of file cwd.c.

References pathlist_node::c_name, pathlist_node::c_next, EC_CLEANUP_BGN, EC_CLEANUP_END, ec_null, and head.

Referenced by getcwdx(), and main().


Generated on Fri Apr 23 10:57:08 2004 for AUP2 Example Source by doxygen 1.3.1