source: rtems/tools/cpu/nios2/ptf.h @ 037e1639

4.104.114.84.9
Last change on this file since 037e1639 was 037e1639, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 9, 2006 at 9:05:32 PM

2006-08-09 Kolja Waschk <waschk@…>

  • configure.ac: New port to Altera NIOS II.
  • nios2/.cvsignore, nios2/Makefile.am, nios2/README, nios2/bridges.c, nios2/bridges.h, nios2/clocks.c, nios2/clocks.h, nios2/configure.ac, nios2/devices.c, nios2/devices.h, nios2/nios2gen.c, nios2/output.c, nios2/output.h, nios2/ptf.c, nios2/ptf.h: New files.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.com/license/LICENSE.
7 *
8 *  $Id$
9 */
10
11#if !defined(__PTF_H)
12#define __PTF_H 1
13
14#include <stdio.h>
15
16#define MAX_SECTION_NESTING 20
17
18typedef enum
19{
20  item, section
21}
22ptf_item_type;
23
24struct ptf
25{
26  ptf_item_type type;
27  char *name;
28  char *value;
29  struct ptf *sub;
30  struct ptf *next;
31};
32
33struct ptf_item
34{
35  int level;
36  struct ptf *item[MAX_SECTION_NESTING];
37};
38
39
40typedef void (*ptf_match_action)(struct ptf_item *x, void *arg);
41
42struct ptf *ptf_parse_file(char *filename);
43struct ptf *ptf_alloc_item(ptf_item_type t, char *name, char *value);
44void ptf_printf(FILE *s, struct ptf *tree, char *prefix);
45
46struct ptf *ptf_find(
47  struct ptf *tree, 
48  struct ptf_item *item, 
49  ptf_item_type ttype,
50  char *name, 
51  char *value);
52
53struct ptf *ptf_next(
54  struct ptf_item *item, 
55  ptf_item_type ttype,
56  char *name, 
57  char *value);
58
59int ptf_match(
60  struct ptf *const ptf,
61  struct ptf_item *const match, 
62  const ptf_match_action action, 
63  void *arg);
64
65char *ptf_defused_name(char *);
66
67
68#endif /* !defined(__PTF_H) */
69
Note: See TracBrowser for help on using the repository browser.