Add support for text macros with arguments.
[iverilog.git] / vpip / vpi_vlog_info.c
blob696a34c4c6f75971ade9eddae536bdd81463a79d
1 /*
2 * Copyright (c) 2000 Adrian Lewis (indproj@yahoo.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: vpi_vlog_info.c,v 1.3 2002/08/12 01:35:06 steve Exp $"
21 #endif
23 #include <vpi_priv.h>
25 // STORAGE FOR COMMAND LINE ARGUMENTS
27 static int vpip_argc;
28 static char** vpip_argv;
30 // ROUTINE: vpi_get_vlog_info
32 // ARGUMENT: vlog_info_p
33 // Pointer to a structure containing simulation information.
35 // RETURNS:
36 // Boolean: true on success and false on failure.
38 // DESCRIPTION:
39 // Retrieve information about Verilog simulation execution.
41 int
42 vpi_get_vlog_info(p_vpi_vlog_info vlog_info_p)
44 // AUTOMATICALLY UPDATING THE VERSION NUMBER WOULD BE A GOOD IDEA
46 static char* version = "$Name: $";
47 static char* product = "Icarus Verilog";
49 // CHECK THAT THE USER DIDN'T PASS A NULL POINTER
51 if (vlog_info_p != 0)
53 // FILL IN INFORMATION FIELDS
55 vlog_info_p->product = product;
56 vlog_info_p->version = version;
57 vlog_info_p->argc = vpip_argc;
58 vlog_info_p->argv = vpip_argv;
60 return 1==1;
62 else
63 return 1==0;
66 // ROUTINE: vpip_set_vlog_info
68 // ARGUMENTS: argc, argv
69 // Standard command line arguments.
71 // DESCRIPTION:
72 // Saves command line arguments to retrieval by vpi_get_vlog_info.
74 void
75 vpip_set_vlog_info(int argc, char** argv)
77 // SAVE COMMAND LINE ARGUMENTS IN STATIC VARIABLES
79 vpip_argc = argc;
80 vpip_argv = argv;
84 * $Log: vpi_vlog_info.c,v $
85 * Revision 1.3 2002/08/12 01:35:06 steve
86 * conditional ident string using autoconfig.
88 * Revision 1.2 2002/08/11 23:47:05 steve
89 * Add missing Log and Ident strings.