File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
ompi/mpi/bindings/ompi_bindings Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 77
88categories = {}
99
10- def comment (message , lang = Lang .C , indentation = 0 ):
11- """
12- Take in a message and return a commented version of it.
13- """
14- comment_lines = []
15- width = 80
16- #words = message.split()
17- prefix = ""
18- spaces = (indentation + 1 ) * ' '
19- if lang == Lang .C or lang == Lang .CPP :
20- comment_lines .append (spaces = "/*" )
21- prefix = " *"
22- elif lang == Lang .FORTRAN :
23- prefix = "!"
24-
25- prefix = spaces + prefix + ' '
26- comment_lines .append (textwrap .wrap (message ,
27- width = width ,
28- initial_indent = prefix ,
29- subsequent_indent = prefix ))
30- # for word in words:
31- # line = [prefix]
32- # cols_left = width - len(prefix)
33- # len(word) <= cols_left:
34- # line.append(word)
35- # comment_lines.append()
36-
37- if lang == Lang .C or lang == Lang .CPP :
38- comment_lines .append (spaces + "*/" )
39- return '\n ' .join (comment_lines )
40-
4110for category in consts .categories .values ():
4211 name = category ["name" ]
4312 categories [name ] = []
You can’t perform that action at this time.
0 commit comments