The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

pwd.c File Reference

#include "jam.h"
#include "lists.h"
#include "newstr.h"
#include "pathsys.h"
#include <limits.h>
#include <unistd.h>

Include dependency graph for pwd.c:

Include dependency graph

Go to the source code of this file.

Functions

LISTpwd (void)


Function Documentation

LIST* pwd void   ) 
 

Definition at line 19 of file pwd.c.

References L0, list_new(), and newstr().

Referenced by builtin_pwd().

00020 {
00021     char buffer[PATH_MAX];
00022     if (getcwd(buffer, sizeof(buffer)) == NULL)
00023     {
00024         perror("can not get current directory");
00025         return L0;
00026     }
00027     else
00028     {
00029 #ifdef NT
00030         return list_new(L0, short_path_to_long_path(buffer));
00031 #else
00032         return list_new(L0, newstr(buffer));
00033 #endif
00034     }
00035 }

Here is the call graph for this function:


Generated on Mon Nov 8 17:08:16 2004 for MPT by  doxygen 1.3.9.1