Skip to content

The os_io.h header defines three variable types, several macros, and various functions for performing buffered input and output operations with files.

License

Notifications You must be signed in to change notification settings

gabriel-rusu/Operating-System-Input-Output-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project logo

Operating System Input Output Library

The os_io.h header defines three variable types, several macros, and various functions for performing buffered input and output operations with files.

📝 Table of Contents

🧐 About

The following function signatures are exported by the os_io.h library:

SO_FILE *so_fopen(const char *pathname, const char *mode);
int so_fclose(SO_FILE *stream);
int so_fileno(SO_FILE *stream);
int so_fflush(SO_FILE *stream);
int so_fputc(int c, SO_FILE *stream);
size_t so_fread(void *ptr, size_t size, size_t nmemb, SO_FILE *stream);
size_t so_fwrite(const void *ptr, size_t size, size_t nmemb, SO_FILE *stream);
int so_fseek(SO_FILE *stream, long offset, int whence);
long so_ftell(SO_FILE *stream);

To use this functions you must add the os_io.h header in your source and specify at compile time where the library can be found

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To use the os_io.h library on your projects you must have:

  • for UNIX based operating systems:
    • gcc - is a tool from the GNU Compiler Collection used to compile and link C programs

Installing

This is a step by step series of examples that tell you how to get a development env running.

  • Linux:
    • start by updating the packages list
      $sudo apt-get update
    • install the build-essential package(a package of new packages including gcc, g++ and make) by typing:
      $sudo apt-get install build-essential 

🔧 Running the tests

If you want to run the automated tests for Linux system you must follow the following steps:

  • clone the repository by copping the following command in your terminal:
    git clone https://github.com/gabriel-rusu/Operating-System-Input-Output-Library.git
    
  • go into the project director and run the following command:
    make test
  • the results of the tests will be in the newly created file result.out

🎈 Usage

If you want to use the os_io.so library in your projects then you must add the os_io.h header in the desired source file and specify at the compile time the path to the os_io.so library.

  • running the following command in the project director will generate the os_io.so:
    make build

⛏️ Built Using

✍️ Authors

About

The os_io.h header defines three variable types, several macros, and various functions for performing buffered input and output operations with files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages