int i;
for (i = 0; i < len; i++)
- rgbValueBindRow[i] = toupper(neut_str[i]);
+ rgbValueBindRow[i] = toupper((UCHAR) neut_str[i]);
rgbValueBindRow[i] = '\0';
mylog("PG_TYPE_UUID: rgbValueBindRow = '%s'\n", rgbValueBindRow);
}
wstrlen = utf8_to_ucs2_lf(neut_str, SQL_NTS, lf_conv, NULL, 0);
allocbuf = (SQLWCHAR *) malloc(WCLEN * (wstrlen + 1));
wstrlen = utf8_to_ucs2_lf(neut_str, SQL_NTS, lf_conv, allocbuf, wstrlen + 1);
- len = wstrtomsg(NULL, (LPCWSTR) allocbuf, (int) wstrlen, NULL, 0);
+ len = wstrtomsg(NULL, (const LPWSTR) allocbuf, (int) wstrlen, NULL, 0);
changed = TRUE;
}
else
SQL_NUMERIC_STRUCT *ns;
int i, nlen, bit, hval, tv, dig, sta, olen;
char calv[SQL_MAX_NUMERIC_LEN * 3];
- const char *wv;
+ const UCHAR *wv;
BOOL dot_exist;
len = sizeof(SQL_NUMERIC_STRUCT);
#define FLGP_MULTIPLE_STATEMENT (1L << 5)
#define FLGP_SELECT_FOR_READONLY (1L << 6)
typedef struct _QueryParse {
- const char *statement;
+ const UCHAR *statement;
int statement_type;
size_t opos;
Int4 from_pos; /* PG comm length restriction */
#define FLGB_LITERAL_EXTENSION (1L << 10)
#define FLGB_HEX_BIN_FORMAT (1L << 11)
typedef struct _QueryBuild {
- char *query_statement;
+ UCHAR *query_statement;
size_t str_size_limit;
size_t str_alsize;
size_t npos;
QueryParse query_org, *qp;
QueryBuild query_crt, *qb;
- char *new_statement;
+ UCHAR *new_statement;
BOOL begin_first = FALSE, prepare_dummy_cursor = FALSE, bPrepConv;
ConnectionClass *conn = SC_get_conn(stmt);
PG_VERSION_GE(conn, 8.3))
{
BOOL semi_colon_found = FALSE;
- const char *ptr = NULL, semi_colon = ';';
+ const UCHAR *ptr = NULL, semi_colon = ';';
int npos;
if (npos = F_NewPos(qb) - 1, npos >= 0)
}
static
-Int4 findIdentifier(const char *str, int ccsc, const char **nextdel)
+Int4 findIdentifier(const UCHAR *str, int ccsc, const UCHAR **nextdel)
{
Int4 strlen = 0;
encoded_str encstr;
unsigned char tchar;
- const char *sptr;
+ const UCHAR *sptr;
BOOL dquote = FALSE;
*nextdel = NULL;
{
for (; *sptr; sptr++)
{
- if (!isspace(*sptr))
+ if (!isspace((UCHAR) *sptr))
{
*nextdel = sptr;
break;
qb->dollar_number = 0;
if (0 != (qp->flags & FLGP_USING_CURSOR))
{
- const char *vp = &(qp->statement[qp->opos + 1]);
+ const UCHAR *vp = &(qp->statement[qp->opos + 1]);
while (*vp && isspace(*vp))
vp++;
{
SQLGUID *g = (SQLGUID *) buffer;
snprintf (param_string, sizeof(param_string),
- "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+ "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
g->Data1,
g->Data2, g->Data3,
g->Data4[0], g->Data4[1], g->Data4[2], g->Data4[3],
if (stricmp(key, "call") == 0)
{
Int4 funclen;
- const char *nextdel;
+ const UCHAR *nextdel;
if (SQL_ERROR == QB_start_brace(qb))
{
if (2 == param_count)
{
BOOL add_cast = FALSE, add_quote = FALSE;
- const char *pptr;
+ const UCHAR *pptr;
from = param_pos[0][0];
to = param_pos[0][1];
}
else
{
- const char *mapptr;
+ const UCHAR *mapptr;
SQLLEN paramlen;
int pidx;
i = 0;
while (table_type[i])
{
- char *typestr = table_type[i];
+ UCHAR *typestr = (UCHAR *) table_type[i];
while (isspace(*typestr))
typestr++;
TupleField *tuple;
char *schema_name, *procname;
char *escSchemaName = NULL, *escProcName = NULL;
- char *params, *proargnames, *proargmodes, *delim = NULL;
+ UCHAR *params, *proargnames, *proargmodes, *delim = NULL;
char *atttypid, *attname, *column_name;
QResultClass *res, *tres;
SQLLEN tcount;