~ubuntu-branches/debian/sid/postfix/sid

« back to all changes in this revision

Viewing changes to src/global/xtext.c

  • Committer: Package Import Robot
  • Author(s): LaMont Jones, LaMont Jones, localization folks
  • Date: 2014-02-11 07:44:30 UTC
  • mfrom: (1.1.41)
  • Revision ID: package-import@ubuntu.com-20140211074430-91tdwgjriazawdz4
Tags: 2.11.0-1
[LaMont Jones]

* New upstream release: 2.11.0

[localization folks]

* l10n: Updated German translations.  Closes: #734893 (Helge Kreutzmann)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
/*      VSTRING *xtext_unquote(unquoted, quoted)
20
20
/*      VSTRING *unquoted;
21
21
/*      const char *quoted;
 
22
/*
 
23
/*      VSTRING *xtext_unquote_append(unquoted, quoted)
 
24
/*      VSTRING *unquoted;
 
25
/*      const char *quoted;
22
26
/* DESCRIPTION
23
27
/*      xtext_quote() takes a null-terminated string and replaces characters
24
28
/*      +, <33(10) and >126(10), as well as characters specified with "special"
31
35
/*      understands lowercase, uppercase, and mixed case +XX sequences. The
32
36
/*      result value is the unquoted argument in case of success, a null pointer
33
37
/*      otherwise.
 
38
/*
 
39
/*      xtext_unquote_append() is like xtext_unquote(), but appends
 
40
/*      the conversion result to the result buffer.
34
41
/* BUGS
35
42
/*      This module cannot process null characters in data.
36
43
/* LICENSE
90
97
    return (quoted);
91
98
}
92
99
 
93
 
/* xtext_unquote - quoted data to unquoted */
 
100
/* xtext_unquote_append - quoted data to unquoted */
94
101
 
95
 
VSTRING *xtext_unquote(VSTRING *unquoted, const char *quoted)
 
102
VSTRING *xtext_unquote_append(VSTRING *unquoted, const char *quoted)
96
103
{
97
104
    const char *cp;
98
105
    int     ch;
99
106
 
100
 
    VSTRING_RESET(unquoted);
101
107
    for (cp = quoted; (ch = *cp) != 0; cp++) {
102
108
        if (ch == '+') {
103
109
            if (ISDIGIT(cp[1]))
123
129
    VSTRING_TERMINATE(unquoted);
124
130
    return (unquoted);
125
131
}
 
132
/* xtext_unquote - quoted data to unquoted */
 
133
 
 
134
VSTRING *xtext_unquote(VSTRING *unquoted, const char *quoted)
 
135
{
 
136
    VSTRING_RESET(unquoted);
 
137
    xtext_unquote_append(unquoted, quoted);
 
138
    return (unquoted);
 
139
}
126
140
 
127
141
#ifdef TEST
128
142