~ubuntu-branches/ubuntu/maverick/libxml2/maverick

« back to all changes in this revision

Viewing changes to testRegexp.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-06-23 21:19:36 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080623211936-houumen8pccvs06t
Tags: 2.6.32.dfsg-2ubuntu1
* Merge with Debian; remaining changes:
  - debian/rules: create a udeb for debian-installer, correct libxml2-dev
    Depends to include zlib1g-dev.
  - Build a python-libxml2-dbg package.
  - Link using -Bsymbolic-functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
290
290
 
291
291
        if (argv[i][0] != '-')
292
292
            continue;
 
293
        if (!strcmp(argv[i], "--"))
 
294
            break;
 
295
 
293
296
        if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) {
294
297
            debug++;
295
298
        } else if ((!strcmp(argv[i], "-repeat")) ||
322
325
#endif
323
326
            testRegexpFile(filename);
324
327
    } else {
 
328
        int  data = 0;
325
329
#ifdef LIBXML_EXPR_ENABLED
 
330
 
326
331
        if (use_exp) {
327
332
            for (i = 1; i < argc ; i++) {
328
 
                if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) {
 
333
                if (strcmp(argv[i], "--") == 0)
 
334
                    data = 1;
 
335
                else if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0) ||
 
336
                    (data == 1)) {
329
337
                    if (pattern == NULL) {
330
338
                        pattern = argv[i];
331
339
                        printf("Testing expr %s:\n", pattern);
342
350
                    }
343
351
                }
344
352
            }
345
 
            if (expr != NULL)
 
353
            if (expr != NULL) {
346
354
                xmlExpFree(ctxt, expr);
 
355
                expr = NULL;
 
356
            }
347
357
        } else
348
358
#endif
349
359
        {
350
360
            for (i = 1; i < argc ; i++) {
351
 
                if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) {
 
361
                if (strcmp(argv[i], "--") == 0)
 
362
                    data = 1;
 
363
                else if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0) ||
 
364
                         (data == 1)) {
352
365
                    if (pattern == NULL) {
353
366
                        pattern = argv[i];
354
367
                        printf("Testing %s:\n", pattern);