Re: Use `strsave()`, not `strdup()`.

2021-11-14 Thread James K. Lowden
On Tue, 9 Nov 2021 20:17:56 +1100 "G. Branden Robinson" wrote: > We can either: > * Use a nonstandard allocator; or > * Handle exceptions. Hi Brandon, If it's C++, you have only one choice: handle exceptions. Otherwise, you're using so little of the language that you might as well use C.

Re: macro returning a value?

2021-11-14 Thread Thomas Dupond
Ulrich Lauther wrote: > > .de Pos > > \R'foo (\\n[.d]-\\n[.v]*254+1)/72000'\\n[foo]mm/10 > > .. > > > > which allows you to enter > > > > position: \n[.d] units, \*[Pos]. > > > > Wow! Works nicely. > > But why is "R" escaped only once? \\R works too. > And I had to add a line ".sp -1v" at

Re: macro returning a value?

2021-11-14 Thread Ulrich Lauther
On Sat, Nov 13, 2021 at 12:19:09PM -0500, Peter Schaffter wrote: > On Sat, Nov 13, 2021, Ulrich Lauther wrote: > > Is there a trick to make a macro or string return a value? > > > The only solution I found looks like this: > > > > .de Pos END > > .nr foo (\\n[.d]u-\\[.v]u)*254+1)/