Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdlib.h>
    char *_fullpath( char *buffer,
                     const char *path,
                     size_t size );

Description:
    The _fullpath function returns the full pathname of the file
    specification in path in the specified buffer buffer of length size.

    The maximum size that might be required for buffer is  _MAX_PATH.  If
    the buffer provided is too small, NULL is returned and  errno is set.

    If buffer is NULL then a buffer of size  _MAX_PATH is allocated using
     malloc.  This buffer may be freed using the  free function.

    If path is NULL or points to a null string ("") then the current working
    directory is returned in buffer.

Returns:
    The _fullpath function returns a pointer to the full path specification
    if no error occurred.  Otherwise, NULL is returned.

Errors:
    When an error has occurred,  errno contains a value indicating the type
    of error that has been detected.

    ENOENT
        The current working directory could not be obtained.

    ENOMEM
        The buffer could not be allocated.

    ERANGE
        The buffer passed was too small.


See Also:
    _makepath, _splitpath

Example:
    #include <stdio.h>
    #include <stdlib.h>

    void main( int argc, char *argv[] )
      {
        int i;
        char buff[ PATH_MAX ];

        for( i = 1; i < argc; ++i ) {
          puts( argv[i] );
          if( _fullpath( buff, argv[i], PATH_MAX ) ) {
            puts( buff );
          } else {
            puts( "FAIL!" );
          }
        }
      }

Classification:
    WATCOM

Systems:
    All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson