Add support for text macros with arguments.
[iverilog.git] / libveriuser / a_configure.c
blobd224d232e4ca98dbef5913b6e190177560f8937b
1 /*
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)
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_configure.c,v 1.4 2003/12/17 15:45:07 steve Exp $"
21 #endif
23 #include <acc_user.h>
24 #include <vpi_user.h>
25 #include "priv.h"
26 #include <string.h>
28 int acc_configure(PLI_INT32 config_param, const char*value)
30 int rc;
31 switch (config_param) {
32 case accDevelopmentVersion:
33 vpi_printf("Request PLI Development Version %s\n", value);
34 rc = 1;
36 if (pli_trace) {
37 fprintf(pli_trace,
38 "acc_configure(accDevelopmentVersion, %s)\n",
39 value);
41 break;
43 case accEnableArgs:
45 if (pli_trace) {
46 fprintf(pli_trace, "acc_configure(accEnableArgs, %s)\n",
47 value);
50 rc = 1;
51 if (strcmp(value,"acc_set_scope") == 0) {
52 vpi_printf("XXXX acc_configure argument: Sorry: "
53 "(accEnableArgs, %s\n", value);
54 rc = 0;
56 } else if (strcmp(value,"no_acc_set_scope") == 0) {
57 vpi_printf("XXXX acc_configure argument: Sorry: "
58 "(accEnableArgs, %s\n", value);
59 rc = 0;
61 } else {
62 vpi_printf("XXXX acc_configure argument error. "
63 "(accEnableArgs, %s(invalid)\n", value);
64 rc = 0;
67 break;
69 default:
71 if (pli_trace) {
72 fprintf(pli_trace, "acc_configure(config=%d, %s)\n",
73 config_param, value);
76 vpi_printf("XXXX acc_configure(%d, %s)\n", config_param, value);
77 rc = 0;
78 break;
81 return rc;
85 * $Log: a_configure.c,v $
86 * Revision 1.4 2003/12/17 15:45:07 steve
87 * Add acc_set_scope function.
89 * Revision 1.3 2003/06/17 16:55:07 steve
90 * 1) setlinebuf() for vpi_trace
91 * 2) Addes error checks for trace file opens
92 * 3) removes now extraneous flushes
93 * 4) fixes acc_next() bug
95 * Revision 1.2 2003/05/18 00:16:35 steve
96 * Add PLI_TRACE tracing of PLI1 modules.
98 * Add tf_isetdelay and friends, and add
99 * callback return values for acc_vcl support.
101 * Revision 1.1 2003/02/17 06:39:47 steve
102 * Add at least minimal implementations for several
103 * acc_ functions. Add support for standard ACC
104 * string handling.
106 * Add the _pli_types.h header file to carry the
107 * IEEE1364-2001 standard PLI type declarations.