1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-28 06:30:16 +00:00

remove dangling spaces

This commit is contained in:
mrdudz 2022-04-17 16:07:09 +02:00
parent 299f967527
commit 3c1bb85b8e
50 changed files with 67 additions and 67 deletions

View File

@ -49,6 +49,6 @@ void DelObjFiles (int argc, char* argv []);
/* End of del.h */
/* End of del.h */
#endif

View File

@ -72,7 +72,7 @@ StrBuf* AnonName (StrBuf* Buf, const char* Spec)
int IsAnonName (const StrBuf* Name)
/* Check if the given symbol name is that of an anonymous symbol */
{
{
if (SB_GetLen (Name) < sizeof (AnonTag) - 1) {
/* Too short */
return 0;

View File

@ -58,7 +58,7 @@ StrBuf* AnonName (StrBuf* Buf, const char* Spec);
int IsAnonName (const StrBuf* Name);
/* Check if the given symbol name is that of an anonymous symbol */
/* End of anonname.h */

View File

@ -147,4 +147,4 @@ void GetSweet16EA (EffAddr* A)
}

View File

@ -65,4 +65,4 @@ void GetSweet16EA (EffAddr* A);

View File

@ -303,9 +303,9 @@ static const struct {
}
};
/* Instruction table for the 6502 with DTV extra opcodes (DTV) and
/* Instruction table for the 6502 with DTV extra opcodes (DTV) and
** those illegal instructions (X) which are supported by DTV.
** Note: illegals opcodes which contain more subinstructions
** Note: illegals opcodes which contain more subinstructions
** (ASO, DCM, LSE, LXA, SBX and SHS) are not enlisted.
*/
static const struct {
@ -1207,9 +1207,9 @@ static int EvalEA (const InsDesc* Ins, EffAddr* A)
} else {
ED.AddrSize = DataAddrSize;
/* If the default address size of the data segment is unequal
** to zero page addressing, but zero page addressing is
** allowed by the instruction, mark all symbols in the
** expression tree. This mark will be checked at end of
** to zero page addressing, but zero page addressing is
** allowed by the instruction, mark all symbols in the
** expression tree. This mark will be checked at end of
** assembly, and a warning is issued, if a zero page symbol
** was guessed wrong here.
*/

View File

@ -101,7 +101,7 @@
/* Bitmask for all FAR operations */
#define AM65_ALL_FAR (AM65_ABS_LONG | AM65_ABS_LONG_X)
/* Bitmask for all immediate operations */
#define AM65_ALL_IMM (AM65_IMM_ACCU | AM65_IMM_INDEX | AM65_IMM_IMPLICIT | AM65_IMM_IMPLICIT_WORD)

View File

@ -81,7 +81,7 @@ void PushInput (int (*Func) (void*), void* Data, const char* Desc)
/* Check for a stack overflow */
if (ICount > ISTACK_MAX) {
Fatal ("Maximum input stack nesting exceeded");
}
}
/* Create a new stack element */
E = xmalloc (sizeof (*E));

View File

@ -62,7 +62,7 @@ struct StrBuf;
struct Macro;
typedef struct Macro Macro;
/*****************************************************************************/
/* Code */

View File

@ -182,4 +182,4 @@ void WriteOptions (void)

View File

@ -204,7 +204,7 @@ static Span* MergeSpan (Span* S)
void SetSpanType (Span* S, const StrBuf* Type)
/* Set the generic type of the span to Type */
{
{
/* Ignore the call if we won't generate debug infos */
if (DbgSyms) {
S->Type = GetStrBufId (Type);
@ -354,7 +354,7 @@ static int CollectSpans (void* Entry, void* Data)
return 0;
}
void WriteSpans (void)
/* Write all spans to the object file */

View File

@ -36,7 +36,7 @@
#ifndef STUDYEXPR_H
#define STUDYEXPR_H
/* common */
#include "exprdefs.h"

View File

@ -187,7 +187,7 @@ SymEntry* ParseScopedSymName (SymFindAction Action)
** may not expect NULL to be returned if Action contains SYM_ALLOC_NEW,
** create a new symbol.
*/
if (Action & SYM_ALLOC_NEW) {
if (Action & SYM_ALLOC_NEW) {
Sym = NewSymEntry (&Ident, SF_NONE);
} else {
Sym = 0;

View File

@ -160,7 +160,7 @@ void ULabDef (void)
*/
ULabel* L = CollAtUnchecked (&ULabList, ULabDefCount);
CHECK (L->Val == 0);
L->Val = GenCurrentPC ();
L->Val = GenCurrentPC ();
ReleaseFullLineInfo (&L->LineInfos);
GetFullLineInfo (&L->LineInfos);
} else {
@ -200,7 +200,7 @@ ExprNode* ULabResolve (unsigned Index)
void ULabDone (void)
/* Run through all unnamed labels, check for anomalies and errors and do
/* Run through all unnamed labels, check for anomalies and errors and do
** necessary cleanups.
*/
{

View File

@ -1781,7 +1781,7 @@ void CE_GenRegInfo (CodeEntry* E, RegContents* InputRegs)
if (RegValIsKnown (In->RegX)) {
Out->RegX = (In->RegX ^ 0xFF);
}
} else if (strncmp (E->Arg, "asrax", 5) == 0 ||
} else if (strncmp (E->Arg, "asrax", 5) == 0 ||
strncmp (E->Arg, "shrax", 5) == 0) {
if (RegValIsKnown (In->RegX)) {
if (In->RegX == 0x00 || In->RegX == 0xFF) {

View File

@ -1105,7 +1105,7 @@ Type* NewBitFieldType (const Type* T, unsigned BitOffs, unsigned BitWidth)
/* The type specifier must be integeral */
CHECK (IsClassInt (T));
/* Allocate the new type string */
P = TypeAlloc (3);

View File

@ -2267,7 +2267,7 @@ static void DefineBitFieldData (StructInitData* SI)
static void DefineStrData (Literal* Lit, unsigned Count)
{
{
/* Translate into target charset */
TranslateLiteral (Lit);

View File

@ -3786,7 +3786,7 @@ static void hieOr (ExprDesc *Expr)
/* Load false only if the result is not true */
g_getimmed (CF_INT | CF_CONST, 0, 0); /* Load FALSE */
g_falsejump (CF_NONE, DoneLab);
/* Load the true value */
g_defcodelabel (TrueLab);
g_getimmed (CF_INT | CF_CONST, 1, 0); /* Load TRUE */

View File

@ -39,7 +39,7 @@
/* common */
#include "cmdline.h"
/* cl65 */
#include "global.h"
#include "error.h"

View File

@ -1503,7 +1503,7 @@ int main (int argc, char* argv [])
case 'E':
/* Forward -E to compiler */
CmdAddArg (&CC65, Arg);
CmdAddArg (&CC65, Arg);
DisableAssemblingAndLinking ();
break;
@ -1513,7 +1513,7 @@ int main (int argc, char* argv [])
OptAsmArgs (Arg, GetArg (&I, 3));
} else if (Arg[2] == 'c' && Arg[3] == '\0') {
/* -Wc: Pass options to compiler */
/* Remember -Wc sub arguments in cc65 arg struct */
/* Remember -Wc sub arguments in cc65 arg struct */
OptCCArgs (Arg, GetArg (&I, 3));
} else if (Arg[2] == 'l' && Arg[3] == '\0') {
/* -Wl: Pass options to linker */

View File

@ -56,7 +56,7 @@ struct O65Data;
void Convert (const struct O65Data* D);
/* Convert the o65 file in D */
/* Convert the o65 file in D */

View File

@ -81,7 +81,7 @@ void Error (const char* Format, ...)
void Internal (const char* Format, ...)
/* Print an internal error message and die */
{
va_list ap;
va_list ap;
va_start (ap, Format);
fprintf (stderr, "%s: Internal error: ", ProgName);
vfprintf (stderr, Format, ap);

View File

@ -53,7 +53,7 @@ O65Model Model = O65_MODEL_NONE;
/* Name table */
static const char* const NameTable[O65_MODEL_COUNT] = {
"none",
"none",
"os/a65",
"lunix",
"cc65-module"

View File

@ -32,7 +32,7 @@
/*****************************************************************************/
/* common */
#include "debugflag.h"

View File

@ -31,7 +31,7 @@
/* */
/*****************************************************************************/
#ifndef DEBUGFLAG_H
#define DEBUGFLAG_H

View File

@ -60,7 +60,7 @@ int CompareFilePos (const FilePos* P1, const FilePos* P2)
** compare rates file index over line over column.
*/
{
if (P1->Name > P2->Name) {
if (P1->Name > P2->Name) {
return 1;
} else if (P1->Name < P2->Name) {
return -1;

View File

@ -210,9 +210,9 @@ int PushSearchPath (SearchPaths* P, const char* NewPath)
** that it's not already there. If the path is already at the first position,
** return zero, otherwise return a non zero value.
*/
{
{
/* Generate a clean copy of NewPath */
char* Path = CleanupPath (NewPath);
char* Path = CleanupPath (NewPath);
/* If we have paths, check if Path is already at position zero */
if (CollCount (P) > 0 && strcmp (CollConstAt (P, 0), Path) == 0) {

View File

@ -32,12 +32,12 @@
/*****************************************************************************/
/* common */
#include "check.h"
#include "strstack.h"
#include "xmalloc.h"
/*****************************************************************************/

View File

@ -66,7 +66,7 @@ char* StrCopy (char* Dest, size_t DestSize, const char* Source)
int StrCaseCmp (const char* S1, const char* S2)
/* Compare two strings ignoring case */
/* Compare two strings ignoring case */
{
int Diff;
while ((Diff = toupper (*S1) - toupper (*S2)) == 0 && *S1) {
@ -77,4 +77,4 @@ int StrCaseCmp (const char* S1, const char* S2)
}

View File

@ -41,7 +41,7 @@
#include <stdarg.h>
/* No action if we have a working va_copy */
#if !defined(va_copy)

View File

@ -580,7 +580,7 @@ int xvsnprintf (char* Buf, size_t Size, const char* Format, va_list ap)
CHECK (S != 0);
/* Handle the length by using a precision */
if ((P.Flags & fPrec) != 0) {
/* Precision already specified, use length of string
/* Precision already specified, use length of string
** if less.
*/
if ((unsigned) P.Prec > SB_GetLen (S)) {

View File

@ -33,9 +33,9 @@
/* We need a way to output a StrBuf, but on the other side, we don't want to
** switch off gcc's printf format string checking. So we cheat as follows:
** %m (which is a gcc extension and doesn't take an argument) switches %p
/* We need a way to output a StrBuf, but on the other side, we don't want to
** switch off gcc's printf format string checking. So we cheat as follows:
** %m (which is a gcc extension and doesn't take an argument) switches %p
** between outputting a pointer and a string buf. This works just one time,
** so each StrBuf needs in fact a %m%p spec. There's no way to apply a width
** and precision to such a StrBuf, but *not* using %p would bring up a warning

View File

@ -36,7 +36,7 @@
/* common */
#include "xmalloc.h"
/* da65 */
/* da65 */
#include "attrtab.h"
#include "comments.h"
#include "error.h"

View File

@ -58,4 +58,4 @@ extern const OpcDesc OpcTable_6502DTV[256];

View File

@ -58,4 +58,4 @@ extern const OpcDesc OpcTable_6502X[256];

View File

@ -38,7 +38,7 @@
/* common */
/* common */
#include "cpu.h"
/* da65 */

View File

@ -135,7 +135,7 @@ struct cc65_csymdata {
unsigned char csym_kind; /* Kind of c symbol */
unsigned char csym_sc; /* Storage class of c symbol */
int csym_offs; /* Offset for auto and register */
unsigned type_id; /* Id of the data type */
unsigned type_id; /* Id of the data type */
unsigned symbol_id; /* Attached asm symbol if any */
unsigned scope_id; /* Scope of c symbol */
const char* csym_name; /* Name of the symbol */

View File

@ -281,7 +281,7 @@ const ConDesImport* ConDesGetImport (unsigned Type)
/* Check the parameters */
PRECONDITION (Type <= CD_TYPE_MAX);
/* Return the import */
/* Return the import */
Import = &ConDes[Type].Import;
return (Import->Name != INVALID_STRING_ID)? Import : 0;
}

View File

@ -100,7 +100,7 @@ INLINE const char* GetFragmentSourceName (const Fragment* F)
#if defined(HAVE_INLINE)
INLINE unsigned GetFragmentSourceLine (const Fragment* F)
/* Return the source file line for this fragment */
{
{
return GetSourceLineFromList (&F->LineInfos);
}
#else

View File

@ -93,7 +93,7 @@ void CreateMapFile (int ShortMap)
** requested
*/
if (VerboseMap || S->Size > 0) {
fprintf (F,
fprintf (F,
" %-17s Offs=%06lX Size=%06lX "
"Align=%05lX Fill=%04lX\n",
GetString (S->Seg->Name), S->Offs, S->Size,

View File

@ -933,7 +933,7 @@ void DumpObjSegSize (FILE* F, unsigned long Offset)
unsigned Len = strlen (Name);
/* Skip segment flags, read size */
(void) ReadVar (F);
(void) ReadVar (F);
Size = ReadVar (F);
/* Skip alignment, type and fragment count */

View File

@ -53,7 +53,7 @@
void FileSetPos (FILE* F, unsigned long Pos)
/* Seek to the given absolute position, fail on errors */
{
{
if (fseek (F, Pos, SEEK_SET) != 0) {
Error ("Cannot seek: %s", strerror (errno));
}

View File

@ -1270,8 +1270,8 @@ static void OPC_6502_6C (void)
Cycles = 6;
Regs.PC = MemReadWord(Lo);
}
ParaVirtHooks (&Regs);
ParaVirtHooks (&Regs);
}
@ -1283,7 +1283,7 @@ static void OPC_65C02_6C (void)
Cycles = 5;
Regs.PC = MemReadWord (MemReadWord (Regs.PC+1));
ParaVirtHooks (&Regs);
ParaVirtHooks (&Regs);
}
@ -1439,7 +1439,7 @@ static void OPC_65SC02_7C (void)
Adr = MemReadWord (PC+1);
Regs.PC = MemReadWord(Adr+Regs.XR);
ParaVirtHooks (&Regs);
ParaVirtHooks (&Regs);
}

View File

@ -53,7 +53,7 @@
void WriteBinFile (const StrBuf* Data, const Collection* A,
void WriteBinFile (const StrBuf* Data, const Collection* A,
const Bitmap* B attribute ((unused)))
/* Write the contents of Data to the given file in binary format */
{

View File

@ -60,7 +60,7 @@ struct Color {
/*****************************************************************************/
#if defined(HAVE_INLINE)
INLINE Color RGB (unsigned char R, unsigned char G, unsigned char B)

View File

@ -54,8 +54,8 @@
StrBuf* GenGeosBitmap (const Bitmap* B, const Collection* A);
/* Generate binary output in GEOS compacted bitmap format for the bitmap B.
** The output is stored in a string buffer (which is actually a dynamic char
/* Generate binary output in GEOS compacted bitmap format for the bitmap B.
** The output is stored in a string buffer (which is actually a dynamic char
** array) and returned.
*/
@ -67,4 +67,4 @@ StrBuf* GenGeosBitmap (const Bitmap* B, const Collection* A);

View File

@ -94,7 +94,7 @@ StrBuf* GenKoala (const Bitmap* B, const Collection* A attribute ((unused)))
/* Add $4400 as load address */
SB_AppendChar (D, 0x00);
SB_AppendChar (D, 0x44);
/* TODO: The actual work ;-) */
(void) Screen;

View File

@ -54,7 +54,7 @@
StrBuf* GenLynxSprite (const Bitmap* B, const Collection* A);
/* Generate binary output in packed Lynx sprite format for the bitmap B. The output
/* Generate binary output in packed Lynx sprite format for the bitmap B. The output
** is stored in a string buffer (which is actually a dynamic char array) and
** returned.
*/

View File

@ -83,7 +83,7 @@ static enum Mode GetMode (const Collection* A)
} else {
Error ("Invalid value for attribute 'mode'");
}
}
}
return smAuto;
}

View File

@ -54,7 +54,7 @@
StrBuf* GenVic2Sprite (const Bitmap* B, const Collection* A);
/* Generate binary output in VICII sprite format for the bitmap B. The output
/* Generate binary output in VICII sprite format for the bitmap B. The output
** is stored in a string buffer (which is actually a dynamic char array) and
** returned.
*/