Menu

#117 Feature request: add pad option in #include

1.0
pending
None
2024-08-20
2019-03-06
No

In C/C++ or other language which support C preprocess (like Fortran), #include can insert the header files to the source files.

In C, both "#include<stdio.h>" and "#include <stdio.h>" are correct. In different coding style, the preference are different. Currently, there aren't pad and unpad option for this item.</stdio.h></stdio.h>

If it is possible, please consider to add them in astyle.

Discussion

  • André Simon

    André Simon - 2023-01-27
    • status: open --> pending
    • assigned_to: André Simon
     
  • André Simon

    André Simon - 2024-07-06

    You can test --pad-include and --pad-include=nonein 3.5.2. It will be documented in the next major release.

     
  • Blabber BB Blubb

    I tried it with version 3.5.2-x64 and 3.6-x64 and sadly could not get it to work.
    I had the following lines at the beginning of the c file (without the - in front,1st and 3rd line has multiple spaces) and none of them got adapted with either of the options.
    -#include "compile.h"
    -#include<stdarg.h>
    -#include <stdarg.h>
    ...</stdarg.h></stdarg.h>

     

    Last edit: Blabber BB Blubb 2024-08-20
  • André Simon

    André Simon - 2024-08-20

    This is weird, I just tested all builds and it works as intended. Did you add any other options?

     

Log in to post a comment.