File: test-mapper.cc

package info (click to toggle)
freehdl 0.0.8-2.2
  • links: PTS
  • area: main
  • in suites: buster, sid, stretch
  • size: 8,632 kB
  • ctags: 10,443
  • sloc: cpp: 45,275; sh: 11,405; yacc: 4,206; ansic: 2,026; lex: 486; perl: 430; makefile: 390; tcl: 100
file content (29 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (5)
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
#include <stdio.h>
#include <stdlib.h>

#include "mapping.h"

int
main (int argc, const char **argv)
{
  v2cc_mapper *m = make_v2cc_mapper ();

  m->add_default_libdirs ();

  if (argc == 3)
    {
      char *fn = m->find_design_file (argv[1], argv[2]);
      if (fn)
	{
	  printf ("%s\n", fn);
	  delete fn;
	}
    }
  else
    {
      fprintf (stderr, "usage: %s lib unit\n", argv[0]);
      exit (1);
    }

  exit (0);
}