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

util/cdrom.cpp: Replace stdio usage with core_file. #12136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

invertego
Copy link
Contributor

Fixes #12095

This is mostly 1:1 replacement, but having CUE file parsing go through core_text_file::getc may expose some differences in behavior vs. the user's standard C library.

@angelosa angelosa requested a review from cuavas March 22, 2024 22:10
@cuavas
Copy link
Member

cuavas commented Mar 23, 2024

I’m going to have to say no on this for now, for two reasons:

  • There are people doing ongoing work on util/cdrom.cpp, and this would interfere with it.
  • The “text mode” features of util::core_file are in a pretty dreadful state to begin with.

I realise it’s a real issue, but people will have to work around it for a while longer. Also note that all the Lua scripts that use LFS (Lua File System) and/or standard Lua file objects have issues when paths can’t be represented in the current code page. There are a few other things that use std::ifstream and std::ofstream in the codebase as well.

I was planning to get rid of the stuff using std::ofstream sooner by writing a stream buffer implementation that uses the stuff from ioprocs.h as a backend. That would also allow the text mode writing features to be removed from util::core_file. Dealing with the stuff that needs to read text files is more complicated.

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.

chdman createcd doesn't work with input path containing accents on Windows
2 participants