Пример #1
0
void write_rc_file(const char *fname)
{
	FILE *fp = fopen(fname, "w");

	if(!fp)
	{
		perror(fname);
		exit(1);
	}
	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline);

	if(rcinline)
		write_rcinline(fp);
	else
		write_rcbin(fp);
	fclose(fp);
}
Пример #2
0
void write_rc_file(const char *fname)
{
	FILE *fp;
	char *cptr;

	fp = fopen(fname, "w");
	if(!fp)
	{
		perror(fname);
		exit(1);
	}
	cptr = ctime(&now);
	killnl(cptr, 0);
	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline, cptr);

	if(rcinline)
		write_rcinline(fp);
	else
		write_rcbin(fp);
	fclose(fp);
}