📄 list.h
字号:
/* * Fast list methods * Feb 2000 --Jcid * *//* * a_List_add() * * Make sure there's space for another item within the list * (First, allocate an 'alloc_step' sized chunk, after that, double the * list size --to make it faster) */#define a_List_add(list,num_items,item_size,alloc_step) \ if ( !list ) { \ list = g_malloc(alloc_step * item_size); \ num_items = 0; \ } \ if ( num_items == alloc_step ){ \ alloc_step <<= 1; \ list = g_realloc(list, alloc_step * item_size); \ }/* * a_List_remove() * * Quickly remove an item from the list * ==> We preserve relative position, but not the element index <== */#define a_List_remove(list, item, num_items) \ if ( list && item < num_items ) { \ list[item] = list[--num_items]; \ }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -