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

Include Directories #19

Open
Kroc opened this issue Feb 11, 2025 · 1 comment
Open

Include Directories #19

Kroc opened this issue Feb 11, 2025 · 1 comment

Comments

@Kroc
Copy link

Kroc commented Feb 11, 2025

Given that, naturally, NTVCM doesn't support drive letters, subdirectories or user-areas, I'd like a way to 'include' multiple other folders in order to mimic the presence of additional drives / user-areas in a real CP/M system. E.g. ntvcm --include-dir "some_dir" --include-dir "other_dir" [...]

When opening a file, the current directory is checked, and if the file is not found, each of the additional include directories are tested.

Separate from this request, it might be desirable to allow direct binding of directories to CP/M drive letters:
E.g. ntvcm -A "fdd/a" -B "fdd/b" -C "fdd/c", where parameters -A to -P map directories to CP/M drives A-P.

@davidly
Copy link
Owner

davidly commented Feb 11, 2025

Thanks for these suggestions!

I think implementing include directories in this way would be tough since every file open would have to check if it seems like the calling app is trying to open an include file and act appropriately. It'd be an odd place in the stack for such a check that I worry would end up being likely to have bugs and unintended consequences.

Your drive letter idea would solve the include file problem as that's how many C compilers are setup to work from the CP/M days. Other CP/M emulators do exactly as you suggest. The upside is that it means people don't have to copy include files (or any other files) into a shared folder with their source code. This would be especially helpful when a project can be built with multiple C compilers that can't be mixed in a single folder. I'm thinking about how/if to do this and will get back to you.

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

No branches or pull requests

2 participants