Skip to content

Commit

Permalink
Add an error handling feature to every input and output functions;
Browse files Browse the repository at this point in the history
Fix a part of identifiers not to violate the C++ standard

In addition to fopen(), malloc(), etc., the functions fclose(),
fgetc(), fputc(), fputs(), and fprintf() are also replaced with their
respective wrapper functions that handle errors.
This replacement is done only where they are used for parsing or code
generation, and is not done for message printing and debug dumping.

Every double underscore __ contained in an identifier that consists of
uppercase letters and underscores (e.g. STRING_FLAG__IDENTIFIER) is
replaced with a single underscore (e.g. STRING_FLAG_IDENTIFIER),
not to violate the C++ standard ISO/IEC 14882-2014.
It states "Each name that contains a double underscore __ or begins
with an underscore followed by an uppercase letter is reserved to
the implementation for any use."
  • Loading branch information
arithy committed Nov 2, 2019
1 parent 1012eb3 commit e78c157
Showing 1 changed file with 308 additions and 259 deletions.
Loading

2 comments on commit e78c157

@elfring
Copy link

@elfring elfring commented on e78c157 Nov 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you mix changes for different issues in such a commit?

@arithy
Copy link
Owner Author

@arithy arithy commented on e78c157 Nov 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revised the code in one breath thoughtlessly... Since I'm lazy, it was somewhat bothersome for me to decompose the modifications corresponding to the respective issues.
I'll take care next time.

Please sign in to comment.