FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
diff.h
1 /*
2 Author: Daniele Fognini, Andreas Wuerl
3 Copyright (C) 2013-2014, Siemens AG
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 version 2 as published by the Free Software Foundation.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef MONK_AGENT_DIFF_H
20 #define MONK_AGENT_DIFF_H
21 
22 #include "string_operations.h"
23 #include "monk.h"
24 
25 typedef struct {
26  size_t start;
27  size_t length;
28 } DiffPoint;
29 
30 typedef struct {
31  DiffPoint text;
33  char* diffType;
35 
36 typedef struct {
37  size_t matched;
38  size_t added;
39  size_t removed;
40  GArray* matchedInfo;
41  double rank;
42  unsigned short percentual;
43 } DiffResult;
44 
45 int lookForDiff(const GArray* textTokens, const GArray* searchTokens,
46  size_t iText, size_t iSearch,
47  unsigned int maxAllowedDiff, unsigned int minAdjacentMatches,
48  DiffMatchInfo* result);
49 
50 int matchNTokens(const GArray* textTokens, size_t textStart, size_t textLength,
51  const GArray* searchTokens, size_t searchStart, size_t searchLength,
52  unsigned int numberOfWantedMatches);
53 
54 DiffResult* findMatchAsDiffs(const GArray* textTokens, const GArray* searchTokens,
55  size_t textStartPosition, size_t searchStartPosition,
56  unsigned int maxAllowedDiff, unsigned int minAdjacentMatches);
57 
58 void diffResult_free(DiffResult* diffResult);
59 
60 #endif // MONK_AGENT_DIFF_H
Definition: diff.h:25
start($application)
start the application Assumes application is restartable via /etc/init.d/<script>. The application passed in should match the script name in /etc/init.d
Definition: pkgConfig.php:1225