|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: sysfunc.c,v 1.3 2003/05/06 20:48:54 stpohle Exp $
|
|
|
|
/* $Id: sysfunc.c,v 1.4 2003/05/06 21:34:07 stpohle Exp $
|
|
|
|
sysfunc.c - this file hold some routines for the system functions..
|
|
|
|
sysfunc.c - this file hold some routines for the system functions..
|
|
|
|
like d_delay
|
|
|
|
like d_delay
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -87,7 +87,31 @@ s_gethomedir ()
|
|
|
|
closedir (dp);
|
|
|
|
closedir (dp);
|
|
|
|
if (entrynr == 0)
|
|
|
|
if (entrynr == 0)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
|
|
direntrys[entrynr - 1].next = NULL;
|
|
|
|
direntrys[entrynr - 1].next = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
return &direntrys[0];
|
|
|
|
return &direntrys[0];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_direntry *s_dirfilter (_direntry *dirstart, signed char dirflags) {
|
|
|
|
|
|
|
|
_direntry *newstart = NULL, *pos = NULL, *old = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (pos = dirstart; pos != NULL; pos = pos->next)
|
|
|
|
|
|
|
|
if (pos->name[0] != '.' && (pos->flags & dirflags) != 0) {
|
|
|
|
|
|
|
|
if (newstart == NULL) {
|
|
|
|
|
|
|
|
newstart = pos;
|
|
|
|
|
|
|
|
old = pos;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
old->next = pos;
|
|
|
|
|
|
|
|
old = pos;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (old != NULL)
|
|
|
|
|
|
|
|
old->next = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return newstart;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|