(file, options)
| 171 | filecount = 0 |
| 172 | |
| 173 | def doFile(file, options): |
| 174 | global formatstr |
| 175 | global filecount |
| 176 | if options.syntax: |
| 177 | if options.syntax == 'S': |
| 178 | count = doShFile(file) |
| 179 | elif options.syntax == 'C': |
| 180 | count = doCFile(file) |
| 181 | elif options.syntax == 'M': |
| 182 | count = doMFile(file) |
| 183 | else: |
| 184 | ext = getExt(file) |
| 185 | count = 0 |
| 186 | if ext in sh_exts: |
| 187 | count = doShFile(file) |
| 188 | elif ext in c_exts: |
| 189 | count = doCFile(file) |
| 190 | elif ext in m_exts: |
| 191 | count = doMFile(file) |
| 192 | |
| 193 | print formatstr.format(file, count) |
| 194 | filecount += 1 |
| 195 | return count |
| 196 | |
| 197 | |
| 198 | def doDir(dir, options): |