listutil.c
来自「NIST Handwriting OCR Testbed」· C语言 代码 · 共 33 行
C
33 行
/*# proc: remove_from_list - removes an integer from the given list by shifting# proc: down all integers following the point of removal.# proc: remove_item - removes corresponding items from three lists of integers# proc: by shifting down all subsequent integers in the lists.*/#include <stdio.h>#include <maxlist.h>/************************************************************************/remove_from_list(i, li, end)int i, *li, end;{ int tlist[MAX_INDEX], cplen; if(i >= end) fatalerr("remove_from_list", "index off end of list", NULL); cplen = (end - i - 1) * sizeof(int); memcpy(tlist, li+i+1, cplen); memcpy(li+i, tlist, cplen);}/************************************************************************/remove_item(i, li, lx, ly, end)int i, *li, *lx, *ly, *end;{ remove_from_list(i, lx, (*end)); remove_from_list(i, ly, (*end)); remove_from_list(i, li, (*end)); (*end)--;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?