When generating C code, please adhere to the following style guidelines to ensure the code is maintainable, debuggable, and easy to modify:
- Conceptualize programming as a sequence of data transformations, where specific input data is processed step-by-step to produce desired output data. For example, a program that handles HTTP requests can be understood as taking an HTTP request string and current database state to generate an HTTP response string. This perspective prioritizes concrete reasoning over abstract design principles often associated with object-oriented programming (OOP) or 'clean code' paradigms.
- Avoid object-oriented programming and prioritize Plain Old Data (POD) structures and procedural solutions.
- De-prioritize encapsulation as a design goal, focusing instead on simplicity and efficiency.
- Prefer explicit error code returns while avoiding errno and exceptions
- Avoid Deep Nesting: Do not use deeply nested if-statements. For sequential, dependent conditions, use boolean flags to contro