Consider following piece of code:
#include <stdio.h>
#define FMT1 "d"
#define FMTD "d"
#define FMTR "d"
int
main () {
int a, b, p1;
printf ("0x%"FMT1"\n", (int) p1);
a = b;
printf ("0x%"FMTD"\n", (int) p1);
a = b;
printf ("0x%"FMTR"\n", (int) p1);
a = b;
return 0;
}
int foo () {
}
I ran astye as follows:
% astyle --version
Artistic Style Version 3.1
% astyle --style=allman --break-blocks --pad-oper --pad-paren-out --pad-header --unpad-paren --align-pointer=middle --add-brackets --convert-tabs --break-return-type --options=none test.c
#include <stdio.h>
#define FMT1 "d"
#define FMTD "d"
#define FMTR "d"
int
main ()
{
int a, b, p1;
printf ("0x%"FMT1"\n", (int) p1);
a = b;
printf ("0x%"FMTD"\n", (int) p1);
a = b;
printf ("0x%"FMTR"\n", (int) p1);
a = b;
return 0;
}
int foo () {
}
The lines till last printf are formatted properly.
But, the last printf is causing the code below it to be unformatted.
Please fix it.
Regards,
Sulabh
This issue was resolved in the latest 3.2 beta release.