diff -Nru herbstluftwm-0.9.2/AUTHORS herbstluftwm-0.9.3/AUTHORS --- herbstluftwm-0.9.2/AUTHORS 2021-02-17 11:20:05.000000000 +0000 +++ herbstluftwm-0.9.3/AUTHORS 2021-05-15 11:47:19.000000000 +0000 @@ -16,13 +16,15 @@ Simon Ruderich Gabor Adam Toth Manuel +Florian Schmaus Bohdan Potměkleč Johannes Schilling -Florian Schmaus johnLate Campbell Barton Christian Dietrich Bernhard M. Wiedemann +tiosgz +apm256 Wesley Merkel Steffen Liebergeld Manuel Coenen @@ -32,7 +34,6 @@ sarthon johannes ctx -apm256 Victor Nakoryakov Sander van Rossem Philipp Erhardt diff -Nru herbstluftwm-0.9.2/ci/build.py herbstluftwm-0.9.3/ci/build.py --- herbstluftwm-0.9.2/ci/build.py 2021-02-17 11:20:05.000000000 +0000 +++ herbstluftwm-0.9.3/ci/build.py 2021-05-15 11:47:19.000000000 +0000 @@ -143,7 +143,7 @@ # First, run only the tests that are NOT marked to be excluded from code # coverage collection. - tox('-e py38 -- -n auto --cache-clear -v -x -m "not exclude_from_coverage"', build_dir) + tox('-- -n auto --cache-clear -v -x -m "not exclude_from_coverage"', build_dir) # Create the code coverage report: sp.check_call('lcov --capture --directory . --output-file coverage.info', shell=True, cwd=build_dir) @@ -152,4 +152,4 @@ (build_dir / 'coverage.info').rename(repo / 'coverage.info') # Run the tests that have been skipped before (without clearing the pytest cache this time): - tox('-e py38 -- -n auto -v -x -m exclude_from_coverage', build_dir) + tox('-- -n auto -v -x -m exclude_from_coverage', build_dir) diff -Nru herbstluftwm-0.9.2/ci/check-using-std.sh herbstluftwm-0.9.3/ci/check-using-std.sh --- herbstluftwm-0.9.2/ci/check-using-std.sh 2021-02-17 11:20:05.000000000 +0000 +++ herbstluftwm-0.9.3/ci/check-using-std.sh 2021-05-15 11:47:19.000000000 +0000 @@ -25,7 +25,7 @@ # set -x for symbol in $usethis; do # Find offending occurrences of "std::" prefixes: - grep --perl-regexp --color=auto '(? Tue, 12 Oct 2021 21:17:29 +0200 + +herbstluftwm (0.9.3-1) experimental; urgency=medium + + * New upstream release + + -- Christoph Egger Sun, 16 May 2021 17:34:27 +0200 + herbstluftwm (0.9.2-1) unstable; urgency=medium * New upstream release diff -Nru herbstluftwm-0.9.2/doc/CMakeLists.txt herbstluftwm-0.9.3/doc/CMakeLists.txt --- herbstluftwm-0.9.2/doc/CMakeLists.txt 2021-02-17 11:20:05.000000000 +0000 +++ herbstluftwm-0.9.3/doc/CMakeLists.txt 2021-05-15 11:47:19.000000000 +0000 @@ -84,7 +84,7 @@ -a \"builddir=${CMAKE_CURRENT_BINARY_DIR}\" --destination-dir="${CMAKE_CURRENT_BINARY_DIR}" ${src} - DEPENDS ${ARGN} + DEPENDS ${src} ${ARGN} ) endif() install(FILES ${dst} DESTINATION "${MANDIR}/man${man_nr}") @@ -120,7 +120,7 @@ DEPENDS ${src} ${ARGN} ) endif() - install(FILES ${dst} DESTINATION ${DOCDIR}) + install(FILES ${dst} DESTINATION "${DOCDIR}/html") endfunction() diff -Nru herbstluftwm-0.9.2/doc/format-doc.py herbstluftwm-0.9.3/doc/format-doc.py --- herbstluftwm-0.9.2/doc/format-doc.py 2021-02-17 11:20:05.000000000 +0000 +++ herbstluftwm-0.9.3/doc/format-doc.py 2021-05-15 11:47:19.000000000 +0000 @@ -12,6 +12,22 @@ return len(string) +def cpp_source_doc_to_asciidoc(src): + """the doc in the cpp source sometimes can not be fully + asciidoc compatible because it is also used for plain-text + documentation in the 'help' command. + + Thus, this function adds some more escape sequences to avoid + unintended asciidoc markup + """ + # prevent any formatting within a single-quoted string. + src = re.sub(r"'([^']*[^\\])'", r"'+++\1+++'", src) + + # indent any nested bullet items correctly + src = re.sub('\n \\*', '\n **', src) + return src + + def multiline_for_bulletitem(src): """requote a multiline asciidoc doc such that it can be put in the item of a bullet list""" @@ -148,10 +164,11 @@ objdoc = self.jsondoc['objects'][clsname] print(f'[[{identifier}]]', end='' if depth > 1 else '\n') if 'doc' in objdoc: + doc_txt = cpp_source_doc_to_asciidoc(objdoc['doc']) if depth > 1: - print(multiline_for_bulletitem(objdoc['doc'])) + print(multiline_for_bulletitem(doc_txt)) else: - print(objdoc['doc']) + print(doc_txt) print('') if path == []: bulletprefix = '' @@ -165,14 +182,15 @@ else: default_val = '' if attr.get('doc', None) is not None: - docstr = ': ' + attr.get('doc', None) + docstr = ': ' + cpp_source_doc_to_asciidoc(attr['doc']) else: docstr = '' # add multiple formats to the entry name such that the colors work # both in html and in the man page output print(f"{ws_prefix}{bulletprefix}* '[datatype]#{attr['type']}#' *+[entryname]#{attr['name']}#+*{default_val}{docstr}") for _, child in objdoc['children'].items(): - docstr = child['doc'].strip() if 'doc' in child else '' + docstr = cpp_source_doc_to_asciidoc(child['doc'].strip()) \ + if 'doc' in child else '' # class_doc = self.jsondoc['objects'][child['type']].get('doc', '') if len(docstr) > 0: if not docstr.endswith('.'): @@ -181,7 +199,10 @@ if depth > 0: # add multiple format indicators, as for the # attribute name above - itemname = f"*+[entryname]#{child['name']}#+*" + if child['name'] is not None: + itemname = f"*+[entryname]#{child['name']}#+*" + else: + itemname = f"'[entryname]#{child['name_pattern']}#'" bullet = '*' else: itemname = f"{child['name']}" diff -Nru herbstluftwm-0.9.2/doc/gendoc.py herbstluftwm-0.9.3/doc/gendoc.py --- herbstluftwm-0.9.2/doc/gendoc.py 2021-02-17 11:20:05.000000000 +0000 +++ herbstluftwm-0.9.3/doc/gendoc.py 2021-05-15 11:47:19.000000000 +0000 @@ -23,6 +23,10 @@ def extract_file_tokens(filepath): + """ + Tokenize a C++ file and 'yield' its tokens. For correct + line number computation, this also includes comments. + """ # in the following, it's important to use # non-capturing groups (?: .... ) token_types = [ @@ -51,6 +55,14 @@ yield t +def strip_comment_tokens(tokens): + for t in tokens: + if t.startswith('//') or t.startswith('/*'): + continue + else: + yield t + + def pretty_print_token_list(tokens, indent=' '): """print all the tokens and auto-indent based on { }""" number_nested_braces = 0 @@ -235,7 +247,11 @@ if t == self.pos: nextline += '^ here' else: - nextline += ' ' * len(self.tokens[t]) + if isinstance(self.tokens[t], list): + length = len(self.tokens[t]) + else: + length = len(str(self.tokens[t])) + nextline += ' ' * length text += '\n' + nextline if msg != '': text += "\n'{}'".format(msg) @@ -381,6 +397,9 @@ def set_default_value(self, cpp_token): if TokenGroup.IsTokenGroup(cpp_token): # drop surrounding '{' ... '}' if its an initializer list + if len(cpp_token.enclosed_tokens) == 0: + cpp_token = None + return cpp_token = cpp_token.enclosed_tokens[0] if cpp_token[0:1] == ['-']: # this is most probably a signed number @@ -390,6 +409,8 @@ # assume that the next token in the list 'cpp_token' is a # token group cpp_token = cpp_token[4].enclosed_tokens[0] + if cpp_token[0:3] == ['LayoutAlgorithm', ':', ':']: + cpp_token = cpp_token[3] if cpp_token == 'WINDOW_MANAGER_NAME': cpp_token = 'herbstluftwm' if cpp_token[0:1] == '"': @@ -401,6 +422,7 @@ def __init__(self, cpp_name): self.cpp_name = cpp_name self.user_name = None # what the user sees + self.user_name_pattern = None # if no concrete user_name can be given self.child_class = None # whether this is a Link_ or a Child_ self.type = None # the template argument to Link_ or Child_ self.constructor_args = None @@ -450,6 +472,10 @@ if clsname == 'Settings': attr.writable = True + child_info = self.child_info('PanelManager', '0xWindowID') + child_info.user_name_pattern = '0xWindowID' + child_info.type = ClassName('Panel') + def attribute_info(self, classname: str, attr_cpp_name: str): """return the AttributeInformation object for a for a class and its attribute whose C++ variable name is @@ -577,6 +603,8 @@ 'type': member.type.to_user_type_name(), 'class': member.child_class, } + if member.user_name_pattern is not None: + obj['name_pattern'] = member.user_name_pattern if member.doc is not None: obj['doc'] = member.doc children[member.user_name] = obj @@ -622,9 +650,14 @@ name = arg.value if stream.try_match('<'): tok = stream.pop('expected template argument') + if stream.try_match('*'): + tok += '*' tmpl_args.append(tok) while stream.try_match(','): - tmpl_args.append(stream.pop('expected template argument')) + tok = stream.pop('expected template argument') + if stream.try_match('*'): + tok += '*' + tmpl_args.append(tok) stream.assert_match('>', msg='expecting > after last template argument') return ClassName(name, type_modifier=type_modifier, @@ -806,7 +839,7 @@ objInfo = ObjectInformation() for f in files(): # print("parsing file {}".format(f), file=sys.stderr) - toks = [t for t in extract_file_tokens(f) if t.strip() != ''] + toks = [t for t in strip_comment_tokens(extract_file_tokens(f)) if t.strip() != ''] toktree = list(build_token_tree_list(TokenStream(toks))) extractor = TokTreeInfoExtrator(objInfo) extractor.main(list(toktree)) diff -Nru herbstluftwm-0.9.2/doc/herbstclient.1 herbstluftwm-0.9.3/doc/herbstclient.1 --- herbstluftwm-0.9.2/doc/herbstclient.1 2021-02-17 11:24:03.000000000 +0000 +++ herbstluftwm-0.9.3/doc/herbstclient.1 2021-05-15 11:42:20.000000000 +0000 @@ -2,12 +2,12 @@ .\" Title: herbstclient .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 2021-02-17 +.\" Date: 2021-05-15 .\" Manual: \ \& -.\" Source: \ \& herbstluftwm 0.9.2 +.\" Source: \ \& herbstluftwm 0.9.3 .\" Language: English .\" -.TH "HERBSTCLIENT" "1" "2021\-02\-17" "\ \& herbstluftwm 0\&.9\&.2" "\ \&" +.TH "HERBSTCLIENT" "1" "2021\-05\-15" "\ \& herbstluftwm 0\&.9\&.3" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -Nru herbstluftwm-0.9.2/doc/herbstclient.html herbstluftwm-0.9.3/doc/herbstclient.html --- herbstluftwm-0.9.2/doc/herbstclient.html 2021-02-17 11:24:04.000000000 +0000 +++ herbstluftwm-0.9.3/doc/herbstclient.html 2021-05-15 11:42:22.000000000 +0000 @@ -4,7 +4,7 @@ - + herbstclient(1)