Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/not-nik/libcomperr
A simple C library to create GCC-like compiler warnings and errors.
https://github.com/not-nik/libcomperr
compiler compiler-tool errors gcc warnings
Last synced: 24 days ago
JSON representation
A simple C library to create GCC-like compiler warnings and errors.
- Host: GitHub
- URL: https://github.com/not-nik/libcomperr
- Owner: Not-Nik
- License: mit
- Created: 2020-07-19T13:57:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-24T20:44:46.000Z (9 months ago)
- Last Synced: 2024-02-24T21:39:39.062Z (9 months ago)
- Topics: compiler, compiler-tool, errors, gcc, warnings
- Language: C
- Homepage:
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libcomperr
A simple C library to create GCC-like compiler warnings and errors.
## Simple usage example
```c
#include "comperr.h"int main()
{
comperr(false, "Test warning", true, "", 0, 0);
comperr(false, "Test error 1", false, "", 0, 0);
comperr(false, "Test error 2", false, "", 0, 0);
endfile();
}
```## Internal stuff...
...you might want to know.
* Streams are flushed after each message
* Tabs in files are replaced with single whitespaces
* ANSI color codes are used so your terminal has to support thatThere are three compile flags:
### ERROR_STREAM, WARNING_STREAM, NOTE_STREAM, ENDFILE_STREAM
These set the stream that should be use when printing an error, a warning, a noe and the endfile message respectively.
### AUTO_EXIT
If defined the library will automatically `exit(1)` if there has been an error when `endfile()` is called.