Some updates to pcecd.c#2
Open
sukibaby wants to merge 2 commits into
Open
Conversation
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.
Owner
|
thanks. are you familiar enough with git to reword the commit messages so they're aligned to 80 chars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.