diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-15 23:57:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-15 23:57:48 +0000 |
commit | 16d128e5e10d541a78654b86409d5a3539f07708 (patch) | |
tree | 66de0af63c3811bb3040c16e9b52c11985f70811 /Build/source/utils/asymptote/settings.cc | |
parent | b20f78c549859ec0e8610bdd3ad904245e86b489 (diff) |
asymptote 1.83
git-svn-id: svn://tug.org/texlive/trunk@14696 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/settings.cc')
-rw-r--r-- | Build/source/utils/asymptote/settings.cc | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc index 1c7a539663d..0cb6e22fea2 100644 --- a/Build/source/utils/asymptote/settings.cc +++ b/Build/source/utils/asymptote/settings.cc @@ -231,9 +231,9 @@ types::record *getSettingsModule() { return settingsModule; } -void Warn(const string& s) +void noWarn(const string& s) { - array *Warn=getSetting<array *>("warnings"); + array *Warn=getSetting<array *>("suppress"); size_t size=checkArray(Warn); if(s.empty()) return; for(size_t i=0; i < size; i++) @@ -241,23 +241,23 @@ void Warn(const string& s) Warn->push(s); } -void noWarn(const string& s) +void Warn(const string& s) { - array *Warn=getSetting<array *>("warnings"); + array *Warn=getSetting<array *>("suppress"); size_t size=checkArray(Warn); for(size_t i=0; i < size; i++) if(vm::read<string>(Warn,i) == s) (*Warn).erase((*Warn).begin()+i,(*Warn).begin()+i+1); } -string warn(const string& s) +bool warn(const string& s) { - if(getSetting<bool>("debug")) return s; - array *Warn=getSetting<array *>("warnings"); + if(getSetting<bool>("debug")) return true; + array *Warn=getSetting<array *>("suppress"); size_t size=checkArray(Warn); for(size_t i=0; i < size; i++) - if(vm::read<string>(Warn,i) == s) return s; - return ""; + if(vm::read<string>(Warn,i) == s) return false; + return true; } // The dictionaries of long options and short options. @@ -1046,14 +1046,12 @@ void initSettings() { // WHEEL_DOWN: zoomout const char *wheeldown[]={"zoomout",NULL}; - const char *Warn[]={"writeoverloaded",NULL}; - addOption(new stringArraySetting("leftbutton", stringArray(leftbutton))); addOption(new stringArraySetting("middlebutton", stringArray(middlebutton))); addOption(new stringArraySetting("rightbutton", stringArray(rightbutton))); addOption(new stringArraySetting("wheelup", stringArray(wheelup))); addOption(new stringArraySetting("wheeldown", stringArray(wheeldown))); - addOption(new stringArraySetting("warnings", stringArray(Warn))); + addOption(new stringArraySetting("suppress", new array)); addOption(new warnSetting("warn", 0, "string", "Enable warning")); @@ -1130,6 +1128,8 @@ void initSettings() { addOption(new boolSetting("embed", 0, "Embed rendered preview image", true)); addOption(new boolSetting("auto3D", 0, "Automatically activate 3D scene", true)); + addOption(new boolSetting("autoplay", 0, "Autoplay 3D animations", false)); + addOption(new boolSetting("loop", 0, "Loop 3D animations", false)); addOption(new boolSetting("inlineimage", 0, "Generate inline embedded image")); @@ -1325,13 +1325,16 @@ void initDir() { string texmf=s+dirsep+"texmf"+dirsep; docdir=texmf+"doc"+dirsep+"asymptote"; Setting("sysdir")=texmf+"asymptote"; - s=lookup("TEXMFCONFIG"); + s=lookup("ASYMPTOTE_HOME"); if(s.size() > 1) - initdir=s+dirsep+"asymptote"; + initdir=s; } } if(initdir.empty()) + initdir=Getenv("ASYMPTOTE_HOME",msdos); + + if(initdir.empty()) initdir=Getenv(HOME.c_str(),msdos)+dirsep+"."+suffix; #ifdef __CYGWIN__ @@ -1462,7 +1465,7 @@ const char *beginpicture(const string& texengine) { if(latex(texengine)) return "\\begin{picture}"; if(context(texengine)) - return "%"; + return ""; else return "\\picture"; } |