Chromium Code Reviews| Index: ppapi/generators/idl_c_header.py |
| diff --git a/ppapi/generators/idl_c_header.py b/ppapi/generators/idl_c_header.py |
| index 7813b0b7895f7ec44d224390c59478fe541d4f56..99c85585ba3e80e002042e5b4598fef9353a96b0 100644 |
| --- a/ppapi/generators/idl_c_header.py |
| +++ b/ppapi/generators/idl_c_header.py |
| @@ -130,9 +130,17 @@ class HGen(GeneratorByFile): |
| assert(fileinfo.IsA('Comment')) |
| out.Write('%s\n' % cgen.Copyright(cright_node)) |
| - out.Write('/* From %s modified %s. */\n\n'% ( |
| - filenode.GetProperty('NAME').replace(os.sep,'/'), |
| - filenode.GetProperty('DATETIME'))) |
| + |
| + # Wrap the From ... modified ... comment if it would be >80 characters. |
| + from_text = '/* From %s' % ( |
| + filenode.GetProperty('NAME').replace(os.sep,'/')) |
| + modified_text = 'modified %s. */' % ( |
| + filenode.GetProperty('DATETIME')) |
| + if len(from_text) + len(modified_text) < 80: |
| + out.Write('%s %s\n\n' % (from_text, modified_text)) |
| + else: |
| + out.Write('%s,\n * %s\n\n' % (from_text, modified_text)) |
|
dmichael (off chromium)
2012/01/04 16:42:25
So this won't handle if the first part (the file n
|
| + |
| out.Write('#ifndef %s\n#define %s\n\n' % (def_guard, def_guard)) |
| # Generate set of includes |