Skip to content

Commit c5d5f30

Browse files
Joe-DownsJoseph Downs
authored andcommitted
WIP: remove comment function
1 parent 1613149 commit c5d5f30

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

ompi/mpi/bindings/ompi_bindings/c_header.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,6 @@
77

88
categories = {}
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-
4110
for category in consts.categories.values():
4211
name = category["name"]
4312
categories[name] = []

0 commit comments

Comments
 (0)