# Fri Aug 30 04:07:22 PM
----------------------------*/
-int proc_file(char *rqfile)
+int proc_file(char *rqfile, char *rspfile)
{
char afn[256], rfn[256];
FILE *afp = NULL, *rfp = NULL;
afn, strerror(errno));
return -1;
}
- strcpy(rfn,afn);
- rp=strstr(rfn,"req/");
+ if (!rspfile)
+ {
+ strcpy(rfn,afn);
+ rp=strstr(rfn,"req/");
#ifdef OPENSSL_SYS_WIN32
- if (!rp)
- rp=strstr(rfn,"req\\");
+ if (!rp)
+ rp=strstr(rfn,"req\\");
#endif
- assert(rp);
- memcpy(rp,"rsp",3);
- rp = strstr(rfn, ".req");
- memcpy(rp, ".rsp", 4);
- if ((rfp = fopen(rfn, "w")) == NULL)
+ assert(rp);
+ memcpy(rp,"rsp",3);
+ rp = strstr(rfn, ".req");
+ memcpy(rp, ".rsp", 4);
+ rspfile = rfn;
+ }
+ if ((rfp = fopen(rspfile, "w")) == NULL)
{
printf("Cannot open file: %s, %s\n",
rfn, strerror(errno));
--------------------------------------------------*/
int main(int argc, char **argv)
{
- char *rqlist = "req.txt";
+ char *rqlist = "req.txt", *rspfile = NULL;
FILE *fp = NULL;
char fn[250] = "", rfn[256] = "";
int f_opt = 0, d_opt = 1;
if (d_opt)
rqlist = argv[2];
else
+ {
strcpy(fn, argv[2]);
+ rspfile = argv[3];
+ }
}
if (d_opt)
{ /* list of files (directory) */
strcpy(rfn, fn);
if (VERBOSE)
printf("Processing: %s\n", rfn);
- if (proc_file(rfn))
+ if (proc_file(rfn, rspfile))
{
printf(">>> Processing failed for: %s <<<\n", rfn);
EXIT(1);
{
if (VERBOSE)
printf("Processing: %s\n", fn);
- if (proc_file(fn))
+ if (proc_file(fn, rspfile))
{
printf(">>> Processing failed for: %s <<<\n", fn);
}
}
}
-int proc_file(char *rqfile)
+int proc_file(char *rqfile, char *rspfile)
{
char afn[256], rfn[256];
FILE *afp = NULL, *rfp = NULL;
afn, strerror(errno));
return -1;
}
- strcpy(rfn,afn);
- rp=strstr(rfn,"req/");
+ if (!rspfile)
+ {
+ strcpy(rfn,afn);
+ rp=strstr(rfn,"req/");
#ifdef OPENSSL_SYS_WIN32
- if (!rp)
- rp=strstr(rfn,"req\\");
+ if (!rp)
+ rp=strstr(rfn,"req\\");
#endif
- assert(rp);
- memcpy(rp,"rsp",3);
- rp = strstr(rfn, ".req");
- memcpy(rp, ".rsp", 4);
- if ((rfp = fopen(rfn, "w")) == NULL)
+ assert(rp);
+ memcpy(rp,"rsp",3);
+ rp = strstr(rfn, ".req");
+ memcpy(rp, ".rsp", 4);
+ rspfile = rfn;
+ }
+ if ((rfp = fopen(rspfile, "w")) == NULL)
{
printf("Cannot open file: %s, %s\n",
rfn, strerror(errno));
--------------------------------------------------*/
int main(int argc, char **argv)
{
- char *rqlist = "req.txt";
+ char *rqlist = "req.txt", *rspfile = NULL;
FILE *fp = NULL;
char fn[250] = "", rfn[256] = "";
int f_opt = 0, d_opt = 1;
if (d_opt)
rqlist = argv[2];
else
+ {
strcpy(fn, argv[2]);
+ rspfile = argv[3];
+ }
}
if (d_opt)
{ /* list of files (directory) */
strtok(fn, "\r\n");
strcpy(rfn, fn);
printf("Processing: %s\n", rfn);
- if (proc_file(rfn))
+ if (proc_file(rfn, rspfile))
{
printf(">>> Processing failed for: %s <<<\n", rfn);
EXIT(1);
{
if (VERBOSE)
printf("Processing: %s\n", fn);
- if (proc_file(fn))
+ if (proc_file(fn, rspfile))
{
printf(">>> Processing failed for: %s <<<\n", fn);
}
my $shwrap_prefix;
my $debug = 0;
my $quiet = 0;
+my $rspdir = "rsp";
foreach (@ARGV)
{
elsif (/--dir=(.*)$/)
{
$tvdir = $1;
- # $tvdir .= "/" unless $tvdir =~ /\/$/;
+ }
+ elsif (/--rspdir=(.*)$/)
+ {
+ $rspdir = $1;
}
elsif (/--tprefix=(.*)$/)
{
{
my ($win32, $req) = @_;
my $rsp = $req;
- $rsp =~ s/req$/rsp/;
+ $rsp =~ s/req$/$rspdir/;
if ($win32)
{
$rsp =~ tr|/|\\|;
sub test_line
{
my ($win32, $req, $tprefix, $tcmd) = @_;
+ my $rsp = $req;
+ $rsp =~ s/req\/([^\/]*).req$/$rspdir\/$1.rsp/;
if ($tcmd =~ /-f$/)
{
if ($win32)
{
$req =~ tr|/|\\|;
- print OUT "$tprefix$tcmd \"$req\"\n";
+ print OUT "$tprefix$tcmd \"$req\" \"$rsp\"\n";
}
else
{
print OUT <<END;
-${shwrap_prefix}shlib_wrap.sh $tprefix$tcmd "$req" || { echo "$req failure" ; exit 1
+${shwrap_prefix}shlib_wrap.sh $tprefix$tcmd "$req" "$rsp" || { echo "$req failure" ; exit 1
}
END
}
}
}
- my $rsp = $req;
- $rsp =~ s/req\/([^\/]*).req$/rsp\/$1.rsp/;
if ($win32)
{
$req =~ tr|/|\\|;