Chapter Contents

Previous

Next
readextlink

readextlink



Read an External Link

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
USAGE NOTES
RELATED FUNCTIONS


SYNOPSIS

#include <unistd.h>
int readextlink(const char *name,
                char *buf,
                size_t size);


DESCRIPTION

readextlink reads the contents of an external link. (See the extlink function description in section extlink for further information on external links.) The name argument specifies the name of the external link. The buf argument specifies the address of a buffer into which the contents of the link should be read, and size specifies the size of the buffer in bytes. If size is 0 , no data is stored, and the length required is returned as the function value.

When you call readextlink in an application which was not compiled with the posix option, the link name is interpreted according to the normal rules for file name interpretation. For this reason, when not compiled with posix the file name should include a style prefix unless the default style is hfs .

Note:   The name stored in buf will not contain any prefix.  [cautionend]


RETURN VALUE

readextlink returns the number of bytes stored in the buffer, or the number of bytes required if size was zero, or -1 if unsuccessful.


USAGE NOTES

The readextlink function can only be used with MVS 5.2.2 or a later release.


RELATED FUNCTIONS

extlink , lstat


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.