From df75ab14f4c449259d07338161c36a2b7d9f86cb Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 9 Sep 2017 17:30:29 +0200 Subject: [PATCH] xmlwf: Indent preprocessor code --- expat/xmlwf/readfilemap.c | 24 ++++++------- expat/xmlwf/unixfilemap.c | 4 +-- expat/xmlwf/win32filemap.c | 10 +++--- expat/xmlwf/xmltchar.h | 70 +++++++++++++++++++------------------- expat/xmlwf/xmlwf.c | 4 +-- 5 files changed, 56 insertions(+), 56 deletions(-) diff --git a/expat/xmlwf/readfilemap.c b/expat/xmlwf/readfilemap.c index b283ea64..3cc4f761 100644 --- a/expat/xmlwf/readfilemap.c +++ b/expat/xmlwf/readfilemap.c @@ -53,21 +53,21 @@ #endif #ifndef S_ISREG -#ifndef S_IFREG -#define S_IFREG _S_IFREG -#endif -#ifndef S_IFMT -#define S_IFMT _S_IFMT -#endif -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +# ifndef S_IFREG +# define S_IFREG _S_IFREG +# endif +# ifndef S_IFMT +# define S_IFMT _S_IFMT +# endif +# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif /* not S_ISREG */ #ifndef O_BINARY -#ifdef _O_BINARY -#define O_BINARY _O_BINARY -#else -#define O_BINARY 0 -#endif +# ifdef _O_BINARY +# define O_BINARY _O_BINARY +# else +# define O_BINARY 0 +# endif #endif #include "xmltchar.h" diff --git a/expat/xmlwf/unixfilemap.c b/expat/xmlwf/unixfilemap.c index d7833b22..4ab757c2 100644 --- a/expat/xmlwf/unixfilemap.c +++ b/expat/xmlwf/unixfilemap.c @@ -47,9 +47,9 @@ #include "filemap.h" #ifdef XML_UNICODE_WCHAR_T -#define XML_FMT_STR "ls" +# define XML_FMT_STR "ls" #else -#define XML_FMT_STR "s" +# define XML_FMT_STR "s" #endif int diff --git a/expat/xmlwf/win32filemap.c b/expat/xmlwf/win32filemap.c index ed8453a5..a040a097 100644 --- a/expat/xmlwf/win32filemap.c +++ b/expat/xmlwf/win32filemap.c @@ -34,14 +34,14 @@ #define WIN32_LEAN_AND_MEAN 1 #ifdef XML_UNICODE_WCHAR_T -#ifndef XML_UNICODE -#define XML_UNICODE -#endif +# ifndef XML_UNICODE +# define XML_UNICODE +# endif #endif #ifdef XML_UNICODE -#define UNICODE -#define _UNICODE +# define UNICODE +# define _UNICODE #endif /* XML_UNICODE */ #include #include diff --git a/expat/xmlwf/xmltchar.h b/expat/xmlwf/xmltchar.h index 0cf5f587..a7adb358 100644 --- a/expat/xmlwf/xmltchar.h +++ b/expat/xmlwf/xmltchar.h @@ -34,40 +34,40 @@ #include "expat_external.h" #ifdef XML_UNICODE -#ifndef XML_UNICODE_WCHAR_T -#error xmlwf requires a 16-bit Unicode-compatible wchar_t -#endif -#define T(x) L ## x -#define ftprintf fwprintf -#define tfopen _wfopen -#define fputts fputws -#define puttc putwc -#define tcscmp wcscmp -#define tcscpy wcscpy -#define tcscat wcscat -#define tcschr wcschr -#define tcsrchr wcsrchr -#define tcslen wcslen -#define tperror _wperror -#define topen _wopen -#define tmain wmain -#define tremove _wremove -#define tchar wchar_t +# ifndef XML_UNICODE_WCHAR_T +# error xmlwf requires a 16-bit Unicode-compatible wchar_t +# endif +# define T(x) L ## x +# define ftprintf fwprintf +# define tfopen _wfopen +# define fputts fputws +# define puttc putwc +# define tcscmp wcscmp +# define tcscpy wcscpy +# define tcscat wcscat +# define tcschr wcschr +# define tcsrchr wcsrchr +# define tcslen wcslen +# define tperror _wperror +# define topen _wopen +# define tmain wmain +# define tremove _wremove +# define tchar wchar_t #else /* not XML_UNICODE */ -#define T(x) x -#define ftprintf fprintf -#define tfopen fopen -#define fputts fputs -#define puttc putc -#define tcscmp strcmp -#define tcscpy strcpy -#define tcscat strcat -#define tcschr strchr -#define tcsrchr strrchr -#define tcslen strlen -#define tperror perror -#define topen open -#define tmain main -#define tremove remove -#define tchar char +# define T(x) x +# define ftprintf fprintf +# define tfopen fopen +# define fputts fputs +# define puttc putc +# define tcscmp strcmp +# define tcscpy strcpy +# define tcscat strcat +# define tcschr strchr +# define tcsrchr strrchr +# define tcslen strlen +# define tperror perror +# define topen open +# define tmain main +# define tremove remove +# define tchar char #endif /* not XML_UNICODE */ diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c index a55f5498..d8e3f71e 100644 --- a/expat/xmlwf/xmlwf.c +++ b/expat/xmlwf/xmlwf.c @@ -43,11 +43,11 @@ #include "xmltchar.h" #ifdef _MSC_VER -#include +# include #endif #ifdef XML_UNICODE -#include +# include #endif /* Structures for handler user data */