Skip to content

A loose collection of helping header files for C/C++ programming

License

Notifications You must be signed in to change notification settings

belse-de/C-Helper-Headers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-Helper-Headers

A loose collection of helping header files for C programming. This is probably expanded to be c++ compatible

Headers and their use:

'belse/std_c.h' Includes all std C headers, for the version of C selcted during compile time. Intended use is as precompiled project header. Example: gcc -std=c11 -include "belse/std_c.h" -o a.out a.c Supported versions are: C89, C99, C11

'belse/try_catch.h' Creates try/catch/finaly like error handling via macros. Must not be nested! Note the difference in '} ENTRY;' and '} ENDTRY;' ENTRY: with FINALLY block ENDTRY: without FINALLY block

                  Example:
                  
                    TRY{
                      // Throws error number 1
                      THROW(1);
                    } CATCH( 1 ){
                      // catches error 1
                    } CATCH( 2 ){
                      // catches error 2
                      // but is never reached in this case
                    } FINALLY {
                      // is allways executed
                    } ENTRY;

                    TRY{
                      THROW_IF( false, 2 );
                    } CATCH( 1 ){
                    } CATCH( 2 ){
                    } ENDTRY;

'belse/dbg.h'

About

A loose collection of helping header files for C/C++ programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published