8000 Small cleanup for da65 by kugelfuhr · Pull Request #2722 · cc65/cc65 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Small cleanup for da65 #2722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/da65/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static uint32_t GetSpan (attr_t Style)
uint32_t Count = 1;
while (Count < RemainingBytes) {
attr_t Attr;
if (MustDefLabel(PC+Count)) {
if (MustDefLabel (PC+Count)) {
break;
}
Attr = GetAttr (PC+Count);
Expand Down Expand Up @@ -119,7 +119,7 @@ static unsigned DoTable (attr_t Style, unsigned MemberSize, void (*TableFunc) (u
}

/* If the next line is not the same style, add a separator */
if (CodeLeft() && GetStyleAttr (PC) != Style) {
if (CodeLeft () && GetStyleAttr (PC) != Style) {
SeparatorLine ();
}

Expand Down Expand Up @@ -221,7 +221,7 @@ uint32_t AddrTable (void)
}

/* If the next line is not an address table line, add a separator */
if (CodeLeft() && GetStyleAttr (PC) != atAddrTab) {
if (CodeLeft () && GetStyleAttr (PC) != atAddrTab) {
SeparatorLine ();
}

Expand Down Expand Up @@ -287,7 +287,7 @@ uint32_t RtsTable (void)
}

/* If the next line is not a return address table line, add a separator */
if (CodeLeft() && GetStyleAttr (PC) != atRtsTab) {
if (CodeLeft () && GetStyleAttr (PC) != atRtsTab) {
SeparatorLine ();
}

Expand Down Expand Up @@ -366,7 +366,7 @@ uint32_t TextTable (void)
}

/* If the next line is not a byte table line, add a separator */
if (CodeLeft() && GetStyleAttr (PC) != atTextTab) {
if (CodeLeft () && GetStyleAttr (PC) != atTextTab) {
SeparatorLine ();
}

Expand Down
6 changes: 3 additions & 3 deletions src/da65/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,11 @@ void OH_Relative (const OpcDesc* D)
GenerateLabel (D->Flags, Addr);

/* Output the line */
if (HaveLabel(Addr)) {
if (HaveLabel (Addr)) {
OneLine (D, "%s", GetAddrArg (D->Flags, Addr));
} else {
/* No label -- make a relative address expression */
OneLine (D, "* + (%d)", (int) Offs + 2);
OneLine (D, "*%+d", (int) Offs + 2);
}
}

Expand Down Expand Up @@ -962,7 +962,7 @@ void OH_Rts (const OpcDesc* D)
if (NewlineAfterRTS) {
LineFeed ();
}
SeparatorLine();
SeparatorLine ();
}


Expand Down
8 changes: 4 additions & 4 deletions src/da65/infofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static void RangeSection (void)
if (InfoSVal[1] == '\0') {
InfoError ("AddrMode must be two characters long");
}
if (tolower(InfoSVal[0]) == 'm') {
if (tolower (InfoSVal[0]) == 'm') {
if (InfoSVal[0] == 'm') {
AddrMode = atMem16;
} else {
Expand All @@ -675,7 +675,7 @@ static void RangeSection (void)
} else {
InfoError ("AddrMode syntax: mx");
}
if (tolower(InfoSVal[1]) == 'x') {
if (tolower (InfoSVal[1]) == 'x') {
if (InfoSVal[1] == 'x') {
AddrMode |= atIdx16;
} else {
Expand Down Expand Up @@ -735,7 +735,7 @@ static void RangeSection (void)
if (Attributes & tUnit) {
unsigned i;
for (i = Start; i < End; i += Unit) {
MarkAddr(i, atTableUnit);
MarkAddr (i, atTableUnit);
}
}

Expand Down Expand Up @@ -928,7 +928,7 @@ void ReadInfoFile (void)
/* Read the info file */
{
/* Check if we have a info file given */
if (InfoAvail()) {
if (InfoAvail ()) {
/* Open the config file */
InfoOpenInput ();

Expand Down
8 changes: 4 additions & 4 deletions src/da65/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ static void OptVersion (const char* Opt attribute ((unused)),
/* Print the disassembler version */
{
fprintf (stderr, "%s V%s\n", ProgName, GetVersionAsString ());
exit(EXIT_SUCCESS);
exit (EXIT_SUCCESS);
}


Expand Down Expand Up @@ -497,11 +497,11 @@ static void OneOpcode (unsigned RemainingBytes)
if (PrevAddrMode != AddrMode) {
if ((PrevAddrMode & atMem8) != (AddrMode & atMem8) ||
(PrevAddrMode & atMem16) != (AddrMode & atMem16)) {
< D4FE /td> OutputMFlag(!!(AddrMode & atMem8));
OutputMFlag (!!(AddrMode & atMem8));
}
if ((PrevAddrMode & atIdx8) != (AddrMode & atIdx8) ||
(PrevAddrMode & atIdx16) != (AddrMode & atIdx16)) {
OutputXFlag(!!(AddrMode & atIdx8));
OutputXFlag (!!(AddrMode & atIdx8));
}

PrevAddrMode = AddrMode;
Expand Down Expand Up @@ -580,7 +580,7 @@ static void OnePass (void)
PrevAddrMode = 0;

/* Disassemble until nothing left */
while ((Count = GetRemainingBytes()) > 0) {
while ((Count = GetRemainingBytes ()) > 0) {
OneOpcode (Count);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/da65/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ void InfoSetName (const char* Name)
/* Set a name for a config file */
{
InfoFile = Name;
xfree(InputSrcName);
InputSrcName = xstrdup(Name);
xfree (InputSrcName);
InputSrcName = xstrdup (Name);
}


Expand Down
0