Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: fusl/include/dirent.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/include/dirent.h
diff --git a/fusl/include/dirent.h b/fusl/include/dirent.h
index 5aa8510bfd4330ba10d76c9ac7cc9756981f0bbe..e44835fbc209d3991b339c96c5d2a706f51aa163 100644
--- a/fusl/include/dirent.h
+++ b/fusl/include/dirent.h
@@ -1,5 +1,5 @@
-#ifndef _DIRENT_H
-#define _DIRENT_H
+#ifndef _DIRENT_H
+#define _DIRENT_H
#ifdef __cplusplus
extern "C" {
@@ -17,29 +17,33 @@ extern "C" {
typedef struct __dirstream DIR;
-struct dirent
-{
- ino_t d_ino;
- off_t d_off;
- unsigned short d_reclen;
- unsigned char d_type;
- char d_name[256];
+struct dirent {
+ ino_t d_ino;
+ off_t d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
};
#define d_fileno d_ino
-int closedir(DIR *);
-DIR *fdopendir(int);
-DIR *opendir(const char *);
-struct dirent *readdir(DIR *);
-int readdir_r(DIR *__restrict, struct dirent *__restrict, struct dirent **__restrict);
-void rewinddir(DIR *);
-void seekdir(DIR *, long);
-long telldir(DIR *);
-int dirfd(DIR *);
+int closedir(DIR*);
+DIR* fdopendir(int);
+DIR* opendir(const char*);
+struct dirent* readdir(DIR*);
+int readdir_r(DIR* __restrict,
+ struct dirent* __restrict,
+ struct dirent** __restrict);
+void rewinddir(DIR*);
+void seekdir(DIR*, long);
+long telldir(DIR*);
+int dirfd(DIR*);
-int alphasort(const struct dirent **, const struct dirent **);
-int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
+int alphasort(const struct dirent**, const struct dirent**);
+int scandir(const char*,
+ struct dirent***,
+ int (*)(const struct dirent*),
+ int (*)(const struct dirent**, const struct dirent**));
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define DT_UNKNOWN 0
@@ -51,13 +55,13 @@ int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int
#define DT_LNK 10
#define DT_SOCK 12
#define DT_WHT 14
-#define IFTODT(x) ((x)>>12 & 017)
-#define DTTOIF(x) ((x)<<12)
-int getdents(int, struct dirent *, size_t);
+#define IFTODT(x) ((x) >> 12 & 017)
+#define DTTOIF(x) ((x) << 12)
+int getdents(int, struct dirent*, size_t);
#endif
#ifdef _GNU_SOURCE
-int versionsort(const struct dirent **, const struct dirent **);
+int versionsort(const struct dirent**, const struct dirent**);
#endif
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)

Powered by Google App Engine
This is Rietveld 408576698