diff options
Diffstat (limited to 'dircat.h')
-rw-r--r-- | dircat.h | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1,9 +1,10 @@ -/* Append the contents of multiple directories. DIRS is a - NULL-terminated array of directory nodes. One reference is consumed - for each of them, even on ENOMEM, in which case NULL is returned. - DIRS has to be static data for now, or at list remain available and - unchanged for the duration of the created node's life. Strange - things will happen if they have entries with the same name or if one - of them is not a directory. */ +/* Append the contents of NUM_DIRS directories. DIRS is an array of + directory nodes. One reference is consumed for each of them. If a + memory allocation error occurs, or if one of the directories is a + NULL pointer, the references are dropped immediately and NULL is + returned. The given DIRS array is duplicated and can therefore be + allocated on the caller's stack. Strange things will happen if some + elements of DIRS have entries with the same name or if one of them is + not a directory. */ struct node * -dircat_make_node (struct node **dirs); +dircat_make_node (struct node *const *dirs, int num_dirs); |