summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/settings.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-21 23:42:52 +0000
committerKarl Berry <karl@freefriends.org>2009-06-21 23:42:52 +0000
commit8542b3da905deccc50b1bd6d21c7474a29286b3f (patch)
treec9a21ed9311ad8f967c67d17efad475eef50c5c1 /Build/source/utils/asymptote/settings.cc
parent95be153f845a361eb22745faa0d1ce509eb18c39 (diff)
asymptote 1.77 sources
git-svn-id: svn://tug.org/texlive/trunk@13865 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/settings.cc')
-rw-r--r--Build/source/utils/asymptote/settings.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index 5c24dba4e93..06d73d829c6 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -1134,7 +1134,7 @@ void initSettings() {
addOption(new envSetting("sysdir", systemDir));
addOption(new envSetting("textcommand","groff -e -P-b16"));
addOption(new envSetting("textextension", "roff"));
- addOption(new envSetting("textoutputtype", "ps"));
+ addOption(new envSetting("textoutformat", "ps"));
addOption(new envSetting("textprologue", ".EQ\ndelim $$\n.EN"));
addOption(new envSetting("textinitialfont", ".fam T\n.ps 12"));
addOption(new envSetting("textepilogue", ""));
@@ -1196,14 +1196,18 @@ void setPath() {
if(sysdir == "") {
iopipestream pipe("kpsewhich --var-value=SELFAUTOPARENT");
pipe >> sysdir;
- size_t size=sysdir.size();
- if(size > 2) {
// Workaround broken header file on i386-solaris with g++ 3.4.3.
#ifdef erase
#undef erase
#endif
- sysdir.erase(size-1,1);
- sysdir.append(dirsep+"texmf/asymptote");
+ size_t n=sysdir.find('\r');
+ if(n != string::npos)
+ sysdir.erase(n,1);
+ n=sysdir.find('\n');
+ if(n != string::npos)
+ sysdir.erase(n,1);
+ if(sysdir.size() > 1) {
+ sysdir.append(dirsep+"texmf"+dirsep+"asymptote");
Setting("sysdir")=sysdir;
}
}