pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools Reorder the loop so that we can never get int...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3b95181e15f8
branches: trunk
changeset: 511467:3b95181e15f8
user: jlam <jlam%pkgsrc.org@localhost>
date: Sat Apr 15 04:41:08 2006 +0000
description:
Reorder the loop so that we can never get into an infinite loop. We
now pass every line we don't need to process directly through to
msgfmt. This fixes building pt_BR.po in libgnomedb where all of the
lines end with "^M" and this script wasn't properly detecting a blank
line as a result.
diffstat:
mk/tools/msgfmt.sh | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (39 lines):
diff -r 29394a9f40d4 -r 3b95181e15f8 mk/tools/msgfmt.sh
--- a/mk/tools/msgfmt.sh Sat Apr 15 04:32:02 2006 +0000
+++ b/mk/tools/msgfmt.sh Sat Apr 15 04:41:08 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.13 2006/04/15 04:32:02 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.14 2006/04/15 04:41:08 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -135,15 +135,6 @@
obsolete = ""
while (result == 1) {
- # Pass blank lines or comments verbatim.
- COMMENT_BLANK_RE = "^(#|[ ]*$)"
- if ($0 ~ COMMENT_BLANK_RE) {
- print $0
- result = getline
- if (result < 0) break
- continue
- }
-
# Buffer any "msgid" statements into the singular array.
MSGID_RE = ORE "msgid[ ]+"
if ($0 ~ MSGID_RE) {
@@ -283,6 +274,11 @@
if (result < 0) break
continue
}
+
+ # Pass everything else verbatim.
+ print $0
+ result = getline
+ if (result < 0) break
}
}
' | $debug | $cmd
Home |
Main Index |
Thread Index |
Old Index