Skip to content

Commit

Permalink
cleanup owl code
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Mar 2, 2023
1 parent 7bcd317 commit bed1c18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions bld/owl/c/owcoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*
* Open Watcom Project
*
* Copyright (c) 2002-2023 The Open Watcom Contributors. All Rights Reserved.
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
Expand Down Expand Up @@ -38,10 +39,9 @@

// must correspond to owl_cpu enums in owl.h - first entry is for PowerPC
static uint_16 cpuTypes[] = {
COFF_IMAGE_FILE_MACHINE_POWERPC,
COFF_IMAGE_FILE_MACHINE_ALPHA,
COFF_IMAGE_FILE_MACHINE_R4000,
COFF_IMAGE_FILE_MACHINE_I386
#define OWL_CPU(c,e,o) o,
OWL_CPUS
#undef OWL_CPU
};

#define _OWLIndexToCOFFIndex( x ) ( (x) + FIRST_USER_SECTION )
Expand Down
2 changes: 1 addition & 1 deletion bld/owl/c/owelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static unsigned numSymbols( owl_file_handle file ) {
}

static Elf32_Half machineTypes[] = {
#define OWL_CPU(c,e) e,
#define OWL_CPU(c,e,o) e,
OWL_CPUS
#undef OWL_CPU
};
Expand Down
12 changes: 6 additions & 6 deletions bld/owl/h/owl.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
#include <stdio.h>

#define OWL_CPUS \
OWL_CPU( OWL_CPU_PPC, EM_PPC ) \
OWL_CPU( OWL_CPU_ALPHA, EM_ALPHA ) \
OWL_CPU( OWL_CPU_MIPS, EM_MIPS ) \
OWL_CPU( OWL_CPU_X86, EM_386 ) \
OWL_CPU( OWL_CPU_X64, EM_X86_64 )
OWL_CPU( OWL_CPU_PPC, EM_PPC, COFF_IMAGE_FILE_MACHINE_POWERPC ) \
OWL_CPU( OWL_CPU_ALPHA, EM_ALPHA, COFF_IMAGE_FILE_MACHINE_ALPHA ) \
OWL_CPU( OWL_CPU_MIPS, EM_MIPS, COFF_IMAGE_FILE_MACHINE_R4000 ) \
OWL_CPU( OWL_CPU_X86, EM_386, COFF_IMAGE_FILE_MACHINE_I386 ) \
OWL_CPU( OWL_CPU_X64, EM_X86_64, COFF_IMAGE_FILE_MACHINE_AMD64 )

#define OWL_RELOCS \
OWL_RELOC( OWL_RELOC_ABSOLUTE ) /* ref to a 32-bit absolute address */ \
Expand Down Expand Up @@ -88,7 +88,7 @@ typedef enum {
} owl_format;

typedef enum {
#define OWL_CPU(c,e) c,
#define OWL_CPU(c,e,o) c,
OWL_CPUS
#undef OWL_CPU
} owl_cpu;
Expand Down

0 comments on commit bed1c18

Please sign in to comment.