Clean up warnings for round() function declaration.
[iverilog.git] / libveriuser / a_handle_tfarg.c
blobc25eba4010e07bdb97d868d72ed36b5add0f658e
1 /* vi:sw=6
2 * Copyright (c) 2002 Michael Ruff (mruff at chiaro.com)
4 * This source code is free software; you can redistribute it
5 * and/or modify it in source code form under the terms of the GNU
6 * General Public License as published by the Free Software
7 * Foundation; either version 2 of the License, or (at your option)
8 * any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19 #ifdef HAVE_CVS_IDENT
20 #ident "$Id: a_handle_tfarg.c,v 1.6 2004/10/04 01:10:56 steve Exp $"
21 #endif
23 #include <acc_user.h>
24 #include <vpi_user.h>
27 * acc_handle_tfarg implemented using VPI interface
29 handle acc_handle_tfarg(int n)
31 vpiHandle sys_h, sys_i, rtn_h = 0;
33 if (n > 0) {
34 sys_h = vpi_handle(vpiSysTfCall, 0 /* NULL */);
35 sys_i = vpi_iterate(vpiArgument, sys_h);
37 /* find nth arg */
38 while (n > 0) {
39 rtn_h = vpi_scan(sys_i);
40 if (rtn_h == 0)
41 break;
42 n--;
45 if (rtn_h) vpi_free_object(sys_i);
47 } else {
48 rtn_h = (vpiHandle) 0;
51 return rtn_h;
54 handle acc_handle_tfinst(void)
56 return vpi_handle(vpiSysTfCall, 0);
60 * $Log: a_handle_tfarg.c,v $
61 * Revision 1.6 2004/10/04 01:10:56 steve
62 * Clean up spurious trailing white space.
64 * Revision 1.5 2003/03/18 01:21:49 steve
65 * Fix warning about uninitialized variable.
67 * Revision 1.4 2003/03/14 04:58:50 steve
68 * Free the iterator when Im done.
70 * Revision 1.3 2003/02/17 06:39:47 steve
71 * Add at least minimal implementations for several
72 * acc_ functions. Add support for standard ACC
73 * string handling.
75 * Add the _pli_types.h header file to carry the
76 * IEEE1364-2001 standard PLI type declarations.
78 * Revision 1.2 2002/08/12 01:35:02 steve
79 * conditional ident string using autoconfig.
81 * Revision 1.1 2002/06/02 19:03:58 steve
82 * Add acc_handle_tfarg and acc_next_topmode