Re: [Groff] End of file processing

2014-01-03 Thread Tadziu Hoffmann
Try this: .\" Minimal footer .de footer . sp |\\n[.p]u-.75i . ce 1 \\n[%] . if \\n[defer]=1 \c ' bp .. (You need the no-break version of bp, otherwise the line will be flushed by the break that occurs before bp is invoked, and then no partial line will exist during bp processing.

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Ralph Graulich
> Folks, I think the aim of all shell scripts in groff is to be POSIX > `sh' compatible. In case there are bashisms, they should be removed > and/or circumvented. I second that! "sh" is the lowest common denominator on nearly all UNIX operating systems in existence. Therefore one should strive f

Re: [Groff] The Great 202 Jailbreak.

2014-01-03 Thread Ralph Graulich
Hi Ralph, > Interesting twenty-minute video covering the history of > reverse-engineering the $50,000 Linotron 202 typesetter at Bell Labs in > the late 1970s. http://youtu.be/CVxeuwlvf8w (Hat-tip > https://twitter.com/rob_pike/status/412398836628217856.) Funny coincidence that you mentioned th

Re: [Groff] End of file processing

2014-01-03 Thread Peter Schaffter
On Fri, Jan 03, 2014, Werner Lemberg wrote: > > > When a diversion that doesn't fit on the last page of a document and > > has to be deferred to the next (ie a float) is followed by a few > > lines of type that don't reach the bottom margin, processing stops > > at the end of the text and the dive

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Werner LEMBERG
>> #!/bin/sh >> # This script is written for the bash shell. See bash(1). >> >> Or is that just too obvious? > > Wouldn't #!/bin/bash be more obvious and less error-prone? Folks, I think the aim of all shell scripts in groff is to be POSIX `sh' compatible. In case there are bashisms, they sh

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Peter Schaffter
On Fri, Jan 03, 2014, Roger Leigh wrote: > > #!/bin/sh > > # This script is written for the bash shell. See bash(1). > > > > Or is that just too obvious? > > It's incorrect. If you're writing a script for the bash shell, then > all you need to do is use > > #!/bin/bash > > and then you'll be

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Ralph Corderoy
Hi Doug, > I must be missing something in the discussion about random > numbers. Why does groff need them? In the offered example > tmp="$d/eqn2graph$groff_rand" > the "random number" serves only to make a (supposedly) unique > name. But of course, if the number is truly random, it is not > gu

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Daode
Doug McIlroy wrote: |I must be missing something in the discussion about random |numbers. Why does groff need them? In the offered example |tmp="$d/eqn2graph$groff_rand" |the "random number" serves only to make a (supposedly) unique |name. But of course, if the number is truly random, it

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Doug McIlroy
I must be missing something in the discussion about random numbers. Why does groff need them? In the offered example tmp="$d/eqn2graph$groff_rand" the "random number" serves only to make a (supposedly) unique name. But of course, if the number is truly random, it is not guaranteed to be unique.

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Mike Bianchi
On Thu, Jan 02, 2014 at 09:12:38PM -0500, Peter Schaffter wrote: > On Thu, Jan 02, 2014, Mike Bianchi wrote: > > How is someone attempting to understand a #!/bin/sh script to know what > > the > > writer intended if there is no documented way to interpret the syntax? > > #!/bin/sh > # This scri

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Roger Leigh
On Thu, Jan 02, 2014 at 09:12:38PM -0500, Peter Schaffter wrote: > On Thu, Jan 02, 2014, Mike Bianchi wrote: > > How is someone attempting to understand a #!/bin/sh script to know what > > the > > writer intended if there is no documented way to interpret the syntax? > > #!/bin/sh > # This scri

Re: [Groff] Fw: Generating ChangeLog files.

2014-01-03 Thread Daode
Werner LEMBERG wrote: |Regarding the abandoning of ChangeLog files: There is an interesting |thread right now about this topic in the emacs-devel mailing list. |Attached you can find one of the messages, and I agree with Eli. |However, other people might think differently... I never used Chan

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Ralph Corderoy
Hi Mike, > Please define what a non-standard extension shell is. Something that isn't in POSIX's sh. > My point is that #!/bin/sh is the name of a shell command that is > not documented. In fact it does not exist anymore. There are many shells that aim to provide all of POSIX's sh's behaviou

Re: [Groff] [PATCH] Use bash for several contrib scripts

2014-01-03 Thread Ralph Corderoy
Hi, Tethys wrote: > Since it's not guaranteed to be present, why not just ignore $RANDOM > and use our own randomly generated integer instead? Something like: > > groff_rand=$(dd if=/dev/urandom bs=8 count=1 2>/dev/null | sum | sed > 's/^0*//;s/ .*//') > tmp="$d/eqn2graph$groff_rand

[Groff] Fw: Generating ChangeLog files.

2014-01-03 Thread Werner LEMBERG
Regarding the abandoning of ChangeLog files: There is an interesting thread right now about this topic in the emacs-devel mailing list. Attached you can find one of the messages, and I agree with Eli. However, other people might think differently... Werner --- Begin Message --- > From: Rüdig