diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-25 00:05:20 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-25 15:14:04 +0200 |
commit | 63bffd83f04b258b547daca67f22423bbdfcd347 (patch) | |
tree | 8beb6b46c75722a6b01f2403c7baf9f6fcf222d5 | |
parent | b8d34e9013e9091f2b3fc7e6c35f9d986126bc95 (diff) |
grepc: Fix glitch with incorrectly indented code
Avoid this glich from glibc:
./sysdeps/unix/sysv/linux/x86/sys/ucontext.h:133:
typedef struct
{
gregset_t __ctx(gregs);
/* Note that fpregs is a pointer. */
fpregset_t __ctx(fpregs);
__extension__ unsigned long long __reserved1 [8];
} mcontext_t;
/* Userlevel context. */
typedef struct ucontext_t
{
unsigned long int __ctx(uc_flags);
struct ucontext_t *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
sigset_t uc_sigmask;
struct _libc_fpstate __fpregs_mem;
__extension__ unsigned long long int __ssp[4];
} ucontext_t;
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-x | bin/grepc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -282,7 +282,7 @@ grepc_type_typedef_struct_union_enum() grepc_helper \ '^[ \t]*typedef\s+(struct|union|enum)\b[^;]*$' \ "^[ \t]*}\s*$1(\[[\w\(,\)]\])*;" \ - '(?s)^[ \t]*typedef\s+(struct|union|enum)\b(?:(?!\W'"$1"'\W)([\w \t[\]]|::))*\n*([ \t]*){(?:(?!^\3}).)*?^\3}\s*'"$1"'(\[[\w\(,\)]\])*;' \ + '(?s)^[ \t]*typedef\s+(struct|union|enum)\b(?:(?!\W'"$1"'\W)([\w \t[\]]|::))*\n*([ \t]*){(?:(?!^\3?}).)*?^\3}\s*'"$1"'(\[[\w\(,\)]\])*;' \ <"$files"; } @@ -341,7 +341,7 @@ grepc_use_func_def() grepc_helper \ "\b$1\b" \ '.' \ - '(?s)^[\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+\**\w+\s*\(([\w\s\(,\)[\]*]|::)+?(\.\.\.)?\)[ \t]*\n*([ \t]*){(?:(?!^\4}).)*'"$1"'.*?^\4}' \ + '(?s)^[\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+\**\w+\s*\(([\w\s\(,\)[\]*]|::)+?(\.\.\.)?\)[ \t]*\n*([ \t]*){(?:(?!^\4?}).)*'"$1"'.*?^\4}' \ <"$files"; } @@ -384,7 +384,7 @@ grepc_use_type_struct_union() grepc_helper \ "\b(struct|union)\b" \ "\b$1\b" \ - '(?s)^(?!^[ \t]*typedef\b)([\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+)?\b(struct|union)\b([\w \t[\]]|::)*\w+\n*([ \t]*){(?:(?!^\5}).)*?'"$1"'.*?^\5}.*?;' \ + '(?s)^(?!^[ \t]*typedef\b)([\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+)?\b(struct|union)\b([\w \t[\]]|::)*\w+\n*([ \t]*){(?:(?!^\5?}).)*?'"$1"'.*?^\5}.*?;' \ <"$files"; } @@ -404,7 +404,7 @@ grepc_use_type_typedef_struct_union() grepc_helper \ '^[ \t]*typedef\s+(struct|union)\b[^;]*$' \ "\b$1\b" \ - '(?s)^[ \t]*typedef\s+(struct|union)\b([\w \t[\]]|::)*\n*([ \t]*){(?:(?!^\3}|^\s*typedef).)*'"$1"'(?:(?!^\3}|^\s*typedef).)*^\3}\s*\w+;' \ + '(?s)^[ \t]*typedef\s+(struct|union)\b([\w \t[\]]|::)*\n*([ \t]*){(?:(?!^\3?}|^\s*typedef).)*'"$1"'(?:(?!^\3?}|^\s*typedef).)*^\3}\s*\w+;' \ <"$files"; } |