write
fp = fopen("config", "w+");
sprintf(tmp, "nwa: %d\n", global_rzone.nwa);
fputs(tmp, fp);
fclose(fp);
read
//get config file
fp = fopen("config", "r");
if (fp)
{
//read config
fgets(tmp, fp);
sscanf(tmp, "%*s %d", &nwa);
global_rzone.nwa = nwa;
}
stat
ret = stat(file, &buf);
if (buf.st_size == 0)
{
printf("DVD test file:%s error!\n", argv[1]);
return 0;
}
阅读(1073) | 评论(0) | 转发(0) |