Skip to content

Oblivious-Oblivious/EmeraldsReadHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmeraldsReadHandler

A safe file reader api.

Installation

Install the library

em list em install em build lib release

Usage

#include "EmeraldsReadHandler.h"

int main(void) {
  char *line1;
  char *line2;
  struct EmeraldsReadHandler *h = read_handler_new();

  if(read_handler_open(h, "file.txt")) {
    line1 = read_handler_read_line();
    line2 = read_handler_read_line();
  }

  printf("%s\n", line1);
  printf("%s\n", line2);

  free(line1);
  free(line2);

  read_handler_close(h);
}

Development

  • Add nullity checks

Contributing

  1. Fork it (https://github.com/Oblivious-Oblivious/EmeraldsReadHandler/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

A safe file reader api.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages