~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/config/mkdepend/ifparser.h

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Xorg: ifparser.h,v 1.3 2000/08/17 19:41:51 cpqbld Exp $
 
3
 *
 
4
 * Copyright 1992 Network Computing Devices, Inc.
 
5
 * 
 
6
 * Permission to use, copy, modify, and distribute this software and its
 
7
 * documentation for any purpose and without fee is hereby granted, provided
 
8
 * that the above copyright notice appear in all copies and that both that
 
9
 * copyright notice and this permission notice appear in supporting
 
10
 * documentation, and that the name of Network Computing Devices may not be
 
11
 * used in advertising or publicity pertaining to distribution of the software
 
12
 * without specific, written prior permission.  Network Computing Devices makes
 
13
 * no representations about the suitability of this software for any purpose.
 
14
 * It is provided ``as is'' without express or implied warranty.
 
15
 * 
 
16
 * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
 
17
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
 
18
 * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
 
19
 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 
20
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 
21
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
22
 * PERFORMANCE OF THIS SOFTWARE.
 
23
 * 
 
24
 * Author:  Jim Fulton
 
25
 *          Network Computing Devices, Inc.
 
26
 * 
 
27
 * Simple if statement processor
 
28
 *
 
29
 * This module can be used to evaluate string representations of C language
 
30
 * if constructs.  It accepts the following grammar:
 
31
 * 
 
32
 *     EXPRESSION       :=      VALUE
 
33
 *                       |      VALUE  BINOP    EXPRESSION
 
34
 *                       |      VALUE   '?'     EXPRESSION ':'  EXPRESSION
 
35
 * 
 
36
 *     VALUE            :=      '('  EXPRESSION  ')'
 
37
 *                       |      '!'  VALUE
 
38
 *                       |      '-'  VALUE
 
39
 *                       |      '~'  VALUE
 
40
 *                       |      'defined'  '('  variable  ')'
 
41
 *                       |      variable
 
42
 *                       |      number
 
43
 * 
 
44
 *     BINOP            :=      '*'     |  '/'  |  '%'
 
45
 *                       |      '+'     |  '-'
 
46
 *                       |      '<<'    |  '>>'
 
47
 *                       |      '<'     |  '>'  |  '<='  |  '>='
 
48
 *                       |      '=='    |  '!='
 
49
 *                       |      '&'     |  '^'  |  '|'
 
50
 *                       |      '&&'    |  '||'
 
51
 * 
 
52
 * The normal C order of precedence is supported.
 
53
 * 
 
54
 * 
 
55
 * External Entry Points:
 
56
 * 
 
57
 *     ParseIfExpression                parse a string for #if
 
58
 */
 
59
 
 
60
/* $XFree86: xc/config/makedepend/ifparser.h,v 3.5 2001/07/25 15:04:40 dawes Exp $ */
 
61
 
 
62
#include <stdio.h>
 
63
 
 
64
typedef int Bool;
 
65
#define False 0
 
66
#define True 1
 
67
 
 
68
typedef struct _if_parser {
 
69
    struct {                            /* functions */
 
70
        const char *(*handle_error) (struct _if_parser *, const char *,
 
71
                                     const char *);
 
72
        long (*eval_variable) (struct _if_parser *, const char *, int);
 
73
        int (*eval_defined) (struct _if_parser *, const char *, int);
 
74
    } funcs;
 
75
    char *data;
 
76
} IfParser;
 
77
 
 
78
const char *ParseIfExpression (
 
79
    IfParser *, 
 
80
    const char *, 
 
81
    long *
 
82
);
 
83