#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../inc/config.h"
#include "genUtil.h"
#include "String.h"
#include "File.h"
#include "Memory.h"


void
init0(mrcImageCTFSNInfo* info)
{
    info->fptIn = stdin;    info->flagIn = 0;
    info->fptOut = stdout;    info->flagOut = 0;
    info->kV = 200;    info->flagkV = 0;
    info->Cs = 1.7;    info->flagCs = 0;
    info->Defocus = 2.7;    info->flagDefocus = 0;
    info->deg1 = 2;    info->flagdeg1 = 0;
    info->deg2 = 4;    info->flagdeg2 = 0;
    info->fptconfigFile = NULL;    info->flagconfigFile = 0;
    info->mode = 0;    info->flagmode = 0;
}

void
init1(mrcImageCTFSNInfo* info)
{
    char s[1024];
    int i;
    if(!info->flagIn) {
        stringGetFromFile(s, "In", stdin, stdout, 0);
        info->In = stringGetNthWord(s, 1, " ,");
        info->flagIn++;
    }
    if(info->flagIn) {
        info->fptIn = fileOpen(info->In, "r");
    }
    
    if(!info->flagOut) {
        stringGetFromFile(s, "Out", stdin, stdout, 0);
        info->Out = stringGetNthWord(s, 1, " ,");
        info->flagOut++;
    }
    if(info->flagOut) {
        info->fptOut = fileOpen(info->Out, "w");
    }
    
    if(info->flagkV) {
    }
    
    if(info->flagCs) {
    }
    
    if(!info->flagDefocus) {
        stringGetFromFile(s, "Defocus", stdin, stdout, 0);
        info->Defocus = stringGetNthRealData(s, 1, ", \t");
        info->flagDefocus++;
    }
    if(info->flagDefocus) {
    }
    
    if(info->flagdeg1) {
    }
    
    if(info->flagdeg2) {
    }
    
    if(info->flagconfigFile) {
        info->fptconfigFile = fileOpen(info->configFile, "r");
    }
    
    if(info->flagmode) {
    }
    
}
