skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

openreadnclose.c (194B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/djbunix.h>
      4 
      5 ssize_t openreadnclose (char const *file, char *s, size_t n)
      6 {
      7   int fd = openbc_read(file) ;
      8   return fd == -1 ? fd : readnclose(fd, s, n) ;
      9 }