summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runsystem.in
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
committerKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
commitdddce3148a2bc785603576b18ffcf72d39adbe47 (patch)
tree14f4c79ef11bcf0820a8d4ff2ab0c5ac009c365c /Build/source/utils/asymptote/runsystem.in
parenta01e51b01f5819b6091af48cdca581e9f2a9282e (diff)
asy 1.93
git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/runsystem.in')
-rw-r--r--Build/source/utils/asymptote/runsystem.in20
1 files changed, 17 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/runsystem.in b/Build/source/utils/asymptote/runsystem.in
index cf0cf6af053..7414e62f011 100644
--- a/Build/source/utils/asymptote/runsystem.in
+++ b/Build/source/utils/asymptote/runsystem.in
@@ -71,12 +71,12 @@ void breakpoint(stack *Stack, runnable *r)
}
}
-string convertname(string name, const string& format, bool check=true)
+string convertname(string name, const string& format)
{
if(name.empty())
return buildname(outname(),format,"");
else
- if(check) checkLocal(name);
+ name=outpath(name);
return format.empty() ? name : format+":"+name;
}
@@ -106,6 +106,11 @@ void exitFunction(stack *Stack)
// Autogenerated routines:
+string outname()
+{
+ return outname();
+}
+
void atupdate(callable *f)
{
processData().atUpdateFunction=f;
@@ -212,8 +217,17 @@ Int convert(string args=emptystring, string file=emptystring,
push_split(cmd,args);
cmd.push_back(name);
bool quiet=verbose <= 1;
+
+ char *oldPath=NULL;
+ string dir=stripFile(outname());
+ if(!dir.empty()) {
+ oldPath=getPath();
+ setPath(dir.c_str());
+ }
Int ret=System(cmd,quiet ? 1 : 0,true,"convert",
"your ImageMagick convert utility");
+ if(oldPath != NULL)
+ setPath(oldPath);
if(ret == 0 && verbose > 0)
cout << "Wrote " << ((file.empty()) ? name : file) << endl;
@@ -226,7 +240,7 @@ Int animate(string args=emptystring, string file=emptystring,
string format=emptystring)
{
#ifndef __CYGWIN__
- string name=convertname(file,format,false);
+ string name=convertname(file,format);
if(view()) {
mem::vector<string> cmd;
cmd.push_back(getSetting<string>("animate"));