Changed multi-line C comments into another style.

The left side doesn't look unbalanced.
This commit is contained in:
Greg King
2014-06-30 05:10:35 -04:00
parent 132d57f1ad
commit 0390c34e88
502 changed files with 8869 additions and 8884 deletions

View File

@@ -168,8 +168,8 @@ void AsmInc (const char* Filename, char CommentStart, int IgnoreUnknown)
}
/* Determine the base of the number. Allow $ and % as prefixes for
* hex and binary numbers respectively.
*/
** hex and binary numbers respectively.
*/
if (*L == '$') {
Base = 16;
++L;

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 2000-2003 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -98,8 +98,8 @@ void LoadCode (void)
}
/* Seek to the input offset and correct size to contain the remainder of
* the file.
*/
** the file.
*/
if (fseek (F, InputOffs, SEEK_SET) != 0) {
Error ("Cannot seek on file `%s': %s", InFile, strerror (errno));
}
@@ -114,9 +114,9 @@ void LoadCode (void)
}
/* If the start address was not given, set it so that the code loads to
* 0x10000 - Size. This is a reasonable default assuming that the file
* is a ROM that contains the hardware vectors at $FFFA.
*/
** 0x10000 - Size. This is a reasonable default assuming that the file
** is a ROM that contains the hardware vectors at $FFFA.
*/
if (StartAddr < 0) {
if (Size > 0x10000) {
StartAddr = 0;

View File

@@ -57,9 +57,9 @@ static unsigned GetSpan (attr_t Style)
unsigned RemainingBytes = GetRemainingBytes ();
/* Count how many bytes are available. This number is limited by the
* number of remaining bytes, a label, a segment change, or the end of
* the given Style attribute.
*/
** number of remaining bytes, a label, a segment change, or the end of
** the given Style attribute.
*/
unsigned Count = 1;
while (Count < RemainingBytes) {
attr_t Attr;
@@ -91,9 +91,9 @@ static unsigned DoTable (attr_t Style, unsigned MemberSize, void (*TableFunc) (u
unsigned Count = GetSpan (Style);
/* If the count is less than the member size, print a row of Count data
* bytes. We assume here that there is no member with a size that is less
* than BytesPerLine.
*/
** bytes. We assume here that there is no member with a size that is less
** than BytesPerLine.
*/
if (Count < MemberSize) {
DataByteLine (Count);
PC += Count;
@@ -172,8 +172,8 @@ unsigned AddrTable (void)
unsigned long Start = PC;
/* Loop while table bytes left and we don't need to create a label at the
* current position.
*/
** current position.
*/
while (BytesLeft && GetStyleAttr (PC) == atAddrTab) {
unsigned Addr;
@@ -238,8 +238,8 @@ unsigned RtsTable (void)
unsigned long Start = PC;
/* Loop while table bytes left and we don't need to create a label at the
* current position.
*/
** current position.
*/
while (BytesLeft && GetStyleAttr (PC) == atRtsTab) {
unsigned Addr;

View File

@@ -93,8 +93,8 @@ static void OneLine (const OpcDesc* D, const char* Arg, ...)
static const char* GetAbsOverride (unsigned Flags, unsigned Addr)
/* If the instruction requires an abs override modifier, return the necessary
* string, otherwise return the empty string.
*/
** string, otherwise return the empty string.
*/
{
if ((Flags & flAbsOverride) != 0 && Addr < 0x100) {
return "a:";
@@ -137,10 +137,10 @@ static void GenerateLabel (unsigned Flags, unsigned Addr)
((Flags & flUseLabel) != 0 && Addr >= CodeStart && Addr <= CodeEnd))) {
/* As a special case, handle ranges with tables or similar. Within
* such a range with a granularity > 1, do only generate dependent
* labels for all addresses but the first one. Be sure to generate
* a label for the start of the range, however.
*/
** such a range with a granularity > 1, do only generate dependent
** labels for all addresses but the first one. Be sure to generate
** a label for the start of the range, however.
*/
attr_t Style = GetStyleAttr (Addr);
unsigned Granularity = GetGranularity (Style);
@@ -153,8 +153,8 @@ static void GenerateLabel (unsigned Flags, unsigned Addr)
/* Search for the start of the range or the last non dependent
* label in the range.
*/
** label in the range.
*/
unsigned Offs;
attr_t LabelAttr;
unsigned LabelAddr = Addr;
@@ -414,10 +414,10 @@ void OH_BitBranch (const OpcDesc* D)
unsigned BranchAddr = (((int) PC+3) + BranchOffs) & 0xFFFF;
/* Generate labels in pass 1. The bit branch codes are special in that
* they don't really match the remainder of the 6502 instruction set (they
* are a Rockwell addon), so we must pass additional flags as direct
* value to the second GenerateLabel call.
*/
** they don't really match the remainder of the 6502 instruction set (they
** are a Rockwell addon), so we must pass additional flags as direct
** value to the second GenerateLabel call.
*/
GenerateLabel (D->Flags, TestAddr);
GenerateLabel (flLabel, BranchAddr);

View File

@@ -70,8 +70,8 @@ static const char* SymTab[0x10000];
static const char* MakeLabelName (unsigned Addr)
/* Make the default label name from the given address and return it in a
* static buffer.
*/
** static buffer.
*/
{
static char LabelBuf [32];
xsprintf (LabelBuf, sizeof (LabelBuf), "L%04X", Addr);
@@ -89,8 +89,8 @@ static void AddLabel (unsigned Addr, attr_t Attr, const char* Name)
/* Must not have two symbols for one address */
if (ExistingAttr != atNoLabel) {
/* Allow redefinition if identical. Beware: Unnamed labels don't
* have a name (you guessed that, didn't you?).
*/
** have a name (you guessed that, didn't you?).
*/
if (ExistingAttr == Attr &&
((Name == 0 && SymTab[Addr] == 0) || strcmp (SymTab[Addr], Name) == 0)) {
return;
@@ -133,8 +133,8 @@ void AddUnnamedLabel (unsigned Addr)
void AddDepLabel (unsigned Addr, attr_t Attr, const char* BaseName, unsigned Offs)
/* Add a dependent label at the given address using "basename+Offs" as the new
* name.
*/
** name.
*/
{
/* Allocate memory for the dependent label name */
unsigned NameLen = strlen (BaseName);
@@ -159,8 +159,8 @@ void AddDepLabel (unsigned Addr, attr_t Attr, const char* BaseName, unsigned Off
static void AddLabelRange (unsigned Addr, attr_t Attr,
const char* Name, unsigned Count)
/* Add a label for a range. The first entry gets the label "Name" while the
* others get "Name+offs".
*/
** others get "Name+offs".
*/
{
/* Define the label */
AddLabel (Addr, Attr, Name);
@@ -196,8 +196,8 @@ static void AddLabelRange (unsigned Addr, attr_t Attr,
void AddIntLabelRange (unsigned Addr, const char* Name, unsigned Count)
/* Add an internal label for a range. The first entry gets the label "Name"
* while the others get "Name+offs".
*/
** while the others get "Name+offs".
*/
{
/* Define the label range */
AddLabelRange (Addr, atIntLabel, Name, Count);
@@ -207,8 +207,8 @@ void AddIntLabelRange (unsigned Addr, const char* Name, unsigned Count)
void AddExtLabelRange (unsigned Addr, const char* Name, unsigned Count)
/* Add an external label for a range. The first entry gets the label "Name"
* while the others get "Name+offs".
*/
** while the others get "Name+offs".
*/
{
/* Define the label range */
AddLabelRange (Addr, atExtLabel, Name, Count);
@@ -227,8 +227,8 @@ int HaveLabel (unsigned Addr)
int MustDefLabel (unsigned Addr)
/* Return true if we must define a label for this address, that is, if there
* is a label at this address, and it is an external or internal label.
*/
** is a label at this address, and it is an external or internal label.
*/
{
/* Get the label attribute */
attr_t A = GetLabelAttr (Addr);
@@ -246,8 +246,8 @@ const char* GetLabelName (unsigned Addr)
attr_t A = GetLabelAttr (Addr);
/* Special case unnamed labels, because these don't have a named stored in
* the symbol table to save space.
*/
** the symbol table to save space.
*/
if (A == atUnnamedLabel) {
return "";
} else {
@@ -260,9 +260,9 @@ const char* GetLabelName (unsigned Addr)
const char* GetLabel (unsigned Addr, unsigned RefFrom)
/* Return the label name for an address, as it is used in a label reference.
* RefFrom is the address the label is referenced from. This is needed in case
* of unnamed labels, to determine the name.
*/
** RefFrom is the address the label is referenced from. This is needed in case
** of unnamed labels, to determine the name.
*/
{
static const char* FwdLabels[] = {
":+", ":++", ":+++", ":++++", ":+++++", ":++++++", ":+++++++",
@@ -277,15 +277,15 @@ const char* GetLabel (unsigned Addr, unsigned RefFrom)
attr_t A = GetLabelAttr (Addr);
/* Special case unnamed labels, because these don't have a named stored in
* the symbol table to save space.
*/
** the symbol table to save space.
*/
if (A == atUnnamedLabel) {
unsigned Count = 0;
/* Search forward or backward depending in which direction the label
* is.
*/
** is.
*/
if (Addr <= RefFrom) {
/* Search backwards */
unsigned I = RefFrom;
@@ -333,8 +333,8 @@ const char* GetLabel (unsigned Addr, unsigned RefFrom)
void ForwardLabel (unsigned Offs)
/* If necessary, output a forward label, one that is within the next few
* bytes and is therefore output as "label = * + x".
*/
** bytes and is therefore output as "label = * + x".
*/
{
/* Calculate the actual address */
unsigned long Addr = PC + Offs;
@@ -348,8 +348,8 @@ void ForwardLabel (unsigned Offs)
}
/* An unnamed label cannot be output as a forward declaration, so this is
* an error.
*/
** an error.
*/
if (A == atUnnamedLabel) {
Error ("Cannot define unnamed label at address $%04lX", Addr);
}

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 2006 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -59,40 +59,40 @@ void AddUnnamedLabel (unsigned Addr);
void AddDepLabel (unsigned Addr, attr_t Attr, const char* BaseName, unsigned Offs);
/* Add a dependent label at the given address using "base name+Offs" as the new
* name.
*/
** name.
*/
void AddIntLabelRange (unsigned Addr, const char* Name, unsigned Count);
/* Add an internal label for a range. The first entry gets the label "Name"
* while the others get "Name+offs".
*/
** while the others get "Name+offs".
*/
void AddExtLabelRange (unsigned Addr, const char* Name, unsigned Count);
/* Add an external label for a range. The first entry gets the label "Name"
* while the others get "Name+offs".
*/
** while the others get "Name+offs".
*/
int HaveLabel (unsigned Addr);
/* Check if there is a label for the given address */
int MustDefLabel (unsigned Addr);
/* Return true if we must define a label for this address, that is, if there
* is a label at this address, and it is an external or internal label.
*/
** is a label at this address, and it is an external or internal label.
*/
const char* GetLabelName (unsigned Addr);
/* Return the label name for an address */
const char* GetLabel (unsigned Addr, unsigned RefFrom);
/* Return the label name for an address, as it is used in a label reference.
* RefFrom is the address the label is referenced from. This is needed in case
* of unnamed labels, to determine the name.
*/
** RefFrom is the address the label is referenced from. This is needed in case
** of unnamed labels, to determine the name.
*/
void ForwardLabel (unsigned Offs);
/* If necessary, output a forward label, one that is within the next few
* bytes and is therefore output as "label = * + x".
*/
** bytes and is therefore output as "label = * + x".
*/
void DefOutOfRangeLabels (void);
/* Output any labels that are out of the loaded code range */

View File

@@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -108,8 +108,8 @@ static void Usage (void)
static void RangeCheck (const char* Opt, unsigned long Val,
unsigned long Min, unsigned long Max)
/* Do a range check for the given option and abort if there's a range
* error.
*/
** error.
*/
{
if (Val < Min || Val > Max) {
Error ("Argument for %s outside valid range (%ld-%ld)", Opt, Min, Max);
@@ -120,8 +120,8 @@ static void RangeCheck (const char* Opt, unsigned long Val,
static unsigned long CvtNumber (const char* Arg, const char* Number)
/* Convert a number from a string. Allow '$' and '0x' prefixes for hex
* numbers.
*/
** numbers.
*/
{
unsigned long Val;
int Converted;
@@ -357,8 +357,8 @@ static void OneOpcode (unsigned RemainingBytes)
attr_t Style = GetStyleAttr (PC);
/* If we have a label at this address, output the label and an attached
* comment, provided that we aren't in a skip area.
*/
** comment, provided that we aren't in a skip area.
*/
if (Style != atSkip && MustDefLabel (PC)) {
const char* Comment = GetComment (PC);
if (Comment) {
@@ -368,11 +368,11 @@ static void OneOpcode (unsigned RemainingBytes)
}
/* Check...
* - ...if we have enough bytes remaining for the code at this address.
* - ...if the current instruction is valid for the given CPU.
* - ...if there is no label somewhere between the instruction bytes.
* If any of these conditions is false, switch to data mode.
*/
** - ...if we have enough bytes remaining for the code at this address.
** - ...if the current instruction is valid for the given CPU.
** - ...if there is no label somewhere between the instruction bytes.
** If any of these conditions is false, switch to data mode.
*/
if (Style == atDefault) {
if (D->Size > RemainingBytes) {
Style = atIllegal;
@@ -402,8 +402,8 @@ static void OneOpcode (unsigned RemainingBytes)
case atCode:
/* Beware: If we don't have enough bytes left to disassemble the
* following insn, fall through to byte mode.
*/
** following insn, fall through to byte mode.
*/
if (D->Size <= RemainingBytes) {
/* Output labels within the next insn */
unsigned I;
@@ -594,9 +594,9 @@ int main (int argc, char* argv [])
}
/* Check the formatting options for reasonable values. Note: We will not
* really check that they make sense, just that they aren't complete
* garbage.
*/
** really check that they make sense, just that they aren't complete
** garbage.
*/
if (MCol >= ACol) {
AbEnd ("mnemonic-column value must be smaller than argument-column value");
}
@@ -613,8 +613,8 @@ int main (int argc, char* argv [])
}
/* Get the current time and convert it to string so it can be used in
* the output page headers.
*/
** the output page headers.
*/
T = time (0);
strftime (Now, sizeof (Now), "%Y-%m-%d %H:%M:%S", localtime (&T));

View File

@@ -46,8 +46,8 @@
/* Descriptions for all opcodes. Base table from opc6502.c with illegal
* opcodes from http://www.oxyron.de/html/opcodes02.html
*/
** opcodes from http://www.oxyron.de/html/opcodes02.html
*/
const OpcDesc OpcTable_6502X[256] = {
{ "brk", 1, flNone, OH_Implicit }, /* $00 */
{ "ora", 2, flUseLabel, OH_DirectXIndirect }, /* $01 */

View File

@@ -168,8 +168,8 @@ void DefLabel (const char* Name)
{
Output ("%s:", Name);
/* If the label is longer than the configured maximum, or if it runs into
* the opcode column, start a new line.
*/
** the opcode column, start a new line.
*/
if (Col > LBreak+2 || Col > MCol) {
LineFeed ();
}
@@ -179,8 +179,8 @@ void DefLabel (const char* Name)
void DefForward (const char* Name, const char* Comment, unsigned Offs)
/* Define a label as "* + x", where x is the offset relative to the
* current PC.
*/
** current PC.
*/
{
if (Pass == PassCount) {
/* Flush existing output if necessary */

View File

@@ -69,8 +69,8 @@ void DefLabel (const char* Name);
void DefForward (const char* Name, const char* Comment, unsigned Offs);
/* Define a label as "* + x", where x is the offset relative to the
* current PC.
*/
** current PC.
*/
void DefConst (const char* Name, const char* Comment, unsigned Addr);
/* Define an address constant */

View File

@@ -66,8 +66,8 @@ struct Segment {
};
/* Tables containing the segments. A segment is inserted using it's hash
* value. Collision is done by single linked lists.
*/
** value. Collision is done by single linked lists.
*/
static Segment* StartTab[HASH_SIZE]; /* Table containing segment starts */
static Segment* EndTab[HASH_SIZE]; /* Table containing segment ends */