2014-git-work/cpp/aimaina/aimaina.c

31 lines
537 B
C
Raw Normal View History

2012-08-28 23:07:07 +09:00
/*
aimaina.c
(C)2012 B11T3074C, B11T3011K - MIT License
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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;
}