/* Resume input from clients - Flow control all clients back on */ static void logd_resume_clients(IPC_Channel* notused1, gpointer notused2) { GList * gl; stop_reading = FALSE; for (gl=g_list_first(logd_client_list); gl != NULL ; gl = g_list_next(gl)) { ha_logd_client_t* client = gl->data; if (client && client->g_src) { G_main_IPC_Channel_resume(client->g_src); }else if (client) { cl_log(LOG_ERR, "Could not resume client [%s] pid %d" , nullchk(client->app_name), client->pid); }else{ cl_log(LOG_ERR, "%s: Could not suspend NULL client", __FUNCTION__); } } }
int main() { int ch; struct student *head=NULL; printf("\n\n\n\n\n\n\n\n\n\t\t\t学生信息管理系统\t\t\n\n\n\t\t\t15080120 郭都豪\t\t\n\n\t\t\t2015.12.24\t\t\n\t\t\tVersion 1.0\t\t\n\n\n\n\n"); system("pause"); while (1) { system("cls"); printf("链表头的地址:%p\n\n\n\n\t\t\t(1)Create a student list; \n\t\t\t(2)Sort according to the StudentID;\n\t\t\t(3)Insert a student;\n\t\t\t(4)Delete a student;\n\t\t\t(5)Update a student Info;\n\t\t\t(6)Search a student ;\n\t\t\t(7)Display all students;\n\t\t\t(8)Save to the file;\n\t\t\t(9)Open the file;\n\t\t\t(10)exit\n",head); scanf("%d",&ch); switch(ch) { case 1: system("cls"); head = create(head);//创建一个学生列表 break; case 2: system("cls"); if (nullchk(head)) break; head = sort(head);//排序 printf("排序完成\n"); system("pause"); break; case 3: system("cls"); if (nullchk(head)) break; head = insert(head);//插入 break; case 4: system("cls"); if (nullchk(head)) break; head = rm(head);//移除 break; case 5: system("cls"); if (nullchk(head)) break; update(head);//更新。 break; case 6: system("cls"); if (nullchk(head)) break; search(head); break; case 7: system("cls"); if (nullchk(head)) break; display(head); system("pause"); break; case 8: system("cls"); if (nullchk(head)) break; out(head); break; case 9: system("cls"); head = in(head); break; case 10: release(head);//释放整个链表 return 0; } } }