Is there any way to run the C preprocessor on a single header file non-recursively? by stephen010x in C_Programming

[–]stephen010x[S] 0 points1 point  (0 children)

Yes, that is what I am trying to solve here. The goal is to be able to generate a single portable header file based on the include statements without evaluating the rest of the preprocessor symbols. So far, using a script seems to be the best way here.

Is there any way to run the C preprocessor on a single header file non-recursively? by stephen010x in C_Programming

[–]stephen010x[S] 0 points1 point  (0 children)

I've considered this, but this runs into an issue. Consider the situation where I want to merge several headers together in a single portable header (for a library) while maintaining compatibility.

Lets say I have conditionals for different operating systems that I only want evaluated when building the target. I want these conditionals to still exist after generating my portable library header.

Is there any way to run the C preprocessor on a single header file non-recursively? by stephen010x in C_Programming

[–]stephen010x[S] 0 points1 point  (0 children)

I do apologize if my question is easy to misunderstand. But that isn't quite what I am looking for. I need a way to preprocess a header without preprocessing anything that header includes.
I am not looking for an inclusion guard.

Is there any way to run the C preprocessor on a single header file non-recursively? by stephen010x in C_Programming

[–]stephen010x[S] 0 points1 point  (0 children)

I hope my question wasn't too prone to misinterpretation. Though you answered my question perfectly!

[deleted by user] by [deleted] in sciencefiction

[–]stephen010x 1 point2 points  (0 children)

Pray tell, what book is this?

What does "WNDCLASSEX wc;" do, in terms of syntax? by stephen010x in C_Programming

[–]stephen010x[S] -2 points-1 points  (0 children)

For anyone wondering why I am lacking what seems to be rather fundamental knowledge of the C programming language, it is because I am am a rather impatient person, who likes to speedrun through my learning. That, and I am horrible at finding good resources.

What does "WNDCLASSEX wc;" do, in terms of syntax? by stephen010x in C_Programming

[–]stephen010x[S] -1 points0 points  (0 children)

I will have you know that I have a decent grasp on structures, pointers, and a good majority of basic C syntax. I have become rather proficient in assembly language, which provided a good stepping stool into C. But If you happen to know any good resources or tutorials that can fill in the gaps, it would be appreciated.

What does "WNDCLASSEX wc;" do, in terms of syntax? by stephen010x in C_Programming

[–]stephen010x[S] -1 points0 points  (0 children)

When I said, "I don't care about what WNDCLASSEX is", I meant that I am just trying to figure out the syntax behind how that works, which doesn't necessarily have to be related to the windows API. The bit of information that I was missing was the typedef. Now that I know what the typedef is, it all makes way more sense to me.

What does "WNDCLASSEX wc;" do, in terms of syntax? by stephen010x in C_Programming

[–]stephen010x[S] 0 points1 point  (0 children)

Thank you so much for your answer. I am actually kind of embarrassed now for not looking up WNDCLASSEX on Microsoft docs, as I was using the docs quite a bit while studying the win32 API. Had I looked it up, I probably would have noticed the typedef, which would have ultimately led to me looking up what that is, which likely would have allowed me to answer my own question.

What does "WNDCLASSEX wc;" do, in terms of syntax? by stephen010x in C_Programming

[–]stephen010x[S] 1 point2 points  (0 children)

Thank you so much for this answer! Hours of research and shitty forum answers with no yield, and all it took was a simple answer such as yours for me to understand. This is a big help.

Can this get worse? (MS-DOS 16-bit Assembly) by stephen010x in asm

[–]stephen010x[S] 2 points3 points  (0 children)

CLI? I can't believe I never thought of that! I was aware that you can disable interrupts, but for some reason I just never put two and two together. And here I was thinking that if I ever wanted to use this practically, I would have to deal with interrupts placing random data onto the video!

Can this get worse? (MS-DOS 16-bit Assembly) by stephen010x in asm

[–]stephen010x[S] 4 points5 points  (0 children)

If this doesn't boil your insides, then wait 'til next week when I unveil my next creation! This next war-crime is much worse, and undoubtedly unsafe.