style.py (6021:6df0633d883b) style.py (6825:104115ebc206)
1#! /usr/bin/env python
2# Copyright (c) 2006 The Regents of The University of Michigan
3# Copyright (c) 2007 The Hewlett-Packard Development Company
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 51 unchanged lines hidden (view full) ---

60whitespace_types = ('C', 'C++', 'swig', 'python', 'asm', 'isa')
61def whitespace_file(filename):
62 if file_type(filename) in whitespace_types:
63 return True
64
65 if filename.startswith("SCons"):
66 return True
67
1#! /usr/bin/env python
2# Copyright (c) 2006 The Regents of The University of Michigan
3# Copyright (c) 2007 The Hewlett-Packard Development Company
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 51 unchanged lines hidden (view full) ---

60whitespace_types = ('C', 'C++', 'swig', 'python', 'asm', 'isa')
61def whitespace_file(filename):
62 if file_type(filename) in whitespace_types:
63 return True
64
65 if filename.startswith("SCons"):
66 return True
67
68 return False
68 return True
69
70format_types = ( 'C', 'C++' )
71def format_file(filename):
72 if file_type(filename) in format_types:
73 return True
74
75 return False
76
77def checkwhite_line(line):
78 match = lead.search(line)
79 if match and match.group(1).find('\t') != -1:
69
70format_types = ( 'C', 'C++' )
71def format_file(filename):
72 if file_type(filename) in format_types:
73 return True
74
75 return False
76
77def checkwhite_line(line):
78 match = lead.search(line)
79 if match and match.group(1).find('\t') != -1:
80 return False
80 return True
81
82 match = trail.search(line)
83 if match:
81
82 match = trail.search(line)
83 if match:
84 return False
84 return True
85
86 return True
87
88def checkwhite(filename):
89 if not whitespace_file(filename):
90 return
91
92 try:

--- 358 unchanged lines hidden ---
85
86 return True
87
88def checkwhite(filename):
89 if not whitespace_file(filename):
90 return
91
92 try:

--- 358 unchanged lines hidden ---