mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-13 09:52:01 -04:00
several fixes and improvements (combat log) - windows
This commit is contained in:
parent
05726326bd
commit
2d7697174d
15 changed files with 332 additions and 158 deletions
|
@ -69,6 +69,18 @@ int str_add(TSTR_LIST *list,const char *text)
|
|||
return i;
|
||||
}
|
||||
|
||||
int str_move_list(TSTR_LIST to, TSTR_LIST from) {
|
||||
int cnt1 = str_count(from);
|
||||
int cnt2 = str_count(to);
|
||||
int cnt = MIN(cnt1,cnt2);
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
if (to[i]) free(to[i]);
|
||||
to[i] = from[i];
|
||||
from[i] = NULL;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
const char *str_insline(TSTR_LIST *list,int before,const char *text)
|
||||
{
|
||||
int i,count,punkt;
|
||||
|
|
|
@ -19,6 +19,7 @@ void str_remove(TSTR_LIST *list,int line);
|
|||
void str_delfreelines(TSTR_LIST *list);
|
||||
int str_count(TSTR_LIST p);
|
||||
void release_list(TSTR_LIST list);
|
||||
int str_move_list(TSTR_LIST to, TSTR_LIST from);
|
||||
TSTR_LIST sort_list(TSTR_LIST list,int direction);
|
||||
TSTR_LIST read_directory(const char *mask,int view_type,int attrs);
|
||||
//void name_conv(const char *c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue