Support for wide modulus operations.
[iverilog.git] / libveriuser / priv.c
blobcd3355617e645d72e882485f56ebdc660c06b85d
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: priv.c,v 1.3 2003/05/18 00:16:35 steve Exp $"
21 #endif
23 # include "priv.h"
24 # include <string.h>
25 # include <assert.h>
27 FILE* pli_trace = 0;
29 static char string_buffer[8192];
30 static unsigned string_fill = 0;
32 static void buffer_reset(void)
34 string_fill = 0;
37 char* __acc_newstring(const char*txt)
39 char*res;
40 unsigned len;
42 if (txt == 0)
43 return 0;
45 len = strlen(txt);
46 assert(len < sizeof string_buffer);
48 if ((string_fill + len + 1) >= sizeof string_buffer)
49 buffer_reset();
51 res = string_buffer + string_fill;
52 strcpy(string_buffer + string_fill, txt);
54 string_fill += len + 1;
56 return res;
60 * $Log: priv.c,v $
61 * Revision 1.3 2003/05/18 00:16:35 steve
62 * Add PLI_TRACE tracing of PLI1 modules.
64 * Add tf_isetdelay and friends, and add
65 * callback return values for acc_vcl support.
67 * Revision 1.2 2003/03/13 05:07:46 steve
68 * Declaration warnings.
70 * Revision 1.1 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.