mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-16 18:28:42 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
fd97920115
|
|
@ -15,8 +15,10 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
namespace Stdlib {
|
namespace Stdlib
|
||||||
namespace HashTable {
|
{
|
||||||
|
namespace HashTable
|
||||||
|
{
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *key;
|
const char *key;
|
||||||
void *value;
|
void *value;
|
||||||
|
|
@ -213,7 +215,7 @@ namespace Stdlib {
|
||||||
|
|
||||||
free(table->entries);
|
free(table->entries);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -13,8 +13,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils
|
||||||
namespace ArraySort {
|
{
|
||||||
|
namespace ArraySort
|
||||||
|
{
|
||||||
inline
|
inline
|
||||||
void reverse_int(int *arr, int size)
|
void reverse_int(int *arr, int size)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ namespace Utils {
|
||||||
inline
|
inline
|
||||||
char *search_replace(const char *haystack, const char *needle, const char *replace)
|
char *search_replace(const char *haystack, const char *needle, const char *replace)
|
||||||
{
|
{
|
||||||
const char* haystackT = haystack;
|
const char *haystackT = haystack;
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
size_t match = 0;
|
size_t match = 0;
|
||||||
|
|
@ -83,7 +83,7 @@ namespace Utils {
|
||||||
int size;
|
int size;
|
||||||
} text_diff;
|
} text_diff;
|
||||||
|
|
||||||
text_diff computeLCSDiff (char **from, int fromSize, char **to, int toSize)
|
text_diff computeLCSDiff(char **from, int fromSize, char **to, int toSize)
|
||||||
{
|
{
|
||||||
char **diffValues = (char **) malloc(fromSize * toSize * sizeof(char *));
|
char **diffValues = (char **) malloc(fromSize * toSize * sizeof(char *));
|
||||||
int *diffMasks = (int *) calloc(fromSize * toSize, sizeof(int));
|
int *diffMasks = (int *) calloc(fromSize * toSize, sizeof(int));
|
||||||
|
|
@ -210,7 +210,7 @@ namespace Utils {
|
||||||
ArraySort::reverse_char(diffValues, diffIndex);
|
ArraySort::reverse_char(diffValues, diffIndex);
|
||||||
ArraySort::reverse_int(diffMasks, diffIndex);
|
ArraySort::reverse_int(diffMasks, diffIndex);
|
||||||
|
|
||||||
return text_diff { diffValues, diffMasks, diffIndex };
|
return text_diff{diffValues, diffMasks, diffIndex};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user