Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new file functions #454

Merged
merged 6 commits into from
Feb 17, 2024
Merged

Implement new file functions #454

merged 6 commits into from
Feb 17, 2024

Conversation

RhoSigma-QB64
Copy link
Member

- this fixes the wrong (additional) indention of the "false" part in precompiler $IF...$ELSE...$ENDIF blocks
- _READFILE$
- _WRITEFILE
@RhoSigma-QB64 RhoSigma-QB64 added the enhancement New feature or request label Feb 16, 2024
@RhoSigma-QB64 RhoSigma-QB64 self-assigned this Feb 16, 2024
RhoSigma-QB64 and others added 3 commits February 16, 2024 19:01
- rather than a function as suggested by @a740g
- adjust the case of legacy metacommands according to IDE layout settings
@RhoSigma-QB64 RhoSigma-QB64 requested a review from a740g February 16, 2024 20:15
len = ftell(file); // = file length
rewind(file); // rewind to start
cont = qbs_new(len, 1); // get new string for file contents
fread(cont -> chr, 1, len, file);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth checking for an error after fread and fwrite, failures with them can happen for some somewhat common reasons (fwrite more than fread), and the user would have no way of knowing.

@RhoSigma-QB64 RhoSigma-QB64 merged commit ab9fd64 into main Feb 17, 2024
4 checks passed
@RhoSigma-QB64 RhoSigma-QB64 deleted the read-write-file branch February 17, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

3 participants