Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting using the /* clang-format off */ and /* clang-format on */ tags. Probably some that shouldn't have been formatted were anyway; if you encounter them, please fix. The clang-format tags were left in on the basis that it's much easier to prune those out later than to put them back in, and it means that, modulo my custom version of clang-format, I should be able to run clang-format on the source tree again without changing anything, now that Pat has fixed the VA_DECL issues.
This commit is contained in:
@@ -7,30 +7,30 @@
|
||||
/*
|
||||
* portio.h - PC port I/O Hardware support definitions and other
|
||||
* low-level definitions.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PORTIO_H
|
||||
#define PORTIO_H
|
||||
|
||||
# if defined(__GO32__) || defined(__DJGPP__)
|
||||
#if defined(__GO32__) || defined(__DJGPP__)
|
||||
#define __far
|
||||
#include <go32.h>
|
||||
#include <dpmi.h>
|
||||
#include <sys/farptr.h>
|
||||
#endif
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
#define outportb _outp
|
||||
#define outportw _outpw
|
||||
#define inportb _inp
|
||||
# endif
|
||||
# if defined(__BORLANDC__)
|
||||
#endif
|
||||
#if defined(__BORLANDC__)
|
||||
#define outportw outport
|
||||
/* #define inportb inport */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifndef MK_PTR
|
||||
#ifndef MK_PTR
|
||||
/*
|
||||
* Depending on environment, this is a macro to construct either:
|
||||
*
|
||||
@@ -38,36 +38,38 @@
|
||||
* - a far pointer from segment and offset values
|
||||
*
|
||||
*/
|
||||
# if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
#define MK_PTR(seg, offset) (void __far *)(((unsigned long)seg << 16) \
|
||||
+ (unsigned long)(unsigned)offset)
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
#define MK_PTR(seg, offset) \
|
||||
(void __far *)(((unsigned long) seg << 16) \
|
||||
+ (unsigned long) (unsigned) offset)
|
||||
#define READ_ABSOLUTE(x) *(x)
|
||||
#define READ_ABSOLUTE_WORD(x) *(x)
|
||||
#define WRITE_ABSOLUTE(x,y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x,y) *(x) = (y)
|
||||
# endif
|
||||
#define WRITE_ABSOLUTE(x, y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x, y) *(x) = (y)
|
||||
#endif
|
||||
|
||||
# if defined(__GO32__) || defined(__DJGPP__)
|
||||
#define MK_PTR(seg, offset) (void *)(((unsigned)seg << 4) + (unsigned)offset)
|
||||
#if defined(__GO32__) || defined(__DJGPP__)
|
||||
#define MK_PTR(seg, offset) \
|
||||
(void *)(((unsigned) seg << 4) + (unsigned) offset)
|
||||
#define READ_ABSOLUTE(x) \
|
||||
(_farpeekb(_go32_conventional_mem_selector(), (unsigned)x))
|
||||
(_farpeekb(_go32_conventional_mem_selector(), (unsigned) x))
|
||||
#define READ_ABSOLUTE_WORD(x) \
|
||||
(_farpeekw(_go32_conventional_mem_selector(), (unsigned)x))
|
||||
#define WRITE_ABSOLUTE(x,y) \
|
||||
_farpokeb(_go32_conventional_mem_selector(), (unsigned)x, (y))
|
||||
#define WRITE_ABSOLUTE_WORD(x,y) \
|
||||
_farpokew(_go32_conventional_mem_selector(), (unsigned)x, (y))
|
||||
# endif
|
||||
(_farpeekw(_go32_conventional_mem_selector(), (unsigned) x))
|
||||
#define WRITE_ABSOLUTE(x, y) \
|
||||
_farpokeb(_go32_conventional_mem_selector(), (unsigned) x, (y))
|
||||
#define WRITE_ABSOLUTE_WORD(x, y) \
|
||||
_farpokew(_go32_conventional_mem_selector(), (unsigned) x, (y))
|
||||
#endif
|
||||
|
||||
# ifdef OBSOLETE /* old djgpp V1.x way of mapping 1st MB */
|
||||
#define MK_PTR(seg, offset) (void *)(0xE0000000+((((unsigned)seg << 4) \
|
||||
+ (unsigned)offset)))
|
||||
#ifdef OBSOLETE /* old djgpp V1.x way of mapping 1st MB */
|
||||
#define MK_PTR(seg, offset) \
|
||||
(void *)(0xE0000000 + ((((unsigned) seg << 4) + (unsigned) offset)))
|
||||
#define READ_ABSOLUTE(x) *(x)
|
||||
#define READ_ABSOLUTE_WORD(x) *(x)
|
||||
#define WRITE_ABSOLUTE(x,y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x,y) *(x) = (y)
|
||||
# endif
|
||||
# endif /* MK_PTR */
|
||||
#define WRITE_ABSOLUTE(x, y) *(x) = (y)
|
||||
#define WRITE_ABSOLUTE_WORD(x, y) *(x) = (y)
|
||||
#endif
|
||||
#endif /* MK_PTR */
|
||||
|
||||
#endif /* PORTIO_H */
|
||||
/* portio.h */
|
||||
|
||||
Reference in New Issue
Block a user