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

Unified Diff: fusl/include/stdio.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/stdio.h
diff --git a/fusl/include/stdio.h b/fusl/include/stdio.h
index 884d2e6a72768b5ea0d78fb1aef88abd969ba92b..3b62650695b0f2527072d46f004cd30c80275b9c 100644
--- a/fusl/include/stdio.h
+++ b/fusl/include/stdio.h
@@ -11,9 +11,8 @@ extern "C" {
#define __NEED___isoc_va_list
#define __NEED_size_t
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
- || defined(_BSD_SOURCE)
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \
+ defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_ssize_t
#define __NEED_off_t
#define __NEED_va_list
@@ -48,140 +47,137 @@ extern "C" {
#define L_tmpnam 20
typedef union _G_fpos64_t {
- char __opaque[16];
- double __align;
+ char __opaque[16];
+ double __align;
} fpos_t;
-extern FILE *const stdin;
-extern FILE *const stdout;
-extern FILE *const stderr;
+extern FILE* const stdin;
+extern FILE* const stdout;
+extern FILE* const stderr;
-#define stdin (stdin)
+#define stdin (stdin)
#define stdout (stdout)
#define stderr (stderr)
-FILE *fopen(const char *__restrict, const char *__restrict);
-FILE *freopen(const char *__restrict, const char *__restrict, FILE *__restrict);
-int fclose(FILE *);
+FILE* fopen(const char* __restrict, const char* __restrict);
+FILE* freopen(const char* __restrict, const char* __restrict, FILE* __restrict);
+int fclose(FILE*);
-int remove(const char *);
-int rename(const char *, const char *);
+int remove(const char*);
+int rename(const char*, const char*);
-int feof(FILE *);
-int ferror(FILE *);
-int fflush(FILE *);
-void clearerr(FILE *);
+int feof(FILE*);
+int ferror(FILE*);
+int fflush(FILE*);
+void clearerr(FILE*);
-int fseek(FILE *, long, int);
-long ftell(FILE *);
-void rewind(FILE *);
+int fseek(FILE*, long, int);
+long ftell(FILE*);
+void rewind(FILE*);
-int fgetpos(FILE *__restrict, fpos_t *__restrict);
-int fsetpos(FILE *, const fpos_t *);
+int fgetpos(FILE* __restrict, fpos_t* __restrict);
+int fsetpos(FILE*, const fpos_t*);
-size_t fread(void *__restrict, size_t, size_t, FILE *__restrict);
-size_t fwrite(const void *__restrict, size_t, size_t, FILE *__restrict);
+size_t fread(void* __restrict, size_t, size_t, FILE* __restrict);
+size_t fwrite(const void* __restrict, size_t, size_t, FILE* __restrict);
-int fgetc(FILE *);
-int getc(FILE *);
+int fgetc(FILE*);
+int getc(FILE*);
int getchar(void);
-int ungetc(int, FILE *);
+int ungetc(int, FILE*);
-int fputc(int, FILE *);
-int putc(int, FILE *);
+int fputc(int, FILE*);
+int putc(int, FILE*);
int putchar(int);
-char *fgets(char *__restrict, int, FILE *__restrict);
+char* fgets(char* __restrict, int, FILE* __restrict);
#if __STDC_VERSION__ < 201112L
-char *gets(char *);
+char* gets(char*);
#endif
-int fputs(const char *__restrict, FILE *__restrict);
-int puts(const char *);
-
-int printf(const char *__restrict, ...);
-int fprintf(FILE *__restrict, const char *__restrict, ...);
-int sprintf(char *__restrict, const char *__restrict, ...);
-int snprintf(char *__restrict, size_t, const char *__restrict, ...);
-
-int vprintf(const char *__restrict, __isoc_va_list);
-int vfprintf(FILE *__restrict, const char *__restrict, __isoc_va_list);
-int vsprintf(char *__restrict, const char *__restrict, __isoc_va_list);
-int vsnprintf(char *__restrict, size_t, const char *__restrict, __isoc_va_list);
-
-int scanf(const char *__restrict, ...);
-int fscanf(FILE *__restrict, const char *__restrict, ...);
-int sscanf(const char *__restrict, const char *__restrict, ...);
-int vscanf(const char *__restrict, __isoc_va_list);
-int vfscanf(FILE *__restrict, const char *__restrict, __isoc_va_list);
-int vsscanf(const char *__restrict, const char *__restrict, __isoc_va_list);
-
-void perror(const char *);
-
-int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
-void setbuf(FILE *__restrict, char *__restrict);
-
-char *tmpnam(char *);
-FILE *tmpfile(void);
-
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
- || defined(_BSD_SOURCE)
-FILE *fmemopen(void *__restrict, size_t, const char *__restrict);
-FILE *open_memstream(char **, size_t *);
-FILE *fdopen(int, const char *);
-FILE *popen(const char *, const char *);
-int pclose(FILE *);
-int fileno(FILE *);
-int fseeko(FILE *, off_t, int);
-off_t ftello(FILE *);
-int dprintf(int, const char *__restrict, ...);
-int vdprintf(int, const char *__restrict, __isoc_va_list);
-void flockfile(FILE *);
-int ftrylockfile(FILE *);
-void funlockfile(FILE *);
-int getc_unlocked(FILE *);
+int fputs(const char* __restrict, FILE* __restrict);
+int puts(const char*);
+
+int printf(const char* __restrict, ...);
+int fprintf(FILE* __restrict, const char* __restrict, ...);
+int sprintf(char* __restrict, const char* __restrict, ...);
+int snprintf(char* __restrict, size_t, const char* __restrict, ...);
+
+int vprintf(const char* __restrict, __isoc_va_list);
+int vfprintf(FILE* __restrict, const char* __restrict, __isoc_va_list);
+int vsprintf(char* __restrict, const char* __restrict, __isoc_va_list);
+int vsnprintf(char* __restrict, size_t, const char* __restrict, __isoc_va_list);
+
+int scanf(const char* __restrict, ...);
+int fscanf(FILE* __restrict, const char* __restrict, ...);
+int sscanf(const char* __restrict, const char* __restrict, ...);
+int vscanf(const char* __restrict, __isoc_va_list);
+int vfscanf(FILE* __restrict, const char* __restrict, __isoc_va_list);
+int vsscanf(const char* __restrict, const char* __restrict, __isoc_va_list);
+
+void perror(const char*);
+
+int setvbuf(FILE* __restrict, char* __restrict, int, size_t);
+void setbuf(FILE* __restrict, char* __restrict);
+
+char* tmpnam(char*);
+FILE* tmpfile(void);
+
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \
+ defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+FILE* fmemopen(void* __restrict, size_t, const char* __restrict);
+FILE* open_memstream(char**, size_t*);
+FILE* fdopen(int, const char*);
+FILE* popen(const char*, const char*);
+int pclose(FILE*);
+int fileno(FILE*);
+int fseeko(FILE*, off_t, int);
+off_t ftello(FILE*);
+int dprintf(int, const char* __restrict, ...);
+int vdprintf(int, const char* __restrict, __isoc_va_list);
+void flockfile(FILE*);
+int ftrylockfile(FILE*);
+void funlockfile(FILE*);
+int getc_unlocked(FILE*);
int getchar_unlocked(void);
-int putc_unlocked(int, FILE *);
+int putc_unlocked(int, FILE*);
int putchar_unlocked(int);
-ssize_t getdelim(char **__restrict, size_t *__restrict, int, FILE *__restrict);
-ssize_t getline(char **__restrict, size_t *__restrict, FILE *__restrict);
-int renameat(int, const char *, int, const char *);
-char *ctermid(char *);
+ssize_t getdelim(char** __restrict, size_t* __restrict, int, FILE* __restrict);
+ssize_t getline(char** __restrict, size_t* __restrict, FILE* __restrict);
+int renameat(int, const char*, int, const char*);
+char* ctermid(char*);
#define L_ctermid 20
#endif
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
- || defined(_BSD_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define P_tmpdir "/tmp"
-char *tempnam(const char *, const char *);
+char* tempnam(const char*, const char*);
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define L_cuserid 20
-char *cuserid(char *);
-void setlinebuf(FILE *);
-void setbuffer(FILE *, char *, size_t);
-int fgetc_unlocked(FILE *);
-int fputc_unlocked(int, FILE *);
-int fflush_unlocked(FILE *);
-size_t fread_unlocked(void *, size_t, size_t, FILE *);
-size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
-void clearerr_unlocked(FILE *);
-int feof_unlocked(FILE *);
-int ferror_unlocked(FILE *);
-int fileno_unlocked(FILE *);
-int getw(FILE *);
-int putw(int, FILE *);
-char *fgetln(FILE *, size_t *);
-int asprintf(char **, const char *, ...);
-int vasprintf(char **, const char *, __isoc_va_list);
+char* cuserid(char*);
+void setlinebuf(FILE*);
+void setbuffer(FILE*, char*, size_t);
+int fgetc_unlocked(FILE*);
+int fputc_unlocked(int, FILE*);
+int fflush_unlocked(FILE*);
+size_t fread_unlocked(void*, size_t, size_t, FILE*);
+size_t fwrite_unlocked(const void*, size_t, size_t, FILE*);
+void clearerr_unlocked(FILE*);
+int feof_unlocked(FILE*);
+int ferror_unlocked(FILE*);
+int fileno_unlocked(FILE*);
+int getw(FILE*);
+int putw(int, FILE*);
+char* fgetln(FILE*, size_t*);
+int asprintf(char**, const char*, ...);
+int vasprintf(char**, const char*, __isoc_va_list);
#endif
#ifdef _GNU_SOURCE
-char *fgets_unlocked(char *, int, FILE *);
-int fputs_unlocked(const char *, FILE *);
+char* fgets_unlocked(char*, int, FILE*);
+int fputs_unlocked(const char*, FILE*);
#endif
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)

Powered by Google App Engine
This is Rietveld 408576698