/[PAMELA software]/rawreader/src/filename.cpp
ViewVC logotype

Contents of /rawreader/src/filename.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Dec 10 12:52:50 2006 UTC (17 years, 11 months ago) by cafagna
Branch: MAIN
CVS Tags: v1r15, v1r14, v1r13, HEAD
Changes since 1.2: +6 -13 lines
*** empty log message ***

1 /*************FILE NAME CREATION**********************************/
2 #include "descript.h"
3 #include "flag.h"
4
5 void filename(char name1[], char name2[], char cln1[], char path [], int route, char ini_file[])
6 // name1, name2, cln1 - output parameters
7 {
8 char fno[80], route_path[90], name_route[4];
9 char command[180]; /*DOS command*/
10 FILE *ffiot;
11
12 name_route[0]=ini_file[5];
13 name_route[1]=ini_file[6];
14 name_route[2]=ini_file[7];
15 name_route[3]='\0';
16
17 sprintf(command,"%03i_",route);
18 sscanf(command,"%s",fno);
19
20 strncat(strcpy(route_path,path),fno,3);
21 strcat(route_path,"/tmp.dat");
22
23 if ((ffiot=fopen(route_path,"w+"))==0)
24 /*************Create directory mmm*************************/
25 {
26 strncat(strcat(strcat(strcat(strcpy(command,"mkdir "),path),name_route),"_"),fno,3);
27 system(command);
28 /**********************************************************/
29
30 /*************Create directory Cln1************************/
31 strcat(command,"/Cln1");
32 system(command);
33 /**********************************************************/
34 }
35 strcat(strncat(strcat(strcat(strcpy(name1,path),name_route),"_"),fno,3),"/Cln1/");
36 strcat(strcat(strcat(strcat(strcat(strncat(name1,ini_file,5),"_"),name_route),"_"),fno),"cln1Er.log");
37
38 strcat(strncat(strcat(strcat(strcpy(name2,path),name_route),"_"),fno,3),"/Cln1/");
39 strcat(strcat(strcat(strcat(strcat(strncat(name2,ini_file,5),"_"),name_route),"_"),fno),"mis_cln1.dat");
40
41 strcat(strncat(strcat(strcat(strcpy(cln1,path),name_route),"_"),fno,3),"/Cln1/");
42 strcat(strcat(strcat(strcat(strcat(strncat(cln1,ini_file,5),"_"),name_route),"_"),fno),"cln1.pam");
43 if (ffiot!=0) {fclose(ffiot); remove(route_path);}
44 }

  ViewVC Help
Powered by ViewVC 1.1.23