Example #1
0
int run(int argc,char *argv[])
{
	char  *_IN_PATH, *_OUT_PATH;

	RAW_CSV raw_data;
	STS sts;

	// Lay du lieu dua vao chuong trinh
	int error = initProgram(argc, argv, raw_data, sts, _IN_PATH, _OUT_PATH);
	if (error == 1) {
		printf("Thong tin nhap vao khong hop le!\nDung lenh 'buildinfo -h' de xem huong dan\n");
		return error;
	} else if (error == 2) {
		printf("Qua trinh nap du lieu that bai! Vui long kiem tra lai thong tin nhap vao...\n");
		return error;
	}
	
	log("buildinfo", "Chuan bi tao file 'index.html'...");
	createIndex(sts, _OUT_PATH);
	log("buildinfo", "Da tao file 'index.html' thanh cong...");

	log("buildinfo", "Chuan bi xuat file thong tin cac sinh vien...");
	createSVS(sts, _OUT_PATH);
	log("buildinfo", "Qua trinh hoan tat...");

	// Giai phong du lieu tho
	freeST(sts);
	freeCSV(raw_data);
	return 0;
}
Example #2
0
int cutPoly3 (struct Plex *plex)
{
	if (!initEST (plex)) return (0);
	if (!initPST (plex)) return (0);
	if (!cutST (plex)) return (0);
	if (!finishST (plex)) return (0);
	if (!fetchST (plex)) return (0);
	if (!freeST (plex)) return (0);
	return (1);
}