ref: d687b4ee0c7ac58d9a9e5e50fb1813f47f17681d
dir: /src/reader.h/
/* This file is part of REWise. * * REWise is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * REWise is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef H_REWISE_READER #define H_REWISE_READER #include <stdio.h> #include <linux/limits.h> // PATH_MAX #include <string.h> #include <unistd.h> // access, F_OK #include <stdint.h> // uint32_t #include <stdlib.h> // malloc #include "errors.h" REWError readBytesInto(FILE * fp, unsigned char * dest, uint32_t size); REWError readInt32(FILE * fp, int * dest); REWError readUInt32(FILE * fp, unsigned int * dest); REWError readUInt16(FILE * fp, uint16_t * dest); REWError readString(FILE * fp, char ** dest); #endif