~ubuntu-branches/ubuntu/raring/autofs5/raring

« back to all changes in this revision

Viewing changes to lib/master_tok.l

  • Committer: Bazaar Package Importer
  • Author(s): Jan Christoph Nordholz
  • Date: 2009-03-09 01:16:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090309011648-gjynlid883f0s2c4
Tags: 5.0.4-1
* New upstream version (5.0.4 plus patchset as of 2009/03/09).
  * Closes: #518728.
  * Remove dpatch 14, applied upstream.
* New dpatch 14 to avoid using the relatively young SOCK_CLOEXEC
  feature.
* Only invoke 'make clean' on clean target so ./configure isn't
  purged.
* Fix a typo in the postinst regarding the ucf conffile handling.
* Add 'set -e' to package maintenance scripts.
* Drop unnecessary /var/run/autofs from package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
char buff[1024];
78
78
char *bptr;
79
79
char *optr = buff;
 
80
unsigned int tlen;
80
81
 
81
82
%}
82
83
 
98
99
DNSERVSTR2      (\/\/[[:alpha:]][[:alnum:]\-.]*(:[0-9]+)?\/)
99
100
DNSERVSTR3      (([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}(:[0-9]+)?:)
100
101
DNSERVSTR4      (\/\/([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}(:[0-9]+)?\/)
101
 
DNSERVERSTR     {DNSERVSTR1}|{DNSERVSTR2}|{DNSERVSTR3}|{DNSERVSTR4}
 
102
DNSERVERSTR     ({DNSERVSTR1}|{DNSERVSTR2}|{DNSERVSTR3}|{DNSERVSTR4})
102
103
 
103
104
AT_CN           ([cC][[nN])
104
105
AT_NMN          ([nN][iI][sS][Mm][aA][pP][Nn][aA][mM][eE])
107
108
AT_DC           ([dD][[cC])
108
109
AT_O            ([oO])
109
110
AT_C            ([cC])
110
 
DNATTRSTR       {AT_CN}|{AT_NMN}|{AT_AMN}|{AT_OU}|{AT_DC}|{AT_O}|{AT_C}
 
111
DNATTRSTR       ({AT_CN}|{AT_NMN}|{AT_AMN}|{AT_OU}|{AT_DC}|{AT_O}|{AT_C})
111
112
DNNAMESTR1      ([[:alnum:]_.\- ]+)
112
113
DNNAMESTR2      ([[:alnum:]_.\-]+)
113
114
 
190
191
        {OPTWS}\\\n{OPTWS} {}
191
192
 
192
193
        {MULTI} {
193
 
                strcpy(master_lval.strtype, master_text);
194
 
                return(MULTITYPE);
 
194
                tlen = master_leng - 1;
 
195
                if (bptr != buff && isblank(master_text[tlen])) {
 
196
                        strncat(buff, master_text, tlen);
 
197
                        bptr += tlen;
 
198
                        yyless(tlen);
 
199
                } else {
 
200
                        strcpy(master_lval.strtype, master_text);
 
201
                        return(MULTITYPE);
 
202
                }
195
203
        }
196
204
 
197
 
        {MTYPE} {
198
 
                strcpy(master_lval.strtype, master_text);
199
 
                return(MAPTYPE);
 
205
        {MTYPE} |
 
206
        {MTYPE}/{DNSERVERSTR}{DNATTRSTR} |
 
207
        {MTYPE}/{DNATTRSTR}= {
 
208
                tlen = master_leng - 1;
 
209
                if (bptr != buff && isblank(master_text[tlen])) {
 
210
                        strncat(buff, master_text, tlen);
 
211
                        bptr += tlen;
 
212
                        yyless(tlen);
 
213
                } else {
 
214
                        strcpy(master_lval.strtype, master_text);
 
215
                        return(MAPTYPE);
 
216
                }
200
217
        }
201
218
 
202
219
        {MULTISEP} { return(DDASH); }
215
232
                return MAPNULL;
216
233
        }
217
234
 
 
235
        "-xfn" {
 
236
                BEGIN(OPTSTR);
 
237
                strcpy(master_lval.strtype, master_text);
 
238
                return MAPXFN;
 
239
        }
 
240
 
218
241
        "//" {
219
242
                BEGIN(DNSTR);
220
243
                yyless(0);
221
244
        }
222
245
 
223
 
        {DNSERVERSTR} {
 
246
        {DNSERVERSTR}{DNATTRSTR} {
224
247
                BEGIN(DNSTR);
225
248
                yyless(0);
226
249
        }
283
306
                return EQUAL;
284
307
        }
285
308
 
286
 
        {DNNAMESTR1}/"," {
 
309
        {DNNAMESTR1}/","{DNATTRSTR}"=" {
287
310
                strcpy(master_lval.strtype, master_text);
288
311
                return DNNAME;
289
312
        }