|
| void | _stringlistsort2 (void) |
| void | _stringlistsort (void) |
| void | _listbase (void) |
| void | _stringlistsortitem2 (void) |
| void | _stringlistsortitem (void) |
| void | _stringsortdir (void) |
| void | _sortpriorityoffset (void) |
| void | risortlib_libinit (void) |
| void | risortlib_libfinit (void) |
| static void | libinit_c (void) |
| | init: open utility.library (any version).
|
| static void | libfinit_c (void) |
| | finit: close utility.library if init opened it.
|
| static void | sortpriorityoffset_c (UWORD off) |
| | SortPriorityOffset offset: the offset of a long priority in the items' data, compared before the string.
|
| static void | stringsortdir_c (UWORD dir) |
| | StringSortDir direction: the order of the string sorts.
|
| static ULONG | listbase_c (ULONG list) |
| | ListBase(list): the address of a list (the array argument).
|
| static BB_BOOL | dosort (UBYTE *list, UWORD size, WORD off, WORD hdr) |
| | The sort of StringSort/StringSortItem: a selection sort of the items' data from the start item on.
|
| static BB_BOOL | stringlistsort2_c (UBYTE *list, UWORD size) |
| | StringSort list,sizeof.type: sort the list from its first item by the string at offset 0 of the data (see dosort).
|
| static BB_BOOL | stringlistsort_c (UBYTE *list, UWORD size, UWORD off) |
| | StringSort list,sizeof.type,offset: sort the list from its first item by the string at offset of the data (see dosort).
|
| static BB_BOOL | stringlistsortitem2_c (UBYTE *list, UWORD size) |
| | StringSortItem list,sizeof.type: sort the list from its current item by the string at offset 0 of the data (see dosort).
|
| static BB_BOOL | stringlistsortitem_c (UBYTE *list, UWORD size, UWORD off) |
| | StringSortItem list,sizeof.type,offset: sort the list from its current item by the string at offset of the data (see dosort).
|
| BB_BOOL dosort |
( |
UBYTE * | list, |
|
|
UWORD | size, |
|
|
WORD | off, |
|
|
WORD | hdr ) |
|
static |
The sort of StringSort/StringSortItem: a selection sort of the items' data from the start item on.
Each item is compared with all following ones (by the priority if SortPriorityOffset enabled it, then utility.library Stricmp, case-insensitive, in the StringSortDir order) and the data (size bytes) swapped where the order is wrong; after a swap the item in front is compared with its new string and priority (Fixed (#826)). The priority is read only when it is enabled (Fixed (#825)). A size of 0 returns BB_FALSE before anything is swapped (Fixed (#827): the original swapped 65536 bytes).
- Parameters
-
| list | d0: the list ("lIsT" at -4) |
| size | d1: sizeof.type, the bytes swapped |
| off | d5: the offset of the string field (a string pointer) |
| hdr | d6: the list header field of the start item (-28 the first, -32 the current item) |
- Returns
- BB_TRUE when done; BB_FALSE without utility.library, for a size of 0, if it is no list, the start item is 0 or a string pointer is 0 (then stopped where it was)