list.p1
来自「linux下的C语言开发」· P1 代码 · 共 23 行
P1
23 行
void enter(struct item *first_ptr, const int value){ struct item *before_ptr; /* Item before this one */ struct item *after_ptr; /* Item after this one */ struct item *new_item_ptr; /* Item to add */ /* Create new item to add to the list */ before_ptr = first_ptr; /* Start at the beginning */ after_ptr = before_ptr->next_ptr; while (1) { if (after_ptr == NULL) break; if (after_ptr->value >= value) break; /* Advance the pointers */ after_ptr = after_ptr->next_ptr; before_ptr = before_ptr->next_ptr; }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?