stdio文件常用函数
{
char *s;
char drive[MAXDRIVE];
char dir[MAXDIR];
char file[MAXFILE];
char ext[MAXEXT];
int flags;
s=getenv("COMSPEC");
flags=fnsplit(s,drive,dir,file,ext);
printf("Command processor info:");
if(flags&DRIVE)
printf("\tdrive: %s",drive);
if(flags&DIRECTORY)
printf("\tdirectory: %s",dir);
if(flags&FILENAME)
printf("\tfile: %s",file);
if(flags&EXTENSION)
printf("\textension: %s",ext);
return 0;
}
@函数名称: fclose
函数原型: int fclose(FILE * fp);
函数功能: 关闭fp所指的文件,释放文件缓冲区