1 --- scandir.3.orig 2009-05-12 11:21:55.000000000 -0700
2 +++ scandir.3 2009-05-20 15:41:07.000000000 -0700
4 .\" @(#)scandir.3 8.1 (Berkeley) 6/4/93
5 .\" $FreeBSD: src/lib/libc/gen/scandir.3,v 1.8 2002/12/19 09:40:21 ru Exp $
13 +#ifdef UNIFDEF_BLOCKS
24 .Fn scandir "const char *dirname" "struct dirent ***namelist" "int \\*(lp*select\\*(rp\\*(lpstruct dirent *\\*(rp" "int \\*(lp*compar\\*(rp\\*(lpconst void *, const void *\\*(rp"
26 .Fn alphasort "const void *d1" "const void *d2"
27 +#ifdef UNIFDEF_BLOCKS
29 +.Fn scandir_b "const char *dirname" "struct dirent ***namelist" "int \\*(lp^select\\*(rp\\*(lpstruct dirent *\\*(rp" "int \\*(lp^compar\\*(rp\\*(lpconst void *, const void *\\*(rp"
36 to sort the completed array.
37 If this pointer is null, the array is not sorted.
38 +Note that from within the
40 +subroutine, the two arguments are of type
41 +.Ft const struct dirent ** ,
42 +so that a double-dereference is needed to access the fields in the
49 The memory allocated for the array can be deallocated with
51 by freeing each pointer in the array and then the array itself.
52 +#ifdef UNIFDEF_BLOCKS
56 +function works the same way as the
58 +function, except that
62 +are blocks instead of subroutines.
65 Returns \-1 if the directory cannot be opened for reading or if
71 +#ifdef UNIFDEF_BLOCKS
74 +function appeared in Mac OS X 10.6.