source: rtems/tools/cpu/nios2/ptf.h @ 16fd5a9

4.104.114.84.9
Last change on this file since 16fd5a9 was 16fd5a9, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 15, 2006 at 9:02:55 PM

2006-08-15 Kolja Waschk <kawk@…>

  • linkcmds.c, linkcmds.h, memory.c, memory.h, sample.ptf: New files.
  • bridges.c: corrected detection of bridged connections
  • clocks.c: removed a printf
  • linkcmds.[ch] new files, added output of linker script
  • Makefile.am: added new files
  • memory.[ch]: new files, detection of memory in SOPC configuration
  • nios2gen.c: updated command line parsing and output control
  • output.[ch]: improved output of BSP header file
  • ptf.[ch]: added ptf_dump_ptf_item and small fixes
  • sample.ptf: new file, sample configuration for nios2gen
  • README: updated
  • Property mode set to 100644
File size: 1.3 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_concat(struct ptf *a, struct ptf *b);
44struct ptf *ptf_alloc_item(ptf_item_type t, char *name, char *value);
45void ptf_printf(FILE *s, struct ptf *tree, char *prefix);
46void ptf_dump_ptf_item(FILE *s, struct ptf_item *pi);
47
48struct ptf *ptf_find(
49  struct ptf *tree, 
50  struct ptf_item *item, 
51  ptf_item_type ttype,
52  char *name, 
53  char *value);
54
55struct ptf *ptf_next(
56  struct ptf_item *item, 
57  ptf_item_type ttype,
58  char *name, 
59  char *value);
60
61int ptf_match(
62  struct ptf *const ptf,
63  struct ptf_item *const match, 
64  const ptf_match_action action, 
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.