Commit be044821 authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

more header content

parent b1d4f321
......@@ -584,9 +584,21 @@ int main(int argc, char **argv)
/* Print and save */
if(verbose>0) parWrite(&par, stdout, PAR_FORMAT_TSV_UK, 1, NULL);
if(parfile[0]) {
/* Set file format */
par.format=parFormatFromExtension(parfile);
if(verbose>2) printf("parameter file format := %s\n", parFormattxt(par.format));
if(par.format==PAR_FORMAT_UNKNOWN) par.format=PAR_FORMAT_FIT;
/* set header contents */
{
iftPut(&par.h, "datafile", tacfile, 0, NULL);
{
char buf[256];
time_t t=time(NULL);
iftPut(&par.h, "analysis_time", ctime_r_int(&t, buf), 0, NULL);
tpcProgramName(argv[0], 1, 1, buf, 256);
iftPut(&par.h, "program", buf, 0, NULL);
}
}
/* Save file */
if(verbose>1) printf(" saving %s\n", parfile);
FILE *fp=fopen(parfile, "w");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment