Normalized code.

This commit is contained in:
Oliver Schmidt
2014-03-04 01:11:19 +01:00
parent 3e156bdd67
commit 4185caf855
502 changed files with 96 additions and 1660 deletions

View File

@@ -69,6 +69,3 @@ void AbEnd (const char* Format, ...)
/* Terminate the program */
exit (EXIT_FAILURE);
}

View File

@@ -58,6 +58,3 @@ void AbEnd (const char* Format, ...) attribute ((format (printf, 1, 2), noreturn
/* End of abend.h */
#endif

View File

@@ -92,6 +92,3 @@ unsigned char AddrSizeFromStr (const char* Str)
/* Not found */
return ADDR_SIZE_INVALID;
}

View File

@@ -72,6 +72,3 @@ unsigned char AddrSizeFromStr (const char* Str);
/* End of addrsize.h */
#endif

View File

@@ -182,6 +182,3 @@ unsigned long AlignCount (unsigned long Addr, unsigned long Alignment)
{
return AlignAddr (Addr, Alignment) - Addr;
}

View File

@@ -83,6 +83,3 @@ unsigned long AlignCount (unsigned long Addr, unsigned long Alignment);
/* End of alignment.h */
#endif

View File

@@ -58,6 +58,3 @@ int AssertAtAsmTime (AssertAction A)
{
return (A & 0x02U) == 0;
}

View File

@@ -71,6 +71,3 @@ int AssertAtAsmTime (AssertAction A);
/* End of assertion.h */
#endif

View File

@@ -55,6 +55,3 @@
/* End of attrib.h */
#endif

View File

@@ -123,6 +123,3 @@ void BitMerge (void* Target, const void* Source, unsigned Size)
*T++ |= *S++;
}
}

View File

@@ -71,6 +71,3 @@ void BitMerge (void* Target, const void* Source, unsigned Size);
/* End of bitops.h */
#endif

View File

@@ -76,6 +76,3 @@
/* End of cddefs.h */
#endif

View File

@@ -147,6 +147,3 @@ int IsQuote (char C)
{
return (C == '"' || C == '\'');
}

View File

@@ -112,6 +112,3 @@ int IsQuote (char C);
/* End of chartype.h */
#endif

View File

@@ -77,6 +77,3 @@ static void DefaultCheckFailed (const char* Msg, const char* Cond,
/* Output a diagnostic and abort */
AbEnd ("%s%s, file `%s', line %u", Msg, Cond, File, Line);
}

View File

@@ -86,7 +86,5 @@ extern void (*CheckFailed) (const char* Msg, const char* Cond,
/* End of check.h */
#endif

View File

@@ -307,7 +307,3 @@ void LongOption (unsigned* ArgNum, const LongOpt* OptTab, unsigned OptCount)
/* Invalid option */
UnknownOption (Opt);
}

View File

@@ -102,6 +102,3 @@ void LongOption (unsigned* ArgNum, const LongOpt* OptTab, unsigned OptCount);
/* End of cmdline.h */
#endif

View File

@@ -504,6 +504,3 @@ void CollSort (Collection* C,
QuickSort (C, 0, C->Count-1, Compare, Data);
}
}

View File

@@ -301,7 +301,3 @@ void CollSort (Collection* C,
/* End of coll.h */
#endif

View File

@@ -134,6 +134,3 @@ cpu_t FindCPU (const char* Name)
/* Not found */
return CPU_UNKNOWN;
}

View File

@@ -102,6 +102,3 @@ cpu_t FindCPU (const char* Name);
/* End of cpu.h */
#endif

View File

@@ -45,6 +45,3 @@
unsigned char Debug = 0; /* Debug mode */

View File

@@ -49,7 +49,5 @@ extern unsigned char Debug; /* Debug mode */
/* End of debugflag.h */
#endif

View File

@@ -232,6 +232,3 @@ void DumpExpr (const ExprNode* Expr, const ExprNode* (*ResolveSym) (const struct
InternalDumpExpr (Expr, ResolveSym);
printf ("\n");
}

View File

@@ -145,6 +145,3 @@ void DumpExpr (const ExprNode* Expr, const ExprNode* (*ResolveSym) (const struct
/* End of exprdefs.h */
#endif

View File

@@ -74,6 +74,3 @@ const FileId* GetFileId (const char* Name, const FileId* Table, unsigned Count)
/* Search for a table entry and return it */
return bsearch (Ext+1, Table, Count, sizeof (FileId), CompareFileId);
}

View File

@@ -74,7 +74,5 @@ const FileId* GetFileId (const char* Name, const FileId* Table, unsigned Count);
/* End of fileid.h */
#endif

View File

@@ -76,6 +76,3 @@ int CompareFilePos (const FilePos* P1, const FilePos* P2)
return 0;
}
}

