/* aimaina.c 蔵書管理プログラム (C)2012 B11T3074C, B11T3011K - MIT License */ #include #include #include #include "util.h" #include "book.h" int main(){ char buff[1024]; openlist("booklist.csv"); for(;;){ printf("追加[a] 検索[s] 終了[q] "); input_line(buff, 1024); strtolower(buff); if(strcmp(buff, "a") == 0){ regist_data(); }else if(strcmp(buff, "s") == 0){ search(); }else if(strcmp(buff, "q") == 0){ savelist("booklist.csv"); exit(0); } } return 0; }