tools/bundle: require include guards to end with '_H_'

This commit is contained in:
Bert Belder 2019-06-24 15:49:06 +02:00
parent d272c5188d
commit bb6c522d8f
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461

View File

@ -44,7 +44,7 @@ function readFileWithPath(fileName, dirs) {
function strip_guards(filename, source) {
const lead_comments_re = /^(\s*\/\*((?!\*\/)[\s\S])*\*\/)*\s*/;
const trail_comments_re = /(\s*\/\*((?!\*\/)[\s\S])*\*\/)*\s*$/;
const lead_guards_re = /^#ifndef\s+(\w+)\s+#define\s+(\w+)\s+/;
const lead_guards_re = /^#ifndef\s+(\w+_H_)\s+#define\s+(\w+_H_)\s+/;
const trail_guards_re = /#endif$/;
// Strip leading and trailing comments and whitespace.