* fs.h (compute_namelen): New inline function to take care of
the d_namlen field if and only if it's needed.
Этот коммит содержится в:
родитель
58da40fa6a
Коммит
8d173014e9
@ -1,5 +1,8 @@
|
||||
2002-08-15 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* fs.h (compute_namelen): New inline function to take care of
|
||||
the d_namlen field if and only if it's needed.
|
||||
|
||||
* screen.c (string_file_name): Replace non-printable characters
|
||||
with question marks.
|
||||
|
||||
|
8
src/fs.h
8
src/fs.h
@ -84,4 +84,12 @@
|
||||
# endif /* HAVE_NDIR_H */
|
||||
#endif /* not (HAVE_DIRENT_H or _POSIX_VERSION) */
|
||||
|
||||
static inline void compute_namelen(struct dirent* dent) {
|
||||
#ifdef DIRENT_LENGTH_COMPUTED
|
||||
return;
|
||||
#else
|
||||
dent->d_namlen = strlen (dent);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* !__FS_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user