View File

@@ -77,6 +77,3 @@ int CompareFilePos (const FilePos* P1, const FilePos* P2);
/* End of filepos.h */
#endif

View File

@@ -47,8 +47,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#if defined(_WIN32)
#include <errno.h>
#include <windows.h>
# include <errno.h>
# include <windows.h>
#endif
/* common */

View File

@@ -68,6 +68,3 @@ int FileStat (const char* Path, struct stat* Buf);
/* End of filestat.h */
#endif

View File

@@ -43,11 +43,11 @@
#if defined(_WIN32)
#include <errno.h>
#include <windows.h>
# include <errno.h>
# include <windows.h>
#else
#include <sys/types.h> /* FreeBSD needs this */
#include <utime.h>
# include <sys/types.h> /* FreeBSD needs this */
# include <utime.h>
#endif

View File

@@ -68,6 +68,3 @@ int SetFileTimes (const char* Path, time_t T);
/* End of filestat.h */
#endif

View File

@@ -104,6 +104,3 @@ FILETYPE GetFileType (const char* Name)
/* Return the result */
return F? F->Id : FILETYPE_UNKNOWN;
}

View File

@@ -71,7 +71,5 @@ FILETYPE GetFileType (const char* Name);
/* End of filetype.h */
#endif

View File

@@ -115,6 +115,3 @@ char* MakeFilename (const char* Origin, const char* Ext)
}
return Out;
}

View File

@@ -64,6 +64,3 @@ char* MakeFilename (const char* Origin, const char* Ext);
/* End of fname.h */
#endif

View File

@@ -236,6 +236,3 @@ Double FP_D_Div (Double Left, Double Right)
D.V = Left.V / Right.V;
return D;
}

View File

@@ -140,8 +140,3 @@ Double FP_D_Div (Double Left, Double Right);
/* End of fp.h */
#endif

View File

@@ -70,6 +70,3 @@
/* End of fragdefs.h */
#endif

View File

@@ -123,6 +123,3 @@ const char* GT_AsString (const StrBuf* Type, StrBuf* String)
/* Return the contents of String */
return SB_GetConstBuf (String);
}

View File

@@ -152,7 +152,3 @@ const char* GT_AsString (const StrBuf* Type, StrBuf* String);
/* End of gentype.h */
#endif

View File

@@ -89,6 +89,3 @@ unsigned HashBuf (const StrBuf* S)
}
return H;
}

View File

@@ -64,6 +64,3 @@ unsigned HashBuf (const StrBuf* S) attribute ((const));
/* End of hashfunc.h */
#endif

View File

@@ -244,6 +244,3 @@ void HT_Walk (HashTable* T, int (*F) (void* Entry, void* Data), void* Data)
}
}
}

View File

@@ -177,6 +177,3 @@ void HT_Walk (HashTable* T, int (*F) (void* Entry, void* Data), void* Data);
/* End of hashtab.h */
#endif

View File

@@ -77,6 +77,3 @@
/* End of hlldbgsyms.h */
#endif

View File

@@ -54,6 +54,3 @@
/* End of inline.h */
#endif

View File

@@ -87,6 +87,3 @@ long IS_Pop (IntStack* S)
PRECONDITION (S->Count > 0);
return S->Stack[--S->Count];
}

View File

@@ -116,7 +116,5 @@ long IS_Pop (IntStack* S);
/* End of intstack.h */
#endif

View File

@@ -62,7 +62,5 @@ typedef unsigned long uintmax_t;
/* End of inttypes.h */
#endif

View File

@@ -67,6 +67,3 @@ struct LibHeader {
/* End of libdefs.h */
#endif

View File

@@ -62,6 +62,3 @@
/* End of lidefs.h */
#endif

View File

@@ -238,6 +238,3 @@ int MatchPattern (const char* Source, const char* Pattern)
/* Do the real thing */
return RecursiveMatch ((const unsigned char*) Source, (const unsigned char*) Pattern);
}

View File

@@ -61,6 +61,3 @@ int MatchPattern (const char* Source, const char* Pattern);
/* End of matchpat.h */
#endif

View File

@@ -124,5 +124,3 @@ void SetMemoryModel (mmodel_t Model)
/* Zeropage is always zeropage */
ZpAddrSize = ADDR_SIZE_ZP;
}

View File

