Skip to content
/ cry.h Public

Small header only c library for crying (errors) in programms

License

Notifications You must be signed in to change notification settings

4thel00z/cry.h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cry.h

cry-h.png

Table of Contents

Motivation

I want errors and fatal errors with fancy colors.

Installation

clib install 4thel00z/cry.h

Usage

#include "cry.h"
#include <sysexits.h>

#define CRY_SIMPLE (-1337)
#define CRY_FATAL (1337)

int main(){

  // If you set CRY_TO var to another FILE * the output get's redirected there

  cry_t simple_cry = cry_new(CRY_SIMPLE, "CRY_SIMPLE");
  cry_t fatal_cry = cry_fatal_new(CRY_FATAL, "CRY_FATAL", true, EX_USAGE);

  cry(&simple_cry, "Crying simply");
  cry(&fatal_cry, "Crying for last time boi");

  // This will get ignored lel
  return 0;
}

License

This project is licensed under the GPL-3 license.

About

Small header only c library for crying (errors) in programms

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages