**********************************************************************/
/* AIS: From clc-cset.c */
-extern int ick_clc_cset_convert(char* in, /*@partial@*/ char* out, char* incset,
- char* outcset, int padstyle, size_t outsize,
+extern int ick_clc_cset_convert(const char* in, /*@partial@*/ char* out, const char* incset,
+ const char* outcset, int padstyle, size_t outsize,
/*@null@*/ FILE* errsto);
static void clcbinin(unsigned int type, ick_array *a, ick_bool forget)
free(buf);
}
-static void clcbinout(unsigned int type, ick_array* a)
+static void clcbinout(unsigned int type, const ick_array* a)
{
size_t i;
int ti;
}
}
-void ick_binout(unsigned int type, ick_array *a)
+void ick_binout(unsigned int type, const ick_array *a)
{
static unsigned int lastout = 0;
unsigned int c;
else if (!forget) {
if(oo) oo[index]=sp->overloadinfo; /* AIS */
if (type == ick_ONESPOT)
- memcpy(to, (char *)&sp->save.onespot, sizeof(ick_type16));
+ memcpy(to, (const char *)&sp->save.onespot, sizeof(ick_type16));
else if (type == ick_TWOSPOT)
- memcpy(to, (char *)&sp->save.twospot, sizeof(ick_type32));
+ memcpy(to, (const char *)&sp->save.twospot, sizeof(ick_type32));
else if (type == ick_TAIL || type == ick_HYBRID) {
ick_array *a = (ick_array*)to;
/*@-branchstate@*/ /* it's a union, so one valid is correct */
free(a->data.tail);
else
free(a->data.hybrid);
- memcpy(to, (char*)sp->save.a, sizeof(ick_array));
+ memcpy(to, (const char*)sp->save.a, sizeof(ick_array));
}
/*@=branchstate@*/
/* AIS: there isn't a memory leak here, because we memcpyd the
/*@-mustfreefresh@*/
/* because Splint doesn't understand how findandfopen works */
-static void ick_clc_cset_load(/*@unique@*/ struct cset* cs, /*@unique@*/ char* fname)
+static void ick_clc_cset_load(/*@unique@*/ struct cset* cs, /*@unique@*/ const char* fname)
{
FILE* in;
char buf[13]; /* enough for an 8.3 filename */
/*@=mustfreefresh@*/
/* Helper function for fixing bit order in output. */
-static void ick_bitencout(char** pop, struct cset* co,
+static void ick_bitencout(char** pop, const struct cset* co,
unsigned short val, int padstyle)
{
unsigned short outword=0;
* outsize-1 characters and a NUL will be written to out. The code is
* conservative about this; to be safe, make outsize six times as long
* as the in is (including in's terminal NUL), plus 6. */
-int ick_clc_cset_convert(char* in, /*@partial@*/ char* out, char* incset,
- char* outcset, int padstyle, size_t outsize,
+int ick_clc_cset_convert(const char* in, /*@partial@*/ char* out, const char* incset,
+ const char* outcset, int padstyle, size_t outsize,
/*@null@*/ FILE* errsto)
{
int ic=-1, oc=-1;
int i;
int ssi, sso;
unsigned short tus, csi;
- char* ip, *op;
+ const char* ip;
+ char* op;
struct cset *csri, *csro;
int noconvwarn=0;
int substwarn=0;
#include <string.h>
#include <unistd.h>
-int ick_clc_cset_convert(char* in, /*@partial@*/ char* out, char* incset,
- char* outcset, int padstyle, size_t outsize,
- /*@null@*/ FILE* errsto);
+extern int ick_clc_cset_convert(const char* in, /*@partial@*/ char* out, const char* incset,
+ const char* outcset, int padstyle, size_t outsize,
+ /*@null@*/ FILE* errsto);
/* For communication with clc_cset.c */
/*@observer@*/ char* ick_globalargv0;