Lexical Analyzer v0.1.0
 
Loading...
Searching...
No Matches
lexer_io.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  fchnk_t
 A structure that represents a chunk of data from a file. More...
 

Functions

fchnk_tfchnk_ctor ()
 Constructs a new file chunk object.
 
void fchnk_dtor (fchnk_t *chnk)
 Destructor for the file chunk object.
 
fchnk_tfchnk_ptor (char *const buff, const size_t chksz)
 Initializes and returns a file chunk object with provided buffer and size.
 
bool fwrite_fchnk (const char *fname, const fchnk_t *chnk)
 Writes the contents of a file chunk to a specified file.
 
fchnk_tget_fchnk (const char *fname)
 Reads the contents of a binary file into a dynamically allocated buffer and stores it in a new fchnk_t structure.