mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Let ede_strverscmp() be linked correctly
This commit is contained in:
parent
9f8409e863
commit
8901c59050
@ -39,7 +39,7 @@
|
|||||||
equal to or greater than S2 (for more info, see the texinfo doc).
|
equal to or greater than S2 (for more info, see the texinfo doc).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int ede_strverscmp (const char *s1, const char *s2)
|
int ede_strverscmp (const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
const unsigned char *p1 = (const unsigned char *) s1;
|
const unsigned char *p1 = (const unsigned char *) s1;
|
||||||
const unsigned char *p2 = (const unsigned char *) s2;
|
const unsigned char *p2 = (const unsigned char *) s2;
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
#ifndef EDE_STRVERSCMP_H
|
#ifndef EDE_STRVERSCMP_H
|
||||||
#define EDE_STRVERSCMP_H
|
#define EDE_STRVERSCMP_H
|
||||||
|
|
||||||
extern int ede_strverscmp (const char *, const char *);
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int ede_strverscmp (const char *, const char *);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#include "fileops.h" // file operations
|
#include "fileops.h" // file operations
|
||||||
#include "filesystem.h" // filesystem support
|
#include "filesystem.h" // filesystem support
|
||||||
//#include "ede_strverscmp.h" // local copy of strverscmp
|
#include "ede_strverscmp.h" // local copy of strverscmp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ char *simpleopener(const char* mimetype) {
|
|||||||
int ede_versionsort(const void *a, const void *b) {
|
int ede_versionsort(const void *a, const void *b) {
|
||||||
struct dirent** ka = (struct dirent**)a;
|
struct dirent** ka = (struct dirent**)a;
|
||||||
struct dirent** kb = (struct dirent**)b;
|
struct dirent** kb = (struct dirent**)b;
|
||||||
return strverscmp((*ka)->d_name,(*kb)->d_name);
|
return ede_strverscmp((*ka)->d_name,(*kb)->d_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modification of versionsort which ignores case
|
// Modification of versionsort which ignores case
|
||||||
@ -245,7 +245,7 @@ int ede_versioncasesort(const void *a, const void *b) {
|
|||||||
char* ma = strdup((*ka)->d_name);
|
char* ma = strdup((*ka)->d_name);
|
||||||
char* mb = strdup((*kb)->d_name);
|
char* mb = strdup((*kb)->d_name);
|
||||||
edelib::str_tolower((unsigned char*)ma); edelib::str_tolower((unsigned char*)mb);
|
edelib::str_tolower((unsigned char*)ma); edelib::str_tolower((unsigned char*)mb);
|
||||||
int k = strverscmp(ma,mb);
|
int k = ede_strverscmp(ma,mb);
|
||||||
free(ma); free(mb);
|
free(ma); free(mb);
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user