scandir.3 (6cec9cad762b6476313fb1f8e931a1647822db6b) | scandir.3 (0aee91e1fb311f4f92779bb2c7ef0c1fe10d8d35) |
---|---|
1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 78 unchanged lines hidden (view full) --- 87.Xr strcoll 3 . 88.Pp 89The memory allocated for the array can be deallocated with 90.Xr free 3 , 91by freeing each pointer in the array and then the array itself. 92.Pp 93The 94.Fn scandir_b | 1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 78 unchanged lines hidden (view full) --- 87.Xr strcoll 3 . 88.Pp 89The memory allocated for the array can be deallocated with 90.Xr free 3 , 91by freeing each pointer in the array and then the array itself. 92.Pp 93The 94.Fn scandir_b |
95function behaves in the same way as | 95function behaves in the same way as |
96.Fn scandir , 97but takes blocks as arguments instead of function pointers and calls 98.Fn qsort_b 99rather than 100.Fn qsort . 101.Sh DIAGNOSTICS 102Returns \-1 if the directory cannot be opened for reading or if 103.Xr malloc 3 104cannot allocate enough memory to hold all the data structures. 105.Sh SEE ALSO 106.Xr directory 3 , 107.Xr malloc 3 , 108.Xr qsort 3 , | 96.Fn scandir , 97but takes blocks as arguments instead of function pointers and calls 98.Fn qsort_b 99rather than 100.Fn qsort . 101.Sh DIAGNOSTICS 102Returns \-1 if the directory cannot be opened for reading or if 103.Xr malloc 3 104cannot allocate enough memory to hold all the data structures. 105.Sh SEE ALSO 106.Xr directory 3 , 107.Xr malloc 3 , 108.Xr qsort 3 , |
109.Xr dir 5 , 110.Xr strcoll 3 | 109.Xr strcoll 3 , 110.Xr dir 5 |
111.Sh HISTORY 112The 113.Fn scandir 114and 115.Fn alphasort 116functions appeared in 117.Bx 4.2 . | 111.Sh HISTORY 112The 113.Fn scandir 114and 115.Fn alphasort 116functions appeared in 117.Bx 4.2 . |