dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch for dash
@ 2013-01-06 16:30 Aleksey Cheusov
  2013-01-06 17:37 ` Jérémie Courrèges-Anglas
  0 siblings, 1 reply; 4+ messages in thread
From: Aleksey Cheusov @ 2013-01-06 16:30 UTC (permalink / raw)
  To: dash

Hi. The following patch fixes dash build failure on Solaris
where /usr/bin/nl (which is in default PATH) is not POSIX compatible.
POSIX-ly correct version is in /usr/xpg4/bin but I think it's easier
to fix use of nl(1).

   [cheusov@pkgsrc-dev]$ /usr/bin/nl -ba -v0 <<< foo
     0  foo
   [cheusov@pkgsrc-dev]$ /usr/bin/nl -b a -v 0 <<< foo
   nl: a: No such file or directory
   [cheusov@pkgsrc-dev]$ uname -srm
   SunOS 5.11 i86pc
   [cheusov@pkgsrc-dev]$


--- src/mkbuiltins.orig	2011-03-15 07:18:06.000000000 +0000
+++ src/mkbuiltins
@@ -97,7 +97,7 @@ cat <<\!
  */
 
 !
-sed 's/	-[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
+sed 's/	-[a-z]*//' $temp2 | nl -ba -v0 | LC_COLLATE=C sort -u -k 3,3 |
 tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
 	awk '{	printf "#define %s (builtincmd + %d)\n", $3, $1}'
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)

-- 
Best regards, Aleksey Cheusov.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: patch for dash
  2013-01-06 16:30 patch for dash Aleksey Cheusov
@ 2013-01-06 17:37 ` Jérémie Courrèges-Anglas
  2013-01-10 10:46   ` (another) " Jérémie Courrèges-Anglas
  0 siblings, 1 reply; 4+ messages in thread
From: Jérémie Courrèges-Anglas @ 2013-01-06 17:37 UTC (permalink / raw)
  To: Aleksey Cheusov; +Cc: dash

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

Aleksey Cheusov <vle@gmx.net> writes:

> Hi. The following patch fixes dash build failure on Solaris
> where /usr/bin/nl (which is in default PATH) is not POSIX compatible.
> POSIX-ly correct version is in /usr/xpg4/bin but I think it's easier
> to fix use of nl(1).

Hi.  I'd like to submit this slightly different patch that uses awk
instead of nl.  This is useful for example on OpenBSD, which doesn't have
nl in the base system.

Regards,
-- 
Jérémie Courrèges-Anglas
GPG Fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494


[-- Attachment #2: patch-src_mkbuiltins --]
[-- Type: application/octet-stream, Size: 549 bytes --]

--- src/mkbuiltins.orig	Sat Sep 29 21:11:04 2012
+++ src/mkbuiltins	Sat Sep 29 21:25:49 2012
@@ -97,8 +97,9 @@ cat <<\!
  */
 
 !
-sed 's/	-[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
-tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
+sed 's/	-[a-z]*//' $temp2 | awk '{ printf "%6d\t%s\n", NR-1, $0 }' |
+	LC_COLLATE=C sort -u -k 3,3 |
+	tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
 	awk '{	printf "#define %s (builtincmd + %d)\n", $3, $1}'
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)
 echo '

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (another) patch for dash
  2013-01-06 17:37 ` Jérémie Courrèges-Anglas
@ 2013-01-10 10:46   ` Jérémie Courrèges-Anglas
  2013-08-23 10:42     ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Jérémie Courrèges-Anglas @ 2013-01-10 10:46 UTC (permalink / raw)
  To: dash; +Cc: Aleksey Cheusov


[-- Attachment #1.1: Type: text/plain, Size: 357 bytes --]

Hi,

with Aleksey we briefly discussed the mdoc compatibility of the manpage,
here's a patch that makes mandoc 1.12.1 happier and behaves correctly
against groff 1.21.  I want to include it in the staging dash-0.5.7
OpenBSD port.

Regards,
-- 
Jérémie Courrèges-Anglas
GPG Key fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494


[-- Attachment #1.2: patch-src_dash_1 --]
[-- Type: application/octet-stream, Size: 647 bytes --]

--- src/dash.1.orig	Thu Jul  7 09:01:50 2011
+++ src/dash.1	Tue Jan  8 06:10:40 2013
@@ -1715,7 +1715,7 @@ The
 .Ar argument
 is printed in the style
 .Sm off
-.Pf [\-]d Cm \&. No ddd Cm e No \\*(Pmdd
+.Pf [\-]d Cm \&. No ddd Cm e No \*(Pmdd
 .Sm on
 where there
 is one digit before the decimal point and the number after is equal to
@@ -2134,9 +2134,9 @@ is specified, the soft limit is displayed or both limi
 If both are specified, the last one wins.
 .El
 .Pp
-.Bl -tag -width Fl
 The limit to be interrogated or set, then, is chosen by specifying
 any one of these flags:
+.Bl -tag -width Fl
 .It Fl a
 show all the current limits
 .It Fl t

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (another) patch for dash
  2013-01-10 10:46   ` (another) " Jérémie Courrèges-Anglas
@ 2013-08-23 10:42     ` Herbert Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2013-08-23 10:42 UTC (permalink / raw)
  To: Jérémie Courrèges-Anglas; +Cc: dash, Aleksey Cheusov

On Thu, Jan 10, 2013 at 10:46:09AM +0000, Jérémie Courrèges-Anglas wrote:
> Hi,
> 
> with Aleksey we briefly discussed the mdoc compatibility of the manpage,
> here's a patch that makes mandoc 1.12.1 happier and behaves correctly
> against groff 1.21.  I want to include it in the staging dash-0.5.7
> OpenBSD port.

Patch applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-23 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-06 16:30 patch for dash Aleksey Cheusov
2013-01-06 17:37 ` Jérémie Courrèges-Anglas
2013-01-10 10:46   ` (another) " Jérémie Courrèges-Anglas
2013-08-23 10:42     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).