Skip to content

Some updates to pcecd.c#2

Open
sukibaby wants to merge 2 commits into
rofl0r:masterfrom
sukibaby:pcecd
Open

Some updates to pcecd.c#2
sukibaby wants to merge 2 commits into
rofl0r:masterfrom
sukibaby:pcecd

Conversation

@sukibaby

Copy link
Copy Markdown
Contributor

pcecd.c: Define macros for CD control codes

This file is full of hard-coded control values without comments to describe what they do. This makes it very difficult to parse the code when read.

This commit introduces a macro to correspond to each control code used.

pcecd.c: Add some helper macros

Making macros to substitute a few frequently used commands. They perform important functions, and are called multiple times within the code, but the actual function has not been described in the code.

I felt a macro was the ideal way to handle this, since adding comments to each instance of these commands would increase clutter.

This will make the code easier to read, and also easier to maintain by reducing code duplication.

This file is full of hard-coded control values without comments to describe what they do. This makes it very difficult to parse the code when read. This commit introduces a macro to correspond to each control code used.
Making macros to substitute a few frequently used commands. They perform important functions, and are called multiple times within the code, but the actual function has not been described in the code.

I felt a macro was the ideal way to handle this, since adding comments to each instance of these commands would increase clutter.

This will make the code easier to read, and also easier to maintain by reducing code duplication.
@rofl0r

rofl0r commented Feb 25, 2025

Copy link
Copy Markdown
Owner

thanks. are you familiar enough with git to reword the commit messages so they're aligned to 80 chars
length for terminal use? otherwise one has to scroll right for every line exceeding it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants