mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2923: EBCDIC build is broken
Problem: EBCDIC build is broken. Solution: Move sortFunctions() to evalfunc.c. (Ken Takata, closes #8306)
This commit is contained in:
27
src/eval.c
27
src/eval.c
@@ -104,33 +104,6 @@ num_modulus(varnumber_T n1, varnumber_T n2, int *failed)
|
||||
return (n2 == 0) ? 0 : (n1 % n2);
|
||||
}
|
||||
|
||||
#if defined(EBCDIC) || defined(PROTO)
|
||||
/*
|
||||
* Compare struct fst by function name.
|
||||
*/
|
||||
static int
|
||||
compare_func_name(const void *s1, const void *s2)
|
||||
{
|
||||
struct fst *p1 = (struct fst *)s1;
|
||||
struct fst *p2 = (struct fst *)s2;
|
||||
|
||||
return STRCMP(p1->f_name, p2->f_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sort the function table by function name.
|
||||
* The sorting of the table above is ASCII dependent.
|
||||
* On machines using EBCDIC we have to sort it.
|
||||
*/
|
||||
static void
|
||||
sortFunctions(void)
|
||||
{
|
||||
int funcCnt = (int)ARRAY_LENGTH(functions) - 1;
|
||||
|
||||
qsort(functions, (size_t)funcCnt, sizeof(struct fst), compare_func_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize the global and v: variables.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user