line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package oEdtk::libC7 ;
|
2
|
|
|
|
|
|
|
# use strict;
|
3
|
1
|
|
|
1
|
|
11
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use Exporter;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
154
|
|
6
|
|
|
|
|
|
|
our $VERSION =0.0056;
|
7
|
|
|
|
|
|
|
our @ISA =qw(Exporter);
|
8
|
|
|
|
|
|
|
our @EXPORT =qw(
|
9
|
|
|
|
|
|
|
c7EdtkComp
|
10
|
|
|
|
|
|
|
c7_compo
|
11
|
|
|
|
|
|
|
c7_emit
|
12
|
|
|
|
|
|
|
c7EdtkEmit
|
13
|
|
|
|
|
|
|
c7_Control_Bal
|
14
|
|
|
|
|
|
|
);
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
8
|
use oEdtk::Main 0.42;
|
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
531
|
|
17
|
1
|
|
|
1
|
|
763
|
use oEdtk::trackEdtk qw (env_Var_Completion);
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
110
|
|
18
|
1
|
|
|
1
|
|
12
|
use oEdtk::Config qw (config_read);
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3867
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $C7_EVENT_DEPTH =7;
|
21
|
|
|
|
|
|
|
my $NOK =-1;
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub c7EdtkComp () { # remplacé par c7_compo - PLUS UTILISÉ ? dépendance libedtkDev
|
24
|
|
|
|
|
|
|
# A FAIRE : documenter et full pramétrage (compusetEdtk.ini)
|
25
|
0
|
|
|
0
|
0
|
|
my $output_Format =shift;
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# my $prim_style_file ="$ENV{EDTK_DIR_APP}/$ENV{EDTK_PRGNAME}/$ENV{EDTK_PRGNAME}$ENV{EDTK_FTYP_DFLT}.$ENV{EDTK_EXT_COMSET}";
|
28
|
0
|
|
|
|
|
|
my $prim_style_file ="$ENV{EDTK_DIR_SCRIPT}/$ENV{EDTK_PRGNAME}.$ENV{EDTK_EXT_COMSET}";
|
29
|
0
|
|
|
|
|
|
my $secd_input_file ="$ENV{EDTK_FDATWORK}.$ENV{EDTK_EXT_WORK}";
|
30
|
0
|
|
|
|
|
|
my $intermedte_file ="$ENV{EDTK_DIR_APPTMP}/$ENV{EDTK_PRGNAME}.cif";
|
31
|
0
|
|
|
|
|
|
my $null_conf_file ="$ENV{EDTK_DIR_COMSET}/System/null.cnf";
|
32
|
0
|
|
|
|
|
|
my $hyphen_diction =$ENV{C7_CNF_PDF};
|
33
|
0
|
|
|
|
|
|
my $widths_file =$ENV{C7_WID_PDF};
|
34
|
0
|
|
|
|
|
|
my $merge_lib_1 =$ENV{C7_DCLIB_1};
|
35
|
0
|
|
|
|
|
|
my $merge_lib_2 =$ENV{C7_DCLIB_2};
|
36
|
0
|
|
|
|
|
|
my $merge_lib_RW ="$ENV{C7_DCLIB_RW}/libEdtkC7";
|
37
|
0
|
|
|
|
|
|
my $scratch_file ="$ENV{EDTK_DIR_APPTMP}/$ENV{EDTK_PRGNAME}";
|
38
|
0
|
|
|
|
|
|
my $index_file_1 ="$ENV{EDTK_DIR_LOG}/$ENV{EDTK_PRGNAME}.idx1";
|
39
|
0
|
|
|
|
|
|
my $index_file_2 ="$ENV{EDTK_DIR_LOG}/$ENV{EDTK_PRGNAME}.idx2";
|
40
|
0
|
|
|
|
|
|
my $c7_message_db ="$ENV{EDTK_DIR_COMSET}/system/$ENV{WORDTYP}/xicsmsg.mdb";
|
41
|
0
|
|
|
|
|
|
my $comp_log_file ="$ENV{EDTK_DIR_LOG}/$ENV{EDTK_PRGNAME}.comp.log";
|
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
my $comp_file_def ="*\n";
|
44
|
0
|
|
|
|
|
|
$comp_file_def .="* FILE DEFINITIONS FOR COMPUSET \n";
|
45
|
0
|
|
|
|
|
|
$comp_file_def .="*\n";
|
46
|
|
|
|
|
|
|
# ATTENTION COMPUSET NE SUPPORTE PAS LES TABULATIONS DANS SES FICHIERS DE COMMANDES
|
47
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 1, %s ,primary input file\n", $prim_style_file);
|
48
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 18, %s ,secondary input file\n", $secd_input_file);
|
49
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 2, %s ,intermediate file output\n", $intermedte_file);
|
50
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 3, %s ,null config file\n", $null_conf_file);
|
51
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 4, %s ,hyphenation dictionary\n", $hyphen_diction);
|
52
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 7, %s ,POST widths file\n", $widths_file);
|
53
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 30, %s ,merge library 1\n", $merge_lib_1);
|
54
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 31, %s ,merge library 2\n", $merge_lib_2);
|
55
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 32, %s/ ,merge library 3\n", $merge_lib_RW);
|
56
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 8, %s1.tmp ,scratch file 1\n", $scratch_file);
|
57
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 9, %s2.tmp ,scratch file 2\n", $scratch_file);
|
58
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 10, %s3.tmp ,scratch file 3\n", $scratch_file);
|
59
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 34, %s4.tmp ,scratch file 4\n", $scratch_file);
|
60
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 11, %s ,index file 1\n", $index_file_1);
|
61
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 12, %s ,index file 1\n", $index_file_2);
|
62
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 25, %s ,CompuSet message database\n", $c7_message_db);
|
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
env_Var_Completion($comp_file_def);
|
65
|
0
|
|
|
|
|
|
$comp_file_def .="// END OF FILE DEFINITIONS\n";
|
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
my $comp_file=$ENV{EDTK_DIR_APPTMP}."/".$ENV{EDTK_PRGNAME}.".comp";
|
68
|
0
|
|
|
|
|
|
env_Var_Completion($comp_file);
|
69
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
oe_open_fo_OUT ("$comp_file");
|
71
|
0
|
|
|
|
|
|
print OUT $comp_file_def;
|
72
|
0
|
|
|
|
|
|
oe_close_fo("$comp_file");
|
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
my $commande ="$ENV{EDTK_DIR_COMSET}/system/$ENV{OSYS}/$ENV{COMPUSET} < $comp_file > $comp_log_file";
|
75
|
0
|
|
|
|
|
|
warn "\n$commande \n";
|
76
|
0
|
|
|
|
|
|
env_Var_Completion($commande);
|
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
eval {
|
79
|
0
|
|
|
|
|
|
system($commande);
|
80
|
|
|
|
|
|
|
};
|
81
|
|
|
|
|
|
|
# if ($@){
|
82
|
0
|
0
|
|
|
|
|
if ($?){
|
83
|
0
|
|
|
|
|
|
warn " ERROR $ENV{COMPUSET} return $? ";
|
84
|
0
|
|
|
|
|
|
warn " ERROR see $comp_log_file log";
|
85
|
0
|
|
|
|
|
|
env_Var_Completion($comp_log_file);
|
86
|
0
|
|
|
|
|
|
&show_C7_event ($comp_log_file);
|
87
|
|
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
return $NOK;
|
89
|
|
|
|
|
|
|
}
|
90
|
0
|
|
|
|
|
|
1;
|
91
|
|
|
|
|
|
|
}
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub c7_compo ($$$;$$) { # PLUS UTILISÉ ? dépendance Main.pm
|
94
|
0
|
|
|
0
|
0
|
|
my $cfg =config_read('COMSET');
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# A FAIRE : documenter et full pramétrage (compusetEdtk.ini)
|
97
|
0
|
|
0
|
|
|
|
my $output_format =shift || "PDF";
|
98
|
0
|
|
|
|
|
|
my $prim_style_file =shift;
|
99
|
0
|
|
|
|
|
|
my $secd_input_file =shift;
|
100
|
|
|
|
|
|
|
|
101
|
0
|
|
0
|
|
|
|
my $outmngr_option =shift || "";
|
102
|
0
|
|
0
|
|
|
|
my $doc_lib =shift || "libEdtkC7";
|
103
|
|
|
|
|
|
|
# warn "INFO : doclib = $doc_lib\n";
|
104
|
0
|
|
|
|
|
|
my $conf_pde_key ="C7_PDE_".$outmngr_option.$output_format;
|
105
|
0
|
|
|
|
|
|
my $conf_cnf_key ="C7_CNF_".$output_format;
|
106
|
0
|
|
|
|
|
|
my $conf_wid_key ="C7_WID_".$output_format;
|
107
|
|
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
my $intermedte_file =$cfg->{'EDTK_DIR_APPTMP'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".cif";
|
109
|
0
|
|
|
|
|
|
my $null_conf_file =$cfg->{'C7_NULL_CNF'};
|
110
|
0
|
|
|
|
|
|
my $hyphen_diction =$cfg->{$conf_cnf_key};
|
111
|
0
|
|
|
|
|
|
my $widths_file =$cfg->{$conf_wid_key};
|
112
|
0
|
|
|
|
|
|
my $merge_lib_1 =$cfg->{'C7_DCLIB_1'};
|
113
|
0
|
|
|
|
|
|
my $merge_lib_2 =$cfg->{'C7_DCLIB_2'};
|
114
|
0
|
|
|
|
|
|
my $merge_lib_RW =$cfg->{'C7_DCLIB_RW'}. "/" . $doc_lib;
|
115
|
0
|
|
|
|
|
|
my $scratch_file =$cfg->{'EDTK_DIR_APPTMP'} . "/" . $cfg->{'EDTK_PRGNAME'};
|
116
|
0
|
|
|
|
|
|
my $index_file_1 =$cfg->{'EDTK_DIR_OUTMNGR'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".idx1";
|
117
|
0
|
|
|
|
|
|
my $index_file_2 =$cfg->{'EDTK_DIR_OUTMNGR'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".idx2";
|
118
|
0
|
|
|
|
|
|
my $c7_message_db =$cfg->{'EDTK_DIR_COMSET'} . "/system/" . $cfg->{'WORDTYP'} . "/xicsmsg.mdb";
|
119
|
0
|
|
|
|
|
|
my $comp_log_file =$cfg->{'EDTK_DIR_LOG'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".comp.log";
|
120
|
|
|
|
|
|
|
|
121
|
0
|
|
|
|
|
|
my $comp_file_def ="*\n";
|
122
|
0
|
|
|
|
|
|
$comp_file_def .="* FILE DEFINITIONS FOR COMPUSET \n";
|
123
|
0
|
|
|
|
|
|
$comp_file_def .="*\n";
|
124
|
|
|
|
|
|
|
# ATTENTION COMPUSET NE SUPPORTE PAS LES TABULATIONS DANS SES FICHIERS DE COMMANDES
|
125
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 1, %s ,primary input file\n", $prim_style_file);
|
126
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 18, %s ,secondary input file\n", $secd_input_file);
|
127
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 2, %s ,intermediate file output\n", $intermedte_file);
|
128
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 3, %s ,null config file\n", $null_conf_file);
|
129
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 4, %s ,hyphenation dictionary\n", $hyphen_diction);
|
130
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 7, %s ,POST widths file\n", $widths_file);
|
131
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 30, %s ,merge library 1\n", $merge_lib_1);
|
132
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 31, %s ,merge library 2\n", $merge_lib_2);
|
133
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 32, %s ,merge library 3\n", $merge_lib_RW);
|
134
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 8, %s1.tmp ,scratch file 1\n", $scratch_file);
|
135
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 9, %s2.tmp ,scratch file 2\n", $scratch_file);
|
136
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 10, %s3.tmp ,scratch file 3\n", $scratch_file);
|
137
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 34, %s4.tmp ,scratch file 4\n", $scratch_file);
|
138
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 11, %s ,index file 1\n", $index_file_1);
|
139
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 12, %s ,index file 1\n", $index_file_2);
|
140
|
0
|
|
|
|
|
|
$comp_file_def .=sprintf ("FILE 25, %s ,CompuSet message database\n", $c7_message_db);
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# en environnement Windows les slash doivent être remplacés par des backslash
|
143
|
|
|
|
|
|
|
# sinon plantage (message "compuset ne trouve plus la clef hardware")
|
144
|
0
|
|
|
|
|
|
env_Var_Completion($comp_file_def);
|
145
|
|
|
|
|
|
|
# remplacer par
|
146
|
|
|
|
|
|
|
# $comp_file_def=~ms/\//\\/g;
|
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
# par contre les slash suivants sont importants pour fermer le fichier de définition
|
149
|
0
|
|
|
|
|
|
$comp_file_def .="// END OF FILE DEFINITIONS\n";
|
150
|
|
|
|
|
|
|
|
151
|
0
|
|
|
|
|
|
my $comp_file=$cfg->{'EDTK_DIR_APPTMP'}."/".$cfg->{'EDTK_PRGNAME'}.".comp";
|
152
|
|
|
|
|
|
|
#env_Var_Completion($comp_file);
|
153
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
oe_open_fo_OUT ("$comp_file");
|
155
|
0
|
|
|
|
|
|
print OUT $comp_file_def;
|
156
|
0
|
|
|
|
|
|
oe_close_fo("$comp_file");
|
157
|
|
|
|
|
|
|
|
158
|
0
|
|
|
|
|
|
my $commande =$cfg->{'EDTK_DIR_COMSET'} . "/system/" . $cfg->{'OSYS'} . "/" . $cfg->{'COMPUSET'} . " < $comp_file > $comp_log_file";
|
159
|
0
|
|
|
|
|
|
warn "INFO : $commande \n";
|
160
|
|
|
|
|
|
|
#env_Var_Completion($commande);
|
161
|
|
|
|
|
|
|
|
162
|
0
|
|
|
|
|
|
eval {
|
163
|
0
|
|
|
|
|
|
system($commande);
|
164
|
|
|
|
|
|
|
};
|
165
|
|
|
|
|
|
|
|
166
|
0
|
0
|
|
|
|
|
if ($?){
|
167
|
0
|
|
|
|
|
|
warn "ERROR: " . $cfg->{'COMPUSET'} . " return $? ";
|
168
|
0
|
|
|
|
|
|
warn "ERROR: see $comp_log_file log";
|
169
|
|
|
|
|
|
|
#env_Var_Completion($comp_log_file);
|
170
|
0
|
|
|
|
|
|
&show_C7_event ($comp_log_file);
|
171
|
|
|
|
|
|
|
|
172
|
0
|
|
|
|
|
|
return $NOK;
|
173
|
|
|
|
|
|
|
}
|
174
|
0
|
|
|
|
|
|
1;
|
175
|
|
|
|
|
|
|
}
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
sub c7_emit ($$$$;$$) { # PLUS UTILISÉ ? dépendance Main.pm
|
178
|
0
|
|
|
0
|
0
|
|
my $cfg =config_read('COMSET');
|
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
# A FAIRE : documenter et full pramétrage (compusetEdtk.ini)
|
181
|
0
|
|
0
|
|
|
|
my $output_format =uc (shift) || "PDF";
|
182
|
0
|
|
|
|
|
|
my $prim_style_file =shift;
|
183
|
0
|
|
|
|
|
|
my $secd_input_file =shift;
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
#EDTK_DIR_BASE =C:/edtk_APP
|
187
|
|
|
|
|
|
|
#EDTK_DIR_APP =$EDTK_DIR_BASE/app
|
188
|
|
|
|
|
|
|
#EDTK_DIR_SCRIPT =$EDTK_DIR_APP/$EDTK_PRGNAME
|
189
|
|
|
|
|
|
|
#EDTK_DIR_APPTMP =$EDTK_DIR_SCRIPT/tmp.nocvs
|
190
|
|
|
|
|
|
|
#EDTK_FDATWORK =$EDTK_DIR_APPTMP/$EDTK_PRGNAME
|
191
|
|
|
|
|
|
|
#EDTK_DIR_DATA_IN =$EDTK_DIR_SCRIPT/flux.nocvs
|
192
|
|
|
|
|
|
|
#EDTK_FDATAOUT =$EDTK_DIR_DATA_IN/$EDTK_PRGNAME
|
193
|
|
|
|
|
|
|
#EDTK_EXT_WORK =txt
|
194
|
|
|
|
|
|
|
#EDTK_EXT_PDF =pdf
|
195
|
|
|
|
|
|
|
# c7_emit ($output_format, $script_compo, $input_fdatwork, "$input_fdatwork.pdf", "OMGR", ) ;
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
# my $output_doc_file =$ENV{EDTK_DOC_OUTPUT}; #"$ENV{EDTK_FDATAOUT}.$ENV{EDTK_EXT_PDF}";
|
198
|
|
|
|
|
|
|
|
199
|
0
|
|
|
|
|
|
my $output_doc_file =shift;
|
200
|
0
|
|
0
|
|
|
|
my $outmngr_option =shift || "";
|
201
|
0
|
|
0
|
|
|
|
my $doc_lib =shift || "libEdtkC7";
|
202
|
|
|
|
|
|
|
# warn "INFO : doclib = $doc_lib\n";
|
203
|
0
|
|
|
|
|
|
my $conf_pde_key ="C7_PDE_" .$outmngr_option.$output_format;
|
204
|
0
|
|
|
|
|
|
my $conf_cnf_key ="C7_CNF_" .$output_format;
|
205
|
0
|
|
|
|
|
|
my $conf_wid_key ="C7_WID_" .$output_format;
|
206
|
0
|
|
|
|
|
|
my $emitter ="C7_INTX_".$output_format;
|
207
|
0
|
|
|
|
|
|
my $edtk_ext ="EDTK_EXT_".$output_format;
|
208
|
0
|
|
|
|
|
|
$output_doc_file ="$output_doc_file.".$cfg->{$edtk_ext};
|
209
|
|
|
|
|
|
|
|
210
|
0
|
|
|
|
|
|
my $intermedte_file =$cfg->{'EDTK_DIR_APPTMP'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".cif";
|
211
|
0
|
|
|
|
|
|
my $null_conf_file =$cfg->{'C7_NULL_CNF'};
|
212
|
0
|
|
|
|
|
|
my $hyphen_diction =$cfg->{$conf_cnf_key};
|
213
|
0
|
|
|
|
|
|
my $widths_file =$cfg->{$conf_wid_key};
|
214
|
0
|
|
|
|
|
|
my $merge_lib_1 =$cfg->{'C7_DCLIB_1'};
|
215
|
0
|
|
|
|
|
|
my $merge_lib_2 =$cfg->{'C7_DCLIB_2'};
|
216
|
0
|
|
|
|
|
|
my $merge_lib_RW =$cfg->{'C7_DCLIB_RW'}. "/" . $doc_lib;
|
217
|
0
|
|
|
|
|
|
my $scratch_file =$cfg->{'EDTK_DIR_APPTMP'} . "/" . $cfg->{'EDTK_PRGNAME'};
|
218
|
0
|
|
|
|
|
|
my $index_file_1 =$cfg->{'EDTK_DIR_OUTMNGR'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".idx1";
|
219
|
0
|
|
|
|
|
|
my $index_file_2 =$cfg->{'EDTK_DIR_OUTMNGR'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".idx2";
|
220
|
0
|
|
|
|
|
|
my $c7_message_db =$cfg->{'EDTK_DIR_COMSET'} . "/system/" . $cfg->{'WORDTYP'} . "/xicsmsg.mdb";
|
221
|
0
|
|
|
|
|
|
my $comp_log_file =$cfg->{'EDTK_DIR_LOG'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".comp.log";
|
222
|
0
|
|
|
|
|
|
my $output_pdef_file =$cfg->{$conf_pde_key};
|
223
|
|
|
|
|
|
|
|
224
|
0
|
|
|
|
|
|
my $emitter_file_def ="*\n";
|
225
|
0
|
|
|
|
|
|
$emitter_file_def .="* FILE DEFINITIONS FOR PSTINT\n";
|
226
|
0
|
|
|
|
|
|
$emitter_file_def .="*\n";
|
227
|
|
|
|
|
|
|
# ATTENTION COMPUSET NE SUPPORTE PAS PLUSIEURS TABULATIONS DANS SES FICHIERS DE COMMANDES
|
228
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 1, %s ,intermediate file input\n", $intermedte_file);
|
229
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 3, %s ,null config file\n", $null_conf_file);
|
230
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 14, %s ,POST widths file\n", $widths_file);
|
231
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 8, %s ,PostScript pdef file\n", $output_pdef_file);
|
232
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 4, %s ,PostScript output file\n", $output_doc_file);
|
233
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 9, %s ,merge library 1\n", $merge_lib_1);
|
234
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 10, %s ,merge library 2\n", $merge_lib_2);
|
235
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 11, %s ,merge library 3\n", $merge_lib_RW);
|
236
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 25, %s ,CompuSet message database\n", $c7_message_db);
|
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
# en environnement Windows les slash doivent être remplacés par des backslash
|
239
|
|
|
|
|
|
|
# sinon plantage (message "compuset ne trouve plus la clef hardware")
|
240
|
0
|
|
|
|
|
|
env_Var_Completion($emitter_file_def);
|
241
|
|
|
|
|
|
|
# remplacer par
|
242
|
|
|
|
|
|
|
# $comp_file_def=~ms/\//\\/g;
|
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
# par contre les slash suivants sont importants pour fermer le fichier de définition
|
245
|
0
|
|
|
|
|
|
$emitter_file_def .="// END OF FILE DEFINITIONS \n";
|
246
|
0
|
|
|
|
|
|
$emitter_file_def .="*\n";
|
247
|
0
|
|
|
|
|
|
$emitter_file_def .="* INSERT OPTIONS HERE OR IN PDEF FILE\n";
|
248
|
0
|
|
|
|
|
|
$emitter_file_def .="*\n";
|
249
|
0
|
|
|
|
|
|
$emitter_file_def .="// END OF OPTIONS\n";
|
250
|
|
|
|
|
|
|
|
251
|
0
|
|
|
|
|
|
my $emitter_file =$cfg->{'EDTK_DIR_APPTMP'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".emit";
|
252
|
|
|
|
|
|
|
#env_Var_Completion($emitter_file);
|
253
|
0
|
|
|
|
|
|
oe_open_fo_OUT ($emitter_file);
|
254
|
0
|
|
|
|
|
|
print OUT $emitter_file_def;
|
255
|
0
|
|
|
|
|
|
oe_close_fo($emitter_file);
|
256
|
|
|
|
|
|
|
|
257
|
0
|
|
|
|
|
|
my $emit_log_file =$cfg->{'EDTK_DIR_LOG'} . "/" . $cfg->{'EDTK_PRGNAME'} . ".emit.log";
|
258
|
0
|
|
|
|
|
|
my $commande =$cfg->{'EDTK_DIR_COMSET'} . "/system/" . $cfg->{'OSYS'} . "/" . $cfg->{$emitter} . " < $emitter_file > $emit_log_file";
|
259
|
0
|
|
|
|
|
|
warn "INFO : $commande \n";
|
260
|
|
|
|
|
|
|
#env_Var_Completion($commande);
|
261
|
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
|
eval {
|
263
|
0
|
|
|
|
|
|
system($commande);
|
264
|
|
|
|
|
|
|
};
|
265
|
|
|
|
|
|
|
# if ($@){
|
266
|
0
|
0
|
|
|
|
|
if ($?){
|
267
|
0
|
|
|
|
|
|
warn "ERROR: ". $cfg->{'COMPUSET'} . " emitter return $? ";
|
268
|
0
|
|
|
|
|
|
warn "ERROR: see $emit_log_file log";
|
269
|
|
|
|
|
|
|
#env_Var_Completion($emit_log_file);
|
270
|
0
|
|
|
|
|
|
&show_C7_event ($emit_log_file);
|
271
|
|
|
|
|
|
|
|
272
|
0
|
|
|
|
|
|
return $NOK;
|
273
|
|
|
|
|
|
|
}
|
274
|
0
|
|
|
|
|
|
1;
|
275
|
|
|
|
|
|
|
}
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
sub c7EdtkEmit { # remplacé par c7_emit - # PLUS UTILISÉ ? dépendance libEdtkDev
|
279
|
|
|
|
|
|
|
# A FAIRE : documenter et full pramétrage (compusetEdtk.ini)
|
280
|
0
|
|
|
0
|
0
|
|
my $output_Format =shift;
|
281
|
|
|
|
|
|
|
|
282
|
0
|
|
|
|
|
|
my $prim_style_file ="$ENV{EDTK_DIR_SCRIPT}/$ENV{EDTK_PRGNAME}.$ENV{EDTK_EXT_COMSET}";
|
283
|
0
|
|
|
|
|
|
my $secd_input_file ="$ENV{EDTK_FDATWORK}.$ENV{EDTK_EXT_WORK}";
|
284
|
0
|
|
|
|
|
|
my $intermedte_file ="$ENV{EDTK_DIR_APPTMP}/$ENV{EDTK_PRGNAME}.cif";
|
285
|
0
|
|
|
|
|
|
my $null_conf_file ="$ENV{EDTK_DIR_COMSET}/System/null.cnf";
|
286
|
0
|
|
|
|
|
|
my $hyphen_diction =$ENV{C7_CNF_PDF};
|
287
|
0
|
|
|
|
|
|
my $output_pdef_file =$ENV{C7_PDE_PDF};
|
288
|
0
|
|
|
|
|
|
my $widths_file =$ENV{C7_WID_PDF};
|
289
|
0
|
|
|
|
|
|
my $merge_lib_1 =$ENV{C7_DCLIB_1};
|
290
|
0
|
|
|
|
|
|
my $merge_lib_2 =$ENV{C7_DCLIB_2};
|
291
|
0
|
|
|
|
|
|
my $merge_lib_RW ="$ENV{C7_DCLIB_RW}/libEdtkC7";
|
292
|
0
|
|
|
|
|
|
my $scratch_file ="$ENV{EDTK_DIR_APPTMP}/$ENV{EDTK_PRGNAME}";
|
293
|
0
|
|
|
|
|
|
my $index_file_1 ="$ENV{EDTK_DIR_LOG}/$ENV{EDTK_PRGNAME}.idx1";
|
294
|
0
|
|
|
|
|
|
my $index_file_2 ="$ENV{EDTK_DIR_LOG}/$ENV{EDTK_PRGNAME}.idx2";
|
295
|
0
|
|
|
|
|
|
my $c7_message_db ="$ENV{EDTK_DIR_COMSET}/system/$ENV{WORDTYP}/xicsmsg.mdb";
|
296
|
0
|
|
|
|
|
|
my $output_doc_file =$ENV{EDTK_DOC_OUTPUT}; #"$ENV{EDTK_FDATAOUT}.$ENV{EDTK_EXT_PDF}";
|
297
|
|
|
|
|
|
|
|
298
|
0
|
|
|
|
|
|
my $emitter_file_def ="*\n";
|
299
|
0
|
|
|
|
|
|
$emitter_file_def .="* FILE DEFINITIONS FOR PSTINT\n";
|
300
|
0
|
|
|
|
|
|
$emitter_file_def .="*\n";
|
301
|
|
|
|
|
|
|
# ATTENTION COMPUSET NE SUPPORTE PAS PLUSIEURS TABULATIONS DANS SES FICHIERS DE COMMANDES
|
302
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 1, %s ,intermediate file input\n", $intermedte_file);
|
303
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 3, %s ,null config file\n", $null_conf_file);
|
304
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 14, %s ,POST widths file\n", $widths_file);
|
305
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 8, %s ,PostScript pdef file\n", $output_pdef_file);
|
306
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 4, %s ,PostScript output file\n", $output_doc_file);
|
307
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 9, %s ,merge library 1\n", $merge_lib_1);
|
308
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 10, %s ,merge library 2\n", $merge_lib_2);
|
309
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 11, %s ,merge library 3\n", $merge_lib_RW);
|
310
|
0
|
|
|
|
|
|
$emitter_file_def .=sprintf ("FILE 25, %s ,CompuSet message database\n", $c7_message_db);
|
311
|
|
|
|
|
|
|
|
312
|
0
|
|
|
|
|
|
env_Var_Completion($emitter_file_def);
|
313
|
0
|
|
|
|
|
|
$emitter_file_def .="// END OF FILE DEFINITIONS \n";
|
314
|
0
|
|
|
|
|
|
$emitter_file_def .="*\n";
|
315
|
0
|
|
|
|
|
|
$emitter_file_def .="* INSERT OPTIONS HERE OR IN PDEF FILE\n";
|
316
|
0
|
|
|
|
|
|
$emitter_file_def .="*\n";
|
317
|
0
|
|
|
|
|
|
$emitter_file_def .="// END OF OPTIONS\n";
|
318
|
|
|
|
|
|
|
|
319
|
0
|
|
|
|
|
|
my $emitter_file="$ENV{EDTK_DIR_APPTMP}/$ENV{EDTK_PRGNAME}.emit";
|
320
|
0
|
|
|
|
|
|
env_Var_Completion($emitter_file);
|
321
|
0
|
|
|
|
|
|
my $emit_log_file="$ENV{EDTK_DIR_LOG}/$ENV{EDTK_PRGNAME}.emit.log";
|
322
|
0
|
|
|
|
|
|
oe_open_fo_OUT ("$emitter_file");
|
323
|
0
|
|
|
|
|
|
print OUT $emitter_file_def;
|
324
|
0
|
|
|
|
|
|
oe_close_fo("$emitter_file");
|
325
|
|
|
|
|
|
|
|
326
|
0
|
|
|
|
|
|
my $commande ="$ENV{EDTK_DIR_COMSET}/system/$ENV{OSYS}/$ENV{PSTINTX} < $emitter_file > $emit_log_file";
|
327
|
0
|
|
|
|
|
|
warn "\n$commande \n";
|
328
|
0
|
|
|
|
|
|
env_Var_Completion($commande);
|
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
|
331
|
0
|
|
|
|
|
|
eval {
|
332
|
0
|
|
|
|
|
|
system($commande);
|
333
|
|
|
|
|
|
|
};
|
334
|
|
|
|
|
|
|
# if ($@){
|
335
|
0
|
0
|
|
|
|
|
if ($?){
|
336
|
0
|
|
|
|
|
|
warn " ERROR $ENV{COMPUSET} emitter return $? ";
|
337
|
0
|
|
|
|
|
|
warn " ERROR see $emit_log_file log";
|
338
|
0
|
|
|
|
|
|
env_Var_Completion($emit_log_file);
|
339
|
0
|
|
|
|
|
|
&show_C7_event ($emit_log_file);
|
340
|
|
|
|
|
|
|
|
341
|
0
|
|
|
|
|
|
return $NOK;
|
342
|
|
|
|
|
|
|
}
|
343
|
0
|
|
|
|
|
|
1;
|
344
|
|
|
|
|
|
|
}
|
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
sub show_C7_event ($) { # PLUS UTILISÉ ? dépendance interne libEdtkC7
|
347
|
0
|
|
|
0
|
0
|
|
my $log =shift;
|
348
|
0
|
|
|
|
|
|
my $ligne_count =0;
|
349
|
|
|
|
|
|
|
|
350
|
0
|
|
|
|
|
|
oe_open_fi_IN ($log);
|
351
|
|
|
|
|
|
|
|
352
|
0
|
|
|
|
|
|
warn "\n INFO extracted from log :\n";
|
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
# introduction de 'defined (IN)' dans le test pour élilminer le warning 'Value of construct can be "0"; test with defined()'
|
355
|
0
|
|
0
|
|
|
|
while (defined (IN) && (my $ligne = ) && ($ligne_count lt $C7_EVENT_DEPTH)) {
|
|
|
|
0
|
|
|
|
|
356
|
0
|
0
|
0
|
|
|
|
if ($ligne =~/-[EW]:/ or $ligne_count gt 1) {
|
357
|
0
|
|
|
|
|
|
warn $ligne;
|
358
|
0
|
|
|
|
|
|
$ligne_count++;
|
359
|
|
|
|
|
|
|
}
|
360
|
|
|
|
|
|
|
}
|
361
|
0
|
|
|
|
|
|
1;
|
362
|
|
|
|
|
|
|
}
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
sub c7_Control_Bal ($){ # PLUS UTILISÉ ? dépendance libEdtkDev et interne libEdtkC7
|
365
|
0
|
|
|
0
|
0
|
|
my $file =shift;
|
366
|
0
|
|
|
|
|
|
my $ctrl_depth_tags=$ENV{C7_DEPTH_TAGS};
|
367
|
0
|
|
0
|
|
|
|
$ctrl_depth_tags ||=1;
|
368
|
0
|
|
|
|
|
|
my $nbOpen=0;
|
369
|
0
|
|
|
|
|
|
my $nbClose=0;
|
370
|
0
|
|
|
|
|
|
my $nbSomOpen=0;
|
371
|
0
|
|
|
|
|
|
my $nbSomClose=0;
|
372
|
0
|
|
|
|
|
|
my $nbEcart=0;
|
373
|
0
|
|
|
|
|
|
my @lineNumbers;
|
374
|
0
|
|
|
|
|
|
my $buffMessage="";
|
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
# CONTROLE D'APPARIEMENT DU FICHIER DE DONNEES BALISEES
|
377
|
0
|
|
|
|
|
|
warn "INFO : Analyse de l'appariement des balises dans le fichier $file.\n";
|
378
|
0
|
|
|
|
|
|
oe_open_fi_IN ($file);
|
379
|
|
|
|
|
|
|
|
380
|
0
|
|
|
|
|
|
while ($ligne=){
|
381
|
0
|
|
|
|
|
|
while ($ligne=~m/
|
|
0
|
|
|
|
|
|
|
382
|
0
|
|
|
|
|
|
while ($ligne=~m/>/g){$nbClose++;}
|
|
0
|
|
|
|
|
|
|
383
|
0
|
|
|
|
|
|
$nbSomOpen +=$nbOpen;
|
384
|
0
|
|
|
|
|
|
$nbSomClose+=$nbClose;
|
385
|
|
|
|
|
|
|
|
386
|
0
|
0
|
|
|
|
|
if (abs($nbSomOpen - $nbSomClose) gt $ctrl_depth_tags){
|
|
|
0
|
|
|
|
|
|
387
|
0
|
|
|
|
|
|
push (@lineNumbers, $.);
|
388
|
0
|
|
|
|
|
|
warn "ERR. multiplication imbrications $nbSomOpen ouvertures / $nbSomClose fermetures";
|
389
|
0
|
|
|
|
|
|
warn "ERR. voir $file,";
|
390
|
0
|
|
|
|
|
|
warn "ERR. voir lignes @lineNumbers";
|
391
|
0
|
|
|
|
|
|
return $NOK;
|
392
|
|
|
|
|
|
|
} elsif (abs($nbSomOpen - $nbSomClose) ge 1) {
|
393
|
0
|
|
|
|
|
|
push (@lineNumbers, $.);
|
394
|
|
|
|
|
|
|
} else {
|
395
|
0
|
|
|
|
|
|
undef (@lineNumbers);
|
396
|
|
|
|
|
|
|
}
|
397
|
|
|
|
|
|
|
|
398
|
0
|
0
|
|
|
|
|
if ($nbOpen ne $nbClose){
|
399
|
0
|
|
|
|
|
|
$nbEcart++;
|
400
|
|
|
|
|
|
|
}
|
401
|
0
|
|
|
|
|
|
$nbOpen =0;
|
402
|
0
|
|
|
|
|
|
$nbClose =0;
|
403
|
|
|
|
|
|
|
}
|
404
|
|
|
|
|
|
|
|
405
|
0
|
0
|
|
|
|
|
if ($nbSomOpen ne $nbSomClose){
|
|
|
0
|
|
|
|
|
|
406
|
0
|
|
|
|
|
|
warn "ERROR : Le fichier balise n'est pas correctement apparie \n";
|
407
|
0
|
|
|
|
|
|
warn $buffMessage;
|
408
|
0
|
|
|
|
|
|
return $NOK;
|
409
|
|
|
|
|
|
|
} elsif ($nbEcart ne 0) {
|
410
|
0
|
|
|
|
|
|
warn "INFO : Presence de super balises appariees sur plusieurs lignes \n";
|
411
|
|
|
|
|
|
|
} else {
|
412
|
0
|
|
|
|
|
|
warn "GOOD : Le fichier balise semble bien apparie ($nbSomOpen ouverture(s)/$nbSomClose fermeture(s)).\n";
|
413
|
|
|
|
|
|
|
}
|
414
|
0
|
|
|
|
|
|
1;
|
415
|
|
|
|
|
|
|
}
|
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
1;
|