File: meta.c

package info (click to toggle)
snacc 1.3bbn-9.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,484 kB
  • ctags: 4,134
  • sloc: ansic: 35,869; sh: 7,050; cpp: 4,380; yacc: 2,215; lex: 517; makefile: 253; sed: 4
file content (51 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * file: compiler/core/meta.c
 *
 * Copyright  1994 1995 Robert Joop <rj@rainbow.in-berlin.de>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program and the associated libraries are distributed in the hope
 * that they will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License and GNU Library General
 * Public License for more details.
 *
 * $Header: /usr/app/odstb/CVS/snacc/compiler/core/meta.c,v 1.2 1995/08/17 15:00:11 rj Exp $
 * $Log: meta.c,v $
 * Revision 1.2  1995/08/17 15:00:11  rj
 * the PDU flag belongs to the metacode, not only to the tcl interface. (type and variable named adjusted)
 *
 * Revision 1.1  1995/07/27  10:54:11  rj
 * new file
 *
 */

#include <stdio.h>

#include "snacc.h"
#include "meta.h"

#if META

int isMetaPDU PARAMS ((module, type, pdus),
  const char *module _AND_
  const char *type _AND_
  MetaPDU *pdus)
{
  MetaPDU *pdu;

  for (pdu=pdus; pdu; pdu=pdu->next)
    if (!strcmp (pdu->module, module) && !strcmp (pdu->type, type))
    {
      pdu->used = TRUE;
      return TRUE;
    }

  return FALSE;
}

#endif /* META */