diff options
author | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
commit | ecdf859b6ce481abfd530425dcf6f0f764bd0001 (patch) | |
tree | 13bc161dc046876ac6c92fce5f9f5034ba9aa573 /graphics/asymptote/runtime.in | |
parent | 790995b7e79697514364450bf9c04f1b8d500838 (diff) |
CTAN sync 202112280300
Diffstat (limited to 'graphics/asymptote/runtime.in')
-rw-r--r-- | graphics/asymptote/runtime.in | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/graphics/asymptote/runtime.in b/graphics/asymptote/runtime.in index 27cde40074..1f67200f5d 100644 --- a/graphics/asymptote/runtime.in +++ b/graphics/asymptote/runtime.in @@ -199,7 +199,8 @@ void writestring(stack *s) } } -string toplocation() { +string toplocation() +{ ostringstream buf; position& topPos=processData().topPos; buf << topPos.Line() << "." << topPos.Column(); @@ -438,6 +439,11 @@ Int byte(real x) return camp::byte(x); } +real byteinv(Int x) +{ + return x >= 0 ? camp::byteinv(x) : 0.0; +} + string colorspace(pen p) { string s=ColorDeviceSuffix[p.colorspace()]; @@ -736,20 +742,16 @@ void _eval(runnable *s, bool embedded) } string xasyKEY() { - processDataStruct *P=&processData(); - xkey_t *xkey=&P->xkey; - xkey_t::iterator p=xkey->find(P->topPos.LineColumn()); - return p != xkey->end() ? p->second+" 1" : toplocation()+" 0"; + processDataStruct& P=processData(); + xkey_t& xkey=P.xkey; + xkey_t::iterator p=xkey.find(P.topPos.LineColumn()); + return p != xkey.end() ? p->second+" 1" : toplocation()+" 0"; } void xasyKEY(string *s) { processData().KEY=*s; } -string toplocation() { - return toplocation(); -} - string location() { ostringstream buf; buf << getPos(); |