Fix value of MG_MQTT_DUP

PUBLISHED_FROM=de1772bd6ea01f3dc467ceebb3b2af5cbe8eb240
This commit is contained in:
Deomid "rojer" Ryabkov authored and Cesanta Bot committed 2020-01-20 09:33:25 +00:00
1 parent 70dc6d8dc9
commit bc15e9ce9a
6 files changed
+64 -1099

No files matched your search

+21
View File
@@ -59,6 +59,7 @@ parser.add_argument('--exportable-headers', dest="export", action='store_true',
help='allow exporting internal headers')
parser.add_argument('-I', default=['.'], dest='include_path', help='include path', action='append')
parser.add_argument('sources', nargs='*', help='sources')
parser.add_argument('--license', dest="license", help='License file')
class File(object):
def __init__(self, name, parent_name):
@@ -121,7 +122,22 @@ def emit_body(out, name, parent_name):
return
with open(resolved_name) as f:
in_comment = False
comment = ''
for l in f:
if in_comment:
comment += l
if re.match('\s*\*/$', l):
in_comment = False
if not re.match('.*Copyright.*Cesanta', comment, re.M | re.S):
print >>out, comment,
continue
if re.match('/\*$', l):
in_comment = True
comment = l
continue
match = re.match('( *#include "(.*)")', l)
if match:
all, path_to_include = match.groups()
@@ -155,6 +171,11 @@ if sys.platform == "win32":
import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
if args.license:
with open(args.license) as f:
print f.read()
if args.public:
print '#include "%s"' % (args.public)