Skip to content

Change creat()/write()/close() to fopen()/fwrite()/fclose()#14

Open
hsnyder wants to merge 3 commits intolecram:masterfrom
hsnyder:master
Open

Change creat()/write()/close() to fopen()/fwrite()/fclose()#14
hsnyder wants to merge 3 commits intolecram:masterfrom
hsnyder:master

Conversation

@hsnyder
Copy link

@hsnyder hsnyder commented Jun 6, 2022

You may not be interested in these changes, which is fine of course, but I implemented these for my own purposes and I figured that I would offer them back.

This PR changes 3 things:

  • creat()/write()/close() was replaced with fopen()/fwrite()/fclose(). My reason for implementing this was in case the user wanted to write to a buffer created with fmemopen instead of to an actual file (I have such a use case).

  • A new function was added, ge_new_gif_filestream that accepts a FILE* instead of a filename.

  • The function ge_close_gif now returns the total length of the written gif file as a size_t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant