- New batch file management module

- New oscillator module
- Bug fixes
This commit is contained in:
cvs
2004-11-17 10:50:17 +00:00
parent d96ee44d42
commit 2a93216346
23 changed files with 1731 additions and 338 deletions

View File

@ -112,6 +112,22 @@ static void writePolFile(FILE *fd, pTASdata pTAS){
}
fclose(fpol);
}
/*-----------------------------------------------------------------------*/
static char *findLastPoint(char *text)
{
char *pPtr;
int i;
pPtr = text + strlen(text) - 1;
for(i = strlen(text); i > 0; i--, pPtr--)
{
if(*pPtr == '.')
{
return pPtr;
}
}
return NULL;
}
/*-------------------------------------------------------------------------
TASHeader writes the header of a TAS data file. The format is an
obscure format from ILL ( not ill but Institute Laue Langevin). No
@ -151,14 +167,21 @@ static int TASHeader(pScanData self)
extract the file number from the name for entry into the
datafile
*/
pcPtr = strstr(self->pFile,".");
pcPtr -= 9; /* four for year, 5 for number */
for(i = 0; i < 5; i++, pcPtr++)
pcPtr = findLastPoint(self->pFile);
if(pcPtr != NULL)
{
pWork[i] = *pcPtr;
pcPtr -= 6; /* 6 digits for number */
for(i = 0; i < 6; i++, pcPtr++)
{
pWork[i] = *pcPtr;
}
pWork[6] = '\0';
iFileNO = atoi(pWork);
}
else
{
SCWrite(self->pCon,"WARNING: failed to decode file number",eWarning);
}
pWork[5] = '\0';
iFileNO = atoi(pWork);
/* the bizarre R, A, V header */
charLine(pBueffel,'R');