@@ -82,6 +82,3 @@ void SetMemoryModel (mmodel_t Model);
/* End of mmodel.h */
#endif

View File

@@ -92,6 +92,3 @@ struct ObjHeader {
/* End of objdefs.h */
#endif

View File

@@ -72,6 +72,3 @@ struct Option {
/* End of optdefs.h */
#endif

View File

@@ -72,6 +72,3 @@ void Print (FILE* F, unsigned V, const char* Format, ...)
vfprintf (F, Format, ap);
va_end (ap);
}

View File

@@ -70,7 +70,3 @@ void Print (FILE* F, unsigned V, const char* Format, ...)
/* End of print.h */
#endif

View File

@@ -76,6 +76,3 @@ enum {
/* End of scopedefs.h */
#endif

View File

@@ -102,7 +102,5 @@ char* SearchFile (const SearchPaths* P, const char* File);
/* End of searchpath.h */
#endif

View File

@@ -52,6 +52,3 @@
/* End of segdefs.h */
#endif

View File

@@ -65,6 +65,3 @@ int ValidSegName (const char* Name)
/* Name is ok */
return 1;
}

View File

@@ -68,6 +68,3 @@ int ValidSegName (const char* Name);
/* End of segnames.h */
#endif

View File

@@ -125,6 +125,3 @@ unsigned long shr_l (unsigned long l, unsigned count)
}
return l;
}

View File

@@ -79,6 +79,3 @@ unsigned long shr_l (unsigned long l, unsigned count);
/* End of shift.h */
#endif

View File

@@ -493,6 +493,3 @@ void SB_Printf (StrBuf* S, const char* Format, ...)
SB_VPrintf (S, Format, ap);
va_end (ap);
}

View File

@@ -421,6 +421,3 @@ void SB_Printf (StrBuf* S, const char* Format, ...) attribute ((format (printf,
/* End of strbuf.h */
#endif

View File

@@ -281,6 +281,3 @@ unsigned SP_GetCount (const StringPool* P)
{
return CollCount (&P->Entries);
}

View File

@@ -101,6 +101,3 @@ unsigned SP_GetCount (const StringPool* P);
/* End of strpool.h */
#endif

View File

@@ -80,6 +80,3 @@ void SS_Push (StrStack* S, const char* Val)
CHECK (S->Count < sizeof (S->Stack) / sizeof (S->Stack[0]));
S->Stack[S->Count++] = xstrdup (Val);
}

View File

@@ -100,7 +100,5 @@ void SS_Push (StrStack* S, const char* Val);
/* End of strstack.h */
#endif

View File

@@ -62,6 +62,3 @@ int StrCaseCmp (const char* S1, const char* S2);
/* End of strutil.h */
#endif

View File

@@ -103,6 +103,3 @@
/* End of symdefs.h */
#endif

View File

@@ -232,4 +232,3 @@ const char* GetTargetName (target_t Target)
/* Return the array entry */
return GetTargetProperties (Target)->Name;
}

View File

@@ -118,7 +118,5 @@ const char* GetTargetName (target_t Target);
/* End of target.h */
#endif

View File

@@ -127,8 +127,3 @@ void TgtTranslateSet (unsigned Index, unsigned char C)
CHECK (Index > 0 && Index < sizeof (Tab));
Tab[Index] = C;
}

View File

@@ -75,6 +75,3 @@ void TgtTranslateSet (unsigned Index, unsigned char C);
/* End of tgttrans.h */
#endif

View File

@@ -74,7 +74,5 @@
/* End of va_copy.h */
#endif

View File

@@ -77,6 +77,3 @@ unsigned GetVersionAsNumber (void)
{
return ((VER_MAJOR * 0x100) + (VER_MINOR * 0x10) + VER_PATCH);
}

View File

@@ -55,7 +55,3 @@ unsigned GetVersionAsNumber (void);
/* End of version.h */
#endif

View File

@@ -125,6 +125,3 @@ void* xdup (const void* Buf, size_t Size)
{
return memcpy (xmalloc (Size), Buf, Size);
}

View File

@@ -68,6 +68,3 @@ void* xdup (const void* Buf, size_t Size);
/* End of xmalloc.h */
#endif

View File

@@ -676,6 +676,3 @@ int xvsprintf (char* Buf, size_t BufSize, const char* Format, va_list ap)
CHECK (Res >= 0 && (unsigned) (Res+1) < BufSize);
return Res;
}

View File

@@ -92,7 +92,3 @@ int xvsprintf (char* Buf, size_t BufSize, const char* Format, va_list ap)
/* End of xsprintf.h */
#endif