source: rtems/tools/cpu/nios2/ptf.h @ 5f5f681

4.104.115
Last change on this file since 5f5f681 was 5f5f681, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/10/09 at 07:20:06

Whitespace removal.

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[037e1639]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);
[16fd5a9]43struct ptf *ptf_concat(struct ptf *a, struct ptf *b);
[037e1639]44struct ptf *ptf_alloc_item(ptf_item_type t, char *name, char *value);
45void ptf_printf(FILE *s, struct ptf *tree, char *prefix);
[16fd5a9]46void ptf_dump_ptf_item(FILE *s, struct ptf_item *pi);
[037e1639]47
48struct ptf *ptf_find(
[5f5f681]49  struct ptf *tree,
50  struct ptf_item *item,
[037e1639]51  ptf_item_type ttype,
[5f5f681]52  char *name,
[037e1639]53  char *value);
54
55struct ptf *ptf_next(
[5f5f681]56  struct ptf_item *item,
[037e1639]57  ptf_item_type ttype,
[5f5f681]58  char *name,
[037e1639]59  char *value);
60
61int ptf_match(
62  struct ptf *const ptf,
[5f5f681]63  struct ptf_item *const match,
64  const ptf_match_action action,
[037e1639]65  void *arg);
66
67char *ptf_defused_name(char *);
68
69
70#endif /* !defined(__PTF_H) */
71
Note: See TracBrowser for help on using the repository browser.