/[path-sandbox]/trunk/getcwd.c
Gentoo

Diff of /trunk/getcwd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 30 Revision 43
227 bytes of BUF. Returns NULL if the directory couldn't be determined or 227 bytes of BUF. Returns NULL if the directory couldn't be determined or
228 SIZE was too small. If successful, returns BUF. In GNU, if BUF is 228 SIZE was too small. If successful, returns BUF. In GNU, if BUF is
229 NULL, an array is allocated with `malloc'; the array is SIZE bytes long, 229 NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
230 unless SIZE == 0, in which case it is as big as necessary. */ 230 unless SIZE == 0, in which case it is as big as necessary. */
231 231
232GETCWD_RETURN_TYPE 232SB_STATIC GETCWD_RETURN_TYPE
233__egetcwd(buf, size) 233__egetcwd(buf, size)
234char *buf; 234char *buf;
235size_t size; 235size_t size;
236{ 236{
237 static const char dots[] 237 static const char dots[]
470 if (buf == NULL) 470 if (buf == NULL)
471 free(path); 471 free(path);
472 return NULL; 472 return NULL;
473} 473}
474 474
475GETCWD_RETURN_TYPE 475SB_STATIC GETCWD_RETURN_TYPE
476egetcwd(buf, size) 476egetcwd(buf, size)
477char *buf; 477char *buf;
478size_t size; 478size_t size;
479{ 479{
480 struct stat st; 480 struct stat st;

Legend:
Removed from v.30  
changed lines
  Added in v.43

  ViewVC Help
Powered by ViewVC 1.1.20