2 * Copyright (c) 2003 Stephen Williams (steve@icarus.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)
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
20 #ident "$Id: a_handle_object.c,v 1.2 2003/12/17 15:45:07 steve Exp $"
27 static vpiHandle search_scope
= 0;
29 handle
acc_handle_object(const char*name
)
31 vpiHandle sys
= vpi_handle(vpiSysTfCall
, 0);
32 vpiHandle scope
= search_scope
? search_scope
: vpi_handle(vpiScope
, sys
);
33 vpiHandle res
= vpi_handle_by_name(name
, scope
);
36 fprintf(pli_trace
, "acc_handle_object(%s <scope=%s>) --> .\n",
37 name
, acc_fetch_fullname(scope
));
43 char* acc_set_scope(handle ref
, ...)
48 name
= acc_fetch_fullname(search_scope
);
50 fprintf(pli_trace
, "acc_set_scope(<scope=%s>)\n", name
);
53 return acc_fetch_fullname(ref
);
57 * $Log: a_handle_object.c,v $
58 * Revision 1.2 2003/12/17 15:45:07 steve
59 * Add acc_set_scope function.
61 * Revision 1.1 2003/03/13 04:35:09 steve
62 * Add a bunch of new acc_ and tf_ functions.