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

Change #include <os.h> to #include "os.h" #8

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

angstsmurf
Copy link
Contributor

This is really more of a question than a pull request.

I don't understand why you'd want to include os.h as a system header. Either you would have to copy it from the tads2 folder to the system header folder, or instruct the compiler to look for system headers in the tads2 folder, both of which seem strange to me.

This PR leaves the #include <os.h>in /tads2/msdos/ltkwin.c alone, simply because I understand even less about MS-DOS.

@curiousdannii
Copy link
Contributor

I've never seen any errors from these inclusions, but changing them makes sense to me.

@angstsmurf
Copy link
Contributor Author

Xcode always errors on these and suggests changing them from angle brackets to quotation marks. It is trivial to make Xcode look in a specific folder for system header includes, but it seems strange, as I said. There must be a reason why they are included like this.

@realnc
Copy link
Member

realnc commented Dec 1, 2021

Any reason for the ../tads2/ part? Should be just "os.h" IMO.

@angstsmurf
Copy link
Contributor Author

angstsmurf commented Dec 1, 2021

I thought it would make it easier for the compiler to find it, but perhaps it won't.

EDIT: And if someone is trying to build TADS 3 without the TADS 2 source, then writing it like this makes it clearer what is missing.

EDIT 2: Also, there is another include, in vmtz.cpp: #include "osstzprs.h", which I have to change to #include "../tads2/osstzprs.h", or else I have to add the tads2 folder to the list of header search paths when compiling TADS 3. But #include "os.h" works fine. I don't understand what makes them different.

EDIT 3: Oh, right, I had missed adding the osstzprs.h file to the Xcode project. Anyway, that kind of supports my point that having relative include paths makes them easier to find.

@realnc
Copy link
Member

realnc commented Dec 1, 2021

EDIT 2: Also, there is another include, in vmtz.cpp: #include "osstzprs.h", which I have to change to #include "../tads2/osstzprs.h", or else I have to add the tads2 folder to the list of header search paths when compiling TADS 3.

Yeah. That's what you should be doing instead of adding directories to the include directives.

@angstsmurf
Copy link
Contributor Author

Done!

@angstsmurf angstsmurf changed the title Change #include <os.h> to #include "../tads2/os.h" Change #include <os.h> to #include "os.h" Dec 1, 2021
@curiousdannii curiousdannii merged commit 0f8ebf7 into tads-intfic:master Dec 1, 2021
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.

3 participants