#ifndef MAILBOX_H #define MAILBOX_H /* This structure represents a single mail. - nam points to a string that gives the file name of the mail - size is the file size of the mail. - del is initialized to zero and can be used as appropriate. */ struct entry { char * nam; int size; int del; }; /* This functions reads all regular files in the directory given by dirname. For each file a struct entry is allocated and inserted into the array given by list. The memory for the pointers in list must be allocated by the caller. The number of elements availiable in the list is given by listlen. The return value gives the number of entries in the list. If an error occurs -1 is returned an errno is set to indicate the error. */ int get_dir_entries (char * dirname, struct entry *list[], int listlen); #endif