Make comments more consistent

- Changes most `/* comments */` to `// comments`
- Changes `/**` block comments consistently to `/*`
- Adds consistent license comments to all files

Also renames `T_POP_SET` to `T_Z80_SET`
This commit is contained in:
Rangi
2022-08-29 18:01:34 -04:00
committed by Eldred Habert
parent dca24a6d50
commit fa13611bbf
76 changed files with 1077 additions and 1335 deletions

View File

@@ -6,7 +6,7 @@
* SPDX-License-Identifier: MIT
*/
/* Declarations that all modules use, as well as `main` and related */
// Declarations that all modules use, as well as `main` and related
#ifndef RGBDS_LINK_MAIN_H
#define RGBDS_LINK_MAIN_H
@@ -16,7 +16,7 @@
#include "helpers.h"
/* Variables related to CLI options */
// Variables related to CLI options
extern bool isDmgMode;
extern char *linkerScriptName;
extern char const *mapFileName;
@@ -35,7 +35,7 @@ extern bool disablePadding;
struct FileStackNode {
struct FileStackNode *parent;
/* Line at which the parent context was exited; meaningless for the root level */
// Line at which the parent context was exited; meaningless for the root level
uint32_t lineNo;
enum {
@@ -44,21 +44,21 @@ struct FileStackNode {
NODE_MACRO,
} type;
union {
char *name; /* NODE_FILE, NODE_MACRO */
struct { /* NODE_REPT */
char *name; // NODE_FILE, NODE_MACRO
struct { // NODE_REPT
uint32_t reptDepth;
uint32_t *iters;
};
};
};
/* Helper macro for printing verbose-mode messages */
// Helper macro for printing verbose-mode messages
#define verbosePrint(...) do { \
if (beVerbose) \
fprintf(stderr, __VA_ARGS__); \
} while (0)
/**
/*
* Dump a file stack to stderr
* @param node The leaf node to dump the context of
*/
@@ -73,7 +73,7 @@ void error(struct FileStackNode const *where, uint32_t lineNo,
_Noreturn void fatal(struct FileStackNode const *where, uint32_t lineNo,
char const *fmt, ...) format_(printf, 3, 4);
/**
/*
* Opens a file if specified, and aborts on error.
* @param fileName The name of the file to open; if NULL, no file will be opened
* @param mode The mode to open the file with
@@ -87,4 +87,4 @@ FILE *openFile(char const *fileName, char const *mode);
fclose(tmp); \
} while (0)
#endif /* RGBDS_LINK_MAIN_H */
#endif // RGBDS_LINK_MAIN_H