~ubuntu-branches/ubuntu/intrepid/dash/intrepid-updates

« back to all changes in this revision

Viewing changes to debian/diff/0002-PARSER-Removed-useless-parsebackquote-flag.diff

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-07-18 15:38:47 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070718153847-pef1uwy72j9gs9pw
Tags: 0.5.4-1ubuntu1
* Merge with Debian; remaining changes:
  - Build against glibc instead of dietlibc
  - Change default answer for "Install dash as /bin/sh?" question to true.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 503a0b8da8ed299a00ac95fa24d1fc37c3e831d3 Mon Sep 17 00:00:00 2001
2
 
From: Herbert Xu <herbert@gondor.apana.org.au>
3
 
Date: Wed, 29 Mar 2006 07:35:34 +1100
4
 
Subject: [PATCH] [PARSER] Removed useless parsebackquote flag
5
 
 
6
 
The parsebackquote flag is only used in a test where it always has the
7
 
value zero.  So we can remove it altogether.
8
 
---
9
 
 ChangeLog    |    4 ++++
10
 
 src/parser.c |    8 +-------
11
 
 2 files changed, 5 insertions(+), 7 deletions(-)
12
 
 
13
 
diff --git a/ChangeLog b/ChangeLog
14
 
index 02b966c..5dd6d40 100644
15
 
--- a/ChangeLog
16
 
+++ b/ChangeLog
17
 
@@ -1,3 +1,7 @@
18
 
+2006-03-29  Herbert Xu <herbert@gondor.apana.org.au>
19
 
+
20
 
+       * Removed useless parsebackquote flag.
21
 
+
22
 
 2006-01-12  Herbert Xu <herbert@gondor.apana.org.au>
23
 
 
24
 
        * Fixed eval exit status with empty arguments.
25
 
diff --git a/src/parser.c b/src/parser.c
26
 
index c62a950..375fd54 100644
27
 
--- a/src/parser.c
28
 
+++ b/src/parser.c
29
 
@@ -76,7 +76,6 @@ struct heredoc {
30
 
 
31
 
 
32
 
 struct heredoc *heredoclist;   /* list of here documents to read */
33
 
-int parsebackquote;            /* nonzero if we are inside backquotes */
34
 
 int doprompt;                  /* if set, prompt the user */
35
 
 int needprompt;                        /* true if interactive and at start of line */
36
 
 int lasttoken;                 /* last token read */
37
 
@@ -1019,7 +1018,7 @@ quotemark:
38
 
 endword:
39
 
        if (syntax == ARISYNTAX)
40
 
                synerror("Missing '))'");
41
 
-       if (syntax != BASESYNTAX && ! parsebackquote && eofmark == NULL)
42
 
+       if (syntax != BASESYNTAX && eofmark == NULL)
43
 
                synerror("Unterminated quoted string");
44
 
        if (varnest != 0) {
45
 
                startlinno = plinno;
46
 
@@ -1263,7 +1262,6 @@ badsub:                   synerror("Bad substitution");
47
 
 
48
 
 parsebackq: {
49
 
        struct nodelist **nlpp;
50
 
-       int savepbq;
51
 
        union node *n;
52
 
        char *volatile str;
53
 
        struct jmploc jmploc;
54
 
@@ -1274,11 +1272,9 @@ parsebackq: {
55
 
        (void) &saveprompt;
56
 
 #endif
57
 
 
58
 
-       savepbq = parsebackquote;
59
 
        if (setjmp(jmploc.loc)) {
60
 
                if (str)
61
 
                        ckfree(str);
62
 
-               parsebackquote = 0;
63
 
                handler = savehandler;
64
 
                longjmp(handler->loc, 1);
65
 
        }
66
 
@@ -1360,7 +1356,6 @@ done:
67
 
                nlpp = &(*nlpp)->next;
68
 
        *nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist));
69
 
        (*nlpp)->next = NULL;
70
 
-       parsebackquote = oldstyle;
71
 
 
72
 
        if (oldstyle) {
73
 
                saveprompt = doprompt;
74
 
@@ -1396,7 +1391,6 @@ done:
75
 
                str = NULL;
76
 
                INTON;
77
 
        }
78
 
-       parsebackquote = savepbq;
79
 
        handler = savehandler;
80
 
        if (arinest || dblquote)
81
 
                USTPUTC(CTLBACKQ | CTLQUOTE, out);
82
 
1.5.2.1
83