|
s502 assembler
A very simple assembler for the 6502 line of processors written in C
|
logging and fancy-printing More...
#include <stdio.h>Go to the source code of this file.
Macros | |
| #define | LOG(LVL, ...) if (logging_level(0)>=(LVL)) {printf("\e[33mLOG:\e[39m\t"); printf(__VA_ARGS__);} |
| logging macro - works like printf More... | |
| #define | LOGDO(LVL, x) if(logging_level(0) >= (LVL)) {x;}; |
| Conditional macro. Wraps contents into a conditional based on log level. More... | |
| #define | ERROR(...) {printf("\e[41mERROR\e[49m:\t"); printf(__VA_ARGS__);} |
| Fancy-print an error (cause of faliure). Works like printf. More... | |
| #define | FAIL(...) {printf("\e[31mFAIL:\e[39m\t"); printf(__VA_ARGS__);} |
| Fancy-print a fail (failed step). Works like printf. More... | |
Functions | |
| int | logging_level (int setlevel) |
| pseudo-global accessor More... | |
logging and fancy-printing
Contains conditional logging macros and fancy-print printf wrappers
Definition in file logging.h.
| #define ERROR | ( | ... | ) | {printf("\e[41mERROR\e[49m:\t"); printf(__VA_ARGS__);} |
| #define FAIL | ( | ... | ) | {printf("\e[31mFAIL:\e[39m\t"); printf(__VA_ARGS__);} |
| #define LOG | ( | LVL, | |
| ... | |||
| ) | if (logging_level(0)>=(LVL)) {printf("\e[33mLOG:\e[39m\t"); printf(__VA_ARGS__);} |
| #define LOGDO | ( | LVL, | |
| x | |||
| ) | if(logging_level(0) >= (LVL)) {x;}; |
| int logging_level | ( | int | setlevel | ) |
pseudo-global accessor
| setlevel | new level to set log level to or 0 to don't change |
Definition at line 6 of file logging.c.
Referenced by main(), and state_parse_commandline().