summaryrefslogtreecommitdiff
path: root/security/libgpg-error/patches/patch-ai
blob: e6f6e35d11c7cdc559f6b108334556a9003deb7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
$NetBSD: patch-ai,v 1.2 2010/06/08 10:15:33 wiz Exp $

Setting FS in some versions of awk makes it null.  Make this script
work with the default FS of "whitespace" instead.

--- src/mkheader.awk.orig	2010-03-15 10:49:49.000000000 +0000
+++ src/mkheader.awk
@@ -51,7 +51,7 @@
 # at the full path of the files in @srcdir@.
 
 BEGIN {
-  FS = "[\t]+";
+  #FS = "[\t]+";
 # sources_nr holds the number of error sources.
   sources_nr = 0;
 # codes_nr holds the number of error codes.
@@ -78,7 +78,7 @@ BEGIN {
 
 
 sources_header {
-  if ($1 ~ /^[0123456789]+$/)
+  if ($0 ~ /^[0-9]+/)
     {
       sources_header = 0;
       sources_body = 1;
@@ -92,7 +92,7 @@ sources_body {
   if (/^$/)
     next;
 
-  if ($1 == "")
+  if ($0 !~ /^[0-9]+/)
     {
       sources_body = 0;
       between_sources_and_codes = 1;
@@ -107,7 +107,7 @@ sources_body {
 }
 
 between_sources_and_codes {
-  if ($1 ~ /^[0123456789]+$/)
+  if ($0 ~ /^[0-9]+/)
     {
       between_sources_and_codes = 0;
       codes_body = 1;
@@ -121,7 +121,7 @@ codes_body {
   if (/^$/)
     next;
 
-  if ($1 == "")
+  if ($0 !~ /^[0-9]+/)
     {
       codes_body = 0;
       between_codes_and_errnos = 1;
@@ -136,7 +136,7 @@ codes_body {
 }
 
 between_codes_and_errnos {
-  if ($1 ~ /^[0-9]/)
+  if ($0 ~ /^[0-9]+/)
     {
       between_codes_and_errnos = 0;
       errnos_body = 1;
@@ -150,7 +150,7 @@ errnos_body {
   if (/^$/)
     next;
 
-  if ($1 !~ /^[0-9]/)
+  if ($0 !~ /^[0-9]+/)
     {
 # Note that this assumes that extra_body.in doesn't start with a digit.
       errnos_body = 0;