-
Notifications
You must be signed in to change notification settings - Fork 0
/
counters.h
41 lines (35 loc) · 1.27 KB
/
counters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-License-Identifier: GPL-2.0+
/*
* Fast Lines of Code Counter
*
* Copyright (C) 2021 SUSE
*
* Author: Jörg Rödel <[email protected]>
*/
#ifndef __COUNTERS_H
#define __COUNTERS_H
#include <string>
#include <cstdint>
#include "classifier.h"
struct file_result {
uint32_t code;
uint32_t comment;
uint32_t whitespace;
bool duplicate;
file_type type;
std::string name;
file_result(std::string n);
};
void count_c(struct file_result &r, const char *buffer, size_t size);
void count_asm(struct file_result &r, const char *buffer, size_t size);
void count_python(struct file_result &r, const char *buffer, size_t size);
void count_perl(struct file_result &r, const char *buffer, size_t size);
void count_xml(struct file_result &r, const char *buffer, size_t size);
void count_shell(struct file_result &r, const char *buffer, size_t size);
void count_latex(struct file_result &r, const char *buffer, size_t size);
void count_text(struct file_result &r, const char *buffer, size_t size);
void count_asn1(struct file_result &r, const char *buffer, size_t size);
void count_rust(struct file_result &r, const char *buffer, size_t size);
void count_css(struct file_result &r, const char *buffer, size_t size);
void count_ruby(struct file_result &r, const char *buffer, size_t size);
#endif