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

Annotation of /rawreader/src/filename.cpp

Parent Directory Parent Directory | Revision Log Revision Log


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

1 cafagna 1.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 cafagna 1.3 char fno[80], route_path[90], name_route[4];
9 cafagna 1.1 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 cafagna 1.3 sprintf(command,"%03i_",route);
18     sscanf(command,"%s",fno);
19 cafagna 1.1
20     strncat(strcpy(route_path,path),fno,3);
21 cafagna 1.2 strcat(route_path,"/tmp.dat");
22 cafagna 1.1
23     if ((ffiot=fopen(route_path,"w+"))==0)
24     /*************Create directory mmm*************************/
25     {
26 cafagna 1.2 strncat(strcat(strcat(strcat(strcpy(command,"mkdir "),path),name_route),"_"),fno,3);
27 cafagna 1.1 system(command);
28     /**********************************************************/
29    
30     /*************Create directory Cln1************************/
31 cafagna 1.2 strcat(command,"/Cln1");
32 cafagna 1.1 system(command);
33     /**********************************************************/
34     }
35 cafagna 1.2 strcat(strncat(strcat(strcat(strcpy(name1,path),name_route),"_"),fno,3),"/Cln1/");
36 cafagna 1.3 strcat(strcat(strcat(strcat(strcat(strncat(name1,ini_file,5),"_"),name_route),"_"),fno),"cln1Er.log");
37 cafagna 1.1
38 cafagna 1.2 strcat(strncat(strcat(strcat(strcpy(name2,path),name_route),"_"),fno,3),"/Cln1/");
39 cafagna 1.3 strcat(strcat(strcat(strcat(strcat(strncat(name2,ini_file,5),"_"),name_route),"_"),fno),"mis_cln1.dat");
40 cafagna 1.1
41 cafagna 1.2 strcat(strncat(strcat(strcat(strcpy(cln1,path),name_route),"_"),fno,3),"/Cln1/");
42 cafagna 1.3 strcat(strcat(strcat(strcat(strcat(strncat(cln1,ini_file,5),"_"),name_route),"_"),fno),"cln1.pam");
43 cafagna 1.1 if (ffiot!=0) {fclose(ffiot); remove(route_path);}
44     }

  ViewVC Help
Powered by ViewVC 1.1.23