Split out macros from common.h

This commit is contained in:
Jeffrey Pfau 2014-10-11 18:18:47 -07:00
parent 4ecdcf25f5
commit 4247db81e4
41 changed files with 65 additions and 55 deletions

View File

@ -1,7 +1,7 @@
#ifndef ARM_H
#define ARM_H
#include "common.h"
#include "util/common.h"
enum {
ARM_SP = 13,

View File

@ -1,7 +1,7 @@
#ifndef ISA_ARM_H
#define ISA_ARM_H
#include "common.h"
#include "util/common.h"
#define ARM_PREFETCH_CYCLES (1 + cpu->memory.activeSeqCycles32)

View File

@ -1,7 +1,7 @@
#ifndef ISA_INLINES_H
#define ISA_INLINES_H
#include "common.h"
#include "macros.h"
#include "arm.h"

View File

@ -1,7 +1,7 @@
#ifndef ISA_THUMB_H
#define ISA_THUMB_H
#include "common.h"
#include "util/common.h"
struct ARMCore;

View File

@ -1,20 +1,7 @@
#ifndef COMMON_H
#define COMMON_H
#ifndef MACROS_H
#define MACROS_H
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define UNUSED(V) (void)(V)
#include "util/common.h"
#if defined(__PPC__) || defined(__POWERPC__)
#define LOAD_32(DEST, ADDR, ARR) { \

View File

@ -1,7 +1,7 @@
#ifndef CLI_DEBUGGER_H
#define CLI_DEBUGGER_H
#include "common.h"
#include "util/common.h"
#include "debugger.h"

View File

@ -1,7 +1,7 @@
#ifndef DEBUGGER_H
#define DEBUGGER_H
#include "common.h"
#include "util/common.h"
#include "arm.h"

View File

@ -1,7 +1,7 @@
#ifndef GDB_STUB_H
#define GDB_STUB_H
#include "common.h"
#include "util/common.h"
#include "debugger/debugger.h"

View File

@ -1,7 +1,7 @@
#ifndef MEMORY_DEBUGGER_H
#define MEMORY_DEBUGGER_H
#include "common.h"
#include "util/common.h"
#include "arm.h"

View File

@ -1,7 +1,7 @@
#ifndef PARSER_H
#define PARSER_H
#include "common.h"
#include "util/common.h"
#include "debugger.h"
enum LexState {

View File

@ -1,7 +1,8 @@
#ifndef GBA_AUDIO_H
#define GBA_AUDIO_H
#include "common.h"
#include "util/common.h"
#include "macros.h"
#include "util/circle-buffer.h"

View File

@ -1,7 +1,7 @@
#ifndef GBA_BIOS_H
#define GBA_BIOS_H
#include "common.h"
#include "util/common.h"
#include "arm.h"

View File

@ -1,7 +1,7 @@
#ifndef GBA_GPIO_H
#define GBA_GPIO_H
#include "common.h"
#include "util/common.h"
#define IS_GPIO_REGISTER(reg) ((reg) == GPIO_REG_DATA || (reg) == GPIO_REG_DIRECTION || (reg) == GPIO_REG_CONTROL)

View File

@ -1,7 +1,7 @@
#ifndef GBA_IO_H
#define GBA_IO_H
#include "common.h"
#include "util/common.h"
#include "gba.h"

View File

@ -1,5 +1,7 @@
#include "gba-memory.h"
#include "macros.h"
#include "gba-gpio.h"
#include "gba-io.h"
#include "gba-serialize.h"

View File

@ -1,9 +1,10 @@
#ifndef GBA_MEMORY_H
#define GBA_MEMORY_H
#include "common.h"
#include "util/common.h"
#include "arm.h"
#include "macros.h"
#include "gba-gpio.h"
#include "gba-savedata.h"

View File

@ -1,7 +1,7 @@
#ifndef GBA_RR_H
#define GBA_RR_H
#include "common.h"
#include "util/common.h"
struct GBA;
struct VDir;

View File

@ -1,7 +1,7 @@
#ifndef GBA_SAVEDATA_H
#define GBA_SAVEDATA_H
#include "common.h"
#include "util/common.h"
struct VFile;

View File

@ -1,7 +1,7 @@
#ifndef GBA_SENSORS_H
#define GBA_SENSORS_H
#include "common.h"
#include "util/common.h"
struct GBARotationSource {
void (*sample)(struct GBARotationSource*);

View File

@ -1,7 +1,7 @@
#ifndef GBA_SERIALIZE_H
#define GBA_SERIALIZE_H
#include "common.h"
#include "util/common.h"
#include "gba.h"

View File

@ -1,7 +1,7 @@
#ifndef GBA_SIO_H
#define GBA_SIO_H
#include "common.h"
#include "util/common.h"
enum GBASIOMode {
SIO_NORMAL_8 = 0,

View File

@ -1,7 +1,7 @@
#ifndef GBA_THREAD_H
#define GBA_THREAD_H
#include "common.h"
#include "util/common.h"
#include "gba.h"
#include "gba-input.h"

View File

@ -1,9 +1,10 @@
#ifndef GBA_VIDEO_H
#define GBA_VIDEO_H
#include "common.h"
#include "util/common.h"
#include "gba-memory.h"
#include "macros.h"
#ifdef COLOR_16_BIT
#define BYTES_PER_PIXEL 2

View File

@ -1,7 +1,7 @@
#ifndef GBA_H
#define GBA_H
#include "common.h"
#include "util/common.h"
#include "arm.h"
#include "debugger/debugger.h"

View File

@ -1,7 +1,7 @@
#ifndef HLE_BIOS_H
#define HLE_BIOS_H
#include "common.h"
#include "util/common.h"
extern const uint8_t hleBios[];

View File

@ -1,7 +1,7 @@
#ifndef VIDEO_GLSL_H
#define VIDEO_GLSL_H
#include "common.h"
#include "util/common.h"
#include "gba-video.h"

View File

@ -1,7 +1,7 @@
#ifndef VIDEO_SOFTWARE_H
#define VIDEO_SOFTWARE_H
#include "common.h"
#include "util/common.h"
#include "gba-video.h"

View File

@ -1,7 +1,7 @@
#ifndef COMMAND_LINE_H
#define COMMAND_LINE_H
#include "common.h"
#include "util/common.h"
enum DebuggerType {
DEBUGGER_NONE = 0,

View File

@ -1,7 +1,7 @@
#ifndef SDL_AUDIO_H
#define SDL_AUDIO_H
#include "common.h"
#include "util/common.h"
#include <SDL.h>

View File

@ -1,7 +1,7 @@
#ifndef SDL_EVENTS_H
#define SDL_EVENTS_H
#include "common.h"
#include "util/common.h"
#include "gba-thread.h"

View File

@ -1,7 +1,7 @@
#ifndef CIRCLE_BUFFER_H
#define CIRCLE_BUFFER_H
#include "common.h"
#include "util/common.h"
struct CircleBuffer {
void* data;

19
src/util/common.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef COMMON_H
#define COMMON_H
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define UNUSED(V) (void)(V)
#endif

View File

@ -1,8 +1,7 @@
#ifndef CRC32_H
#define CRC32_H
#include <stdint.h>
#include <string.h>
#include "util/common.h"
struct VFile;

View File

@ -1,7 +1,7 @@
#ifndef MEMORY_H
#define MEMORY_H
#include "common.h"
#include "util/common.h"
void* anonymousMemoryMap(size_t size);
void mappedMemoryFree(void* memory, size_t size);

View File

@ -1,7 +1,7 @@
#ifndef PATCH_IPS_H
#define PATCH_IPS_H
#include "common.h"
#include "util/common.h"
struct Patch;

View File

@ -1,7 +1,7 @@
#ifndef PATCH_UPS_H
#define PATCH_UPS_H
#include "common.h"
#include "util/common.h"
struct Patch;

View File

@ -1,7 +1,7 @@
#ifndef PATCH_H
#define PATCH_H
#include "common.h"
#include "util/common.h"
struct VFile;

View File

@ -1,7 +1,7 @@
#ifndef PNG_IO_H
#define PNG_IO_H
#include "common.h"
#include "util/common.h"
#ifdef USE_PNG

View File

@ -1,7 +1,7 @@
#ifndef SOCKET_H
#define SOCKET_H
#include "common.h"
#include "util/common.h"
#ifdef __cplusplus
#define restrict __restrict__

View File

@ -1,7 +1,7 @@
#ifndef THREADING_H
#define THREADING_H
#include "common.h"
#include "util/common.h"
#ifdef USE_PTHREADS
#include <pthread.h>

View File

@ -1,7 +1,7 @@
#ifndef VFS_H
#define VFS_H
#include "common.h"
#include "util/common.h"
enum {
MAP_READ = 1,