more type cleanup

This commit is contained in:
2018-06-11 17:16:38 +02:00
parent 8dde86dae7
commit ded9bd2b4d
9 changed files with 91 additions and 79 deletions

View File

@ -41,6 +41,8 @@ extern "C" {
#include "asynUInt32Digital.h"
#include "asynGpibDriver.h"
#define Z PRINTF_SIZE_T_PREFIX
/* How things are implemented:
synchonous io:
@ -157,13 +159,13 @@ class AsynDriverInterface : StreamBusInterface
double writeTimeout;
double readTimeout;
double replyTimeout;
long expectedLength;
size_t expectedLength;
unsigned long eventMask;
unsigned long receivedEvent;
StreamBuffer inputBuffer;
const char* outputBuffer;
size_t outputSize;
int peeksize;
size_t peeksize;
#ifdef EPICS_3_13
WDOG_ID timer;
CALLBACK timeoutCallback;
@ -182,7 +184,7 @@ class AsynDriverInterface : StreamBusInterface
bool writeRequest(const void* output, size_t size,
unsigned long writeTimeout_ms);
bool readRequest(unsigned long replyTimeout_ms,
unsigned long readTimeout_ms, long expectedLength, bool async);
unsigned long readTimeout_ms, size_t expectedLength, bool async);
bool acceptEvent(unsigned long mask, unsigned long replytimeout_ms);
bool supportsEvent();
bool supportsAsyncRead();
@ -680,8 +682,8 @@ writeHandler()
if (status == asynError || received == 0) break;
#ifndef NO_TEMPORARY
if (received) debug("AsynDriverInterface::writeHandler(%s): "
"flushing %ld bytes: \"%s\"\n",
clientName(), (long)received, StreamBuffer(buffer, received).expand()());
"flushing %" Z "u bytes: \"%s\"\n",
clientName(), received, StreamBuffer(buffer, received).expand()());
#endif
} while (status == asynSuccess);
}
@ -722,11 +724,11 @@ writeHandler()
outputBuffer, outputSize, &written);
#ifndef NO_TEMPORARY
debug("AsynDriverInterface::writeHandler(%s): "
"write(..., \"%s\", outputSize=%ld, written=%ld) "
"write(..., \"%s\", outputSize=%" Z "u, written=%" Z "u) "
"[timeout=%g sec] = %s (%s)\n",
clientName(),
StreamBuffer(outputBuffer, outputSize).expand()(),
(long)outputSize, (long)written,
outputSize, written,
pasynUser->timeout, asynStatusStr[status],
pasynUser->errorMessage);
#endif
@ -809,10 +811,10 @@ writeHandler()
// interface function: we want to read something
bool AsynDriverInterface::
readRequest(unsigned long replyTimeout_ms, unsigned long readTimeout_ms,
long _expectedLength, bool async)
size_t _expectedLength, bool async)
{
debug("AsynDriverInterface::readRequest(%s, %ld msec reply, "
"%ld msec read, expect %ld bytes, async=%s)\n",
"%ld msec read, expect %" Z "u bytes, async=%s)\n",
clientName(), replyTimeout_ms, readTimeout_ms,
_expectedLength, async?"yes":"no");
@ -892,13 +894,13 @@ readHandler()
oldeoslen = -1;
} else do {
// device (e.g. GPIB) might not accept full eos length
if ((int)deveoslen == oldeoslen && strcmp(deveos, oldeos) == 0)
if (deveoslen == (size_t)oldeoslen && strcmp(deveos, oldeos) == 0)
{
// nothing to do: old and new eos are the same
break;
}
if (pasynOctet->setInputEos(pvtOctet, pasynUser,
deveos, deveoslen) == asynSuccess)
deveos, (int)deveoslen) == asynSuccess)
{
#ifndef NO_TEMPORARY
if (ioAction != AsyncRead)
@ -921,8 +923,8 @@ readHandler()
} while (deveoslen);
}
long bytesToRead = peeksize;
long buffersize;
size_t bytesToRead = peeksize;
size_t buffersize;
if (expectedLength > 0)
{
@ -954,7 +956,7 @@ readHandler()
size_t received;
int eomReason;
asynStatus status;
long readMore;
ssize_t readMore;
int connected;
while (1)
@ -965,17 +967,18 @@ readHandler()
pasynUser->errorMessage[0] = 0;
debug("AsynDriverInterface::readHandler(%s): ioAction=%s "
"read(..., bytesToRead=%ld, ...) "
"read(..., bytesToRead=%" Z "u, ...) "
"[timeout=%g sec]\n",
clientName(), ioActionStr[ioAction],
bytesToRead, pasynUser->timeout);
status = pasynOctet->read(pvtOctet, pasynUser,
buffer, bytesToRead, &received, &eomReason);
// Even though received is size_t I have seen (size_t)-1 here!
#ifndef NO_TEMPORARY
debug("AsynDriverInterface::readHandler(%s): "
"read returned %s: ioAction=%s received=%ld, eomReason=%s, buffer=\"%s\"\n",
"read returned %s: ioAction=%s received=%" Z "d, eomReason=%s, buffer=\"%s\"\n",
clientName(), asynStatusStr[status], ioActionStr[ioAction],
(long)received,eomReasonStr[eomReason&0x7],
received,eomReasonStr[eomReason&0x7],
StreamBuffer(buffer, received).expand()());
#endif
pasynManager->isConnected(pasynUser, &connected);
@ -1003,9 +1006,9 @@ readHandler()
{
#ifndef NO_TEMPORARY
debug("AsynDriverInterface::readHandler(%s): "
"AsyncRead poll: received %ld of %ld bytes \"%s\" "
"AsyncRead poll: received %" Z "d of %" Z "u bytes \"%s\" "
"eomReason=%s [data ignored]\n",
clientName(), (long)received, bytesToRead,
clientName(), received, bytesToRead,
StreamBuffer(buffer, received).expand()(),
eomReasonStr[eomReason&0x7]);
#endif
@ -1018,9 +1021,9 @@ readHandler()
}
#ifndef NO_TEMPORARY
debug("AsynDriverInterface::readHandler(%s): "
"received %ld of %ld bytes \"%s\" "
"received %" Z "d of %" Z "u bytes \"%s\" "
"eomReason=%s\n",
clientName(), (long)received, bytesToRead,
clientName(), received, bytesToRead,
StreamBuffer(buffer, received).expand()(),
eomReasonStr[eomReason&0x7]);
#endif
@ -1041,7 +1044,7 @@ readHandler()
size_t i;
for (i = 0; i < deveoslen; i++, received++)
{
if ((int)received >= 0) buffer[received] = deveos[i];
if ((ssize_t)received >= 0) buffer[received] = deveos[i];
// It is safe to add to buffer here, because
// the terminator was already there before
// asynOctet->read() had cut it.
@ -1081,9 +1084,9 @@ readHandler()
#ifndef NO_TEMPORARY
debug("AsynDriverInterface::readHandler(%s): "
"ioAction=%s, timeout [%g sec] "
"after %ld of %ld bytes \"%s\"\n",
"after %" Z "d of %" Z "u bytes \"%s\"\n",
clientName(), ioActionStr[ioAction], pasynUser->timeout,
(long)received, bytesToRead,
received, bytesToRead,
StreamBuffer(buffer, received).expand()());
#endif
if (ioAction == AsyncRead || ioAction == AsyncReadMore)
@ -1144,7 +1147,7 @@ readHandler()
bytesToRead = inputBuffer.capacity();
}
debug("AsynDriverInterface::readHandler(%s) "
"readMore=%ld bytesToRead=%ld\n",
"readMore=%" Z "d bytesToRead=%" Z "u\n",
clientName(), readMore, bytesToRead);
pasynUser->timeout = readTimeout;
waitForReply = false;
@ -1204,7 +1207,7 @@ asynReadHandler(const char *buffer, size_t received, int eomReason)
#endif
ioAction = None;
long readMore = 1;
ssize_t readMore = 1;
if (received)
{
// At the moment, it seems that asynDriver does not cut off
@ -1281,7 +1284,7 @@ asynReadHandler(const char *buffer, size_t received, int eomReason)
ioAction = AsyncReadMore;
startTimer(readTimeout);
}
debug("AsynDriverInterface::asynReadHandler(%s) readMore=%li, ioAction=%s \n",
debug("AsynDriverInterface::asynReadHandler(%s) readMore=%" Z "d, ioAction=%s \n",
clientName(), readMore, ioActionStr[ioAction]);
}

View File

@ -21,6 +21,8 @@
#include "StreamError.h"
#include "StreamBuffer.h"
#define Z PRINTF_SIZE_T_PREFIX
// This is a non-blocking bus interface for debugging purpose.
// Normally, a bus interface will use blocking I/O and thus require
// a separate thread.
@ -35,7 +37,7 @@ class DebugInterface : StreamBusInterface
bool writeRequest(const void* output, size_t size,
unsigned long writeTimeout_ms);
bool readRequest(unsigned long replyTimeout_ms,
unsigned long readTimeout_ms, long expectedLength, bool async);
unsigned long readTimeout_ms, size_t expectedLength, bool async);
protected:
~DebugInterface();
@ -167,9 +169,9 @@ writeRequest(const void* output, size_t size, unsigned long writeTimeout_ms)
// Return false if the read request cannot be accepted.
bool DebugInterface::
readRequest(unsigned long replyTimeout_ms, unsigned long readTimeout_ms,
long expectedLength, bool async)
size_t expectedLength, bool async)
{
debug("DebugInterface::readRequest(%s, %ld msec reply, %ld msec read, expect %ld bytes, asyn=%s)\n",
debug("DebugInterface::readRequest(%s, %ld msec reply, %ld msec read, expect %" Z "u bytes, asyn=%s)\n",
clientName(), replyTimeout_ms, readTimeout_ms, expectedLength, async?"yes":"no");
// Debug interface does not support async mode.

View File

@ -70,7 +70,7 @@ printDouble(const StreamFormat& fmt, StreamBuffer& output, double value)
// Have to divide value into mantissa and exponent
// precision field is number of characters in mantissa
// number of characters in exponent is at least 2
size_t spaces;
ssize_t spaces;
StreamBuffer buf;
int prec = fmt.prec;

View File

@ -22,6 +22,9 @@
#include "StreamError.h"
#include "string.h"
#include "pcre.h"
#include <limits.h>
#define Z PRINTF_SIZE_T_PREFIX
// Perl regular expressions (PCRE) %/regexp/ and %#/regexp/subst/
@ -121,17 +124,19 @@ scanString(const StreamFormat& fmt, const char* input,
{
int ovector[30];
int rc;
unsigned int l;
size_t l;
const char* info = fmt.info;
pcre* code = extract<pcre*>(info);
int length = fmt.width > 0 ? fmt.width : strlen(input);
size_t length = fmt.width > 0 ? fmt.width : strlen(input);
int subexpr = fmt.prec > 0 ? fmt.prec : 0;
if (length > INT_MAX)
length = INT_MAX;
debug("input = \"%s\"\n", input);
debug("length=%d\n", length);
debug("length=%" Z "u\n", length);
rc = pcre_exec(code, NULL, input, length, 0, 0, ovector, 30);
debug("pcre_exec match \"%.*s\" result = %d\n", length, input, rc);
rc = pcre_exec(code, NULL, input, (int)length, 0, 0, ovector, 30);
debug("pcre_exec match \"%.*s\" result = %d\n", (int)length, input, rc);
if ((subexpr && rc <= subexpr) || rc < 0)
{
// error or no match or not enough sub-expressions
@ -142,9 +147,9 @@ scanString(const StreamFormat& fmt, const char* input,
l = ovector[subexpr*2+1] - ovector[subexpr*2];
if (l >= size) {
if (!(fmt.flags & sign_flag)) {
error("Regexp: Matching string \"%s\" too long (%d>%ld bytes). You may want to try the + flag: \"%%+/.../\"\n",
error("Regexp: Matching string \"%s\" too long (%" Z "u>%" Z "u bytes). You may want to try the + flag: \"%%+/.../\"\n",
StreamBuffer(input + ovector[subexpr*2],l).expand()(),
l, (long)size-1);
l, size-1);
return -1;
}
l = size-1;
@ -155,11 +160,11 @@ scanString(const StreamFormat& fmt, const char* input,
return ovector[1]; // consume input until end of match
}
static void regsubst(const StreamFormat& fmt, StreamBuffer& buffer, long start)
static void regsubst(const StreamFormat& fmt, StreamBuffer& buffer, size_t start)
{
const char* subst = fmt.info;
pcre* code = extract<pcre*>(subst);
unsigned long length, c;
size_t length, c;
int rc, l, r, rl, n;
int ovector[30];
StreamBuffer s;
@ -167,15 +172,17 @@ static void regsubst(const StreamFormat& fmt, StreamBuffer& buffer, long start)
length = buffer.length() - start;
if (fmt.width && fmt.width < length)
length = fmt.width;
if (length > INT_MAX)
length = INT_MAX;
if (fmt.flags & sign_flag)
start = buffer.length() - length;
debug("regsubst buffer=\"%s\", start=%ld, length=%ld, subst = \"%s\"\n",
debug("regsubst buffer=\"%s\", start=%" Z "u, length=%" Z "u, subst = \"%s\"\n",
buffer.expand()(), start, length, subst);
for (c = 0, n = 1; c < length; n++)
{
rc = pcre_exec(code, NULL, buffer(start+c), length-c, 0, 0, ovector, 30);
rc = pcre_exec(code, NULL, buffer(start+c), (int)(length-c), 0, 0, ovector, 30);
debug("pcre_exec match \"%.*s\" result = %d\n", (int)(length-c), buffer(start+c), rc);
if (rc < 0) // no match
return;

View File

@ -106,7 +106,7 @@ writeRequest(const void*, size_t, unsigned long)
}
bool StreamBusInterface::
readRequest(unsigned long, unsigned long, long, bool)
readRequest(unsigned long, unsigned long, size_t, bool)
{
return false;
}
@ -126,8 +126,8 @@ writeCallback(StreamIoStatus)
{
}
long StreamBusInterface::Client::
readCallback(StreamIoStatus, const void*, long)
ssize_t StreamBusInterface::Client::
readCallback(StreamIoStatus, const void*, size_t)
{
return 0;
}

View File

@ -51,8 +51,8 @@ public:
friend class StreamBusInterface;
virtual void lockCallback(StreamIoStatus status) = 0;
virtual void writeCallback(StreamIoStatus status);
virtual long readCallback(StreamIoStatus status,
const void* input, long size);
virtual ssize_t readCallback(StreamIoStatus status,
const void* input, size_t size);
virtual void eventCallback(StreamIoStatus status);
virtual void connectCallback(StreamIoStatus status);
virtual void disconnectCallback(StreamIoStatus status);
@ -88,7 +88,7 @@ public:
return businterface && businterface->writeRequest(output, size, timeout_ms);
}
bool busReadRequest(unsigned long replytimeout_ms,
unsigned long readtimeout_ms, long expectedLength,
unsigned long readtimeout_ms, size_t expectedLength,
bool async) {
return businterface && businterface->readRequest(replytimeout_ms,
readtimeout_ms, expectedLength, async);
@ -123,8 +123,8 @@ protected:
{ client->lockCallback(status); }
void writeCallback(StreamIoStatus status)
{ client->writeCallback(status); }
long readCallback(StreamIoStatus status,
const void* input = NULL, long size = 0)
ssize_t readCallback(StreamIoStatus status,
const void* input = NULL, size_t size = 0)
{ return client->readCallback(status, input, size); }
void eventCallback(StreamIoStatus status)
{ client->eventCallback(status); }
@ -143,7 +143,7 @@ protected:
virtual bool writeRequest(const void* output, size_t size,
unsigned long timeout_ms);
virtual bool readRequest(unsigned long replytimeout_ms,
unsigned long readtimeout_ms, long expectedLength,
unsigned long readtimeout_ms, size_t expectedLength,
bool async);
virtual bool supportsEvent(); // defaults to false
virtual bool supportsAsyncRead(); // defaults to false

View File

@ -23,7 +23,7 @@
#include <ctype.h>
#include <stdlib.h>
#define P PRINTF_SIZE_T_PREFIX
#define Z PRINTF_SIZE_T_PREFIX
enum Commands { end_cmd, in_cmd, out_cmd, wait_cmd, event_cmd, exec_cmd,
connect_cmd, disconnect_cmd };
@ -900,7 +900,7 @@ bool StreamCore::
evalIn()
{
flags |= AcceptInput;
long expectedInput;
ssize_t expectedInput;
expectedInput = maxInput;
if (unparsedInput)
@ -935,9 +935,9 @@ evalIn()
return true;
}
long StreamCore::
ssize_t StreamCore::
readCallback(StreamIoStatus status,
const void* input, long size)
const void* input, size_t size)
// returns number of bytes to read additionally
{
@ -951,7 +951,7 @@ readCallback(StreamIoStatus status,
lastInputStatus = status;
#ifndef NO_TEMPORARY
debug("StreamCore::readCallback(%s, status=%s input=\"%s\", size=%ld)\n",
debug("StreamCore::readCallback(%s, status=%s input=\"%s\", size=%" Z "u)\n",
name(), StreamIoStatusStr[status],
StreamBuffer(input, size).expand()(), size);
#endif
@ -998,7 +998,7 @@ readCallback(StreamIoStatus status,
finishProtocol(ReplyTimeout);
return 0;
case StreamIoFault:
error("%s: I/O error after reading %" P "d byte%s: \"%s%s\"\n",
error("%s: I/O error after reading %" Z "d byte%s: \"%s%s\"\n",
name(),
inputBuffer.length(), inputBuffer.length()==1 ? "" : "s",
inputBuffer.length() > 20 ? "..." : "",
@ -1007,7 +1007,7 @@ readCallback(StreamIoStatus status,
return 0;
}
inputBuffer.append(input, size);
debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %" P "d\n",
debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %" Z "u\n",
name(), inputBuffer.expand()(), inputBuffer.length());
if (*activeCommand != in_cmd)
{
@ -1049,7 +1049,7 @@ readCallback(StreamIoStatus status,
if (end >= 0)
{
termlen = inTerminator.length();
debug("StreamCore::readCallback(%s) inTerminator %s at position %" P "d\n",
debug("StreamCore::readCallback(%s) inTerminator %s at position %" Z "u\n",
name(), inTerminator.expand()(), end);
} else {
debug("StreamCore::readCallback(%s) inTerminator %s not found\n",
@ -1066,8 +1066,8 @@ readCallback(StreamIoStatus status,
if (maxInput && end < 0 && maxInput <= inputBuffer.length())
{
// no terminator but maxInput bytes read
debug("StreamCore::readCallback(%s) maxInput size reached\n",
name());
debug("StreamCore::readCallback(%s) maxInput size %lu reached\n",
name(), maxInput);
end = maxInput;
}
if (maxInput && end > (ssize_t)maxInput)
@ -1092,7 +1092,7 @@ readCallback(StreamIoStatus status,
name());
flags |= AcceptInput;
if (maxInput)
return (long)(maxInput - inputBuffer.length());
return maxInput - inputBuffer.length();
else
return -1;
}
@ -1110,7 +1110,7 @@ readCallback(StreamIoStatus status,
}
else
{
error("%s: Timeout after reading %" P "d byte%s \"%s%s\"\n",
error("%s: Timeout after reading %" Z "d byte%s \"%s%s\"\n",
name(), end, end==1 ? "" : "s", end > 20 ? "..." : "",
inputBuffer.expand(-20)());
}
@ -1366,7 +1366,7 @@ normal_format:
{
int i = 0;
while (commandIndex[i] >= ' ') i++;
error("%s: Input \"%s%s\" mismatch after %" P "d byte%s: %c != %c\n",
error("%s: Input \"%s%s\" mismatch after %" Z "d byte%s: %c != %c\n",
name(),
consumedInput > 10 ? "..." : "",
inputLine.expand(consumedInput > 10 ?
@ -1393,18 +1393,18 @@ normal_format:
{
if (!(flags & AsyncMode) && onMismatch[0] != in_cmd)
{
error("%s: %" P "d byte%s surplus input \"%s%s\"\n",
error("%s: %" Z "d byte%s surplus input \"%s%s\"\n",
name(), surplus, surplus==1 ? "" : "s",
inputLine.expand(consumedInput, 20)(),
surplus > 20 ? "..." : "");
if (consumedInput>20)
error("%s: after %" P "d byte%s \"...%s\"\n",
error("%s: after %" Z "d byte%s \"...%s\"\n",
name(), consumedInput,
consumedInput==1 ? "" : "s",
inputLine.expand(consumedInput-20, 20)());
else
error("%s: after %" P "d byte%s: \"%s\"\n",
error("%s: after %" Z "d byte%s: \"%s\"\n",
name(), consumedInput,
consumedInput==1 ? "" : "s",
inputLine.expand(0, consumedInput)());
@ -1536,7 +1536,7 @@ scanValue(const StreamFormat& fmt, char* value, size_t& size)
if (!matchSeparator()) return -1;
ssize_t consumed = StreamFormatConverter::find(fmt.conv)->
scanString(fmt, inputLine(consumedInput), value, size);
debug("StreamCore::scanValue(%s, format=%%%c, char*, size=%" P "d) input=\"%s\"\n",
debug("StreamCore::scanValue(%s, format=%%%c, char*, size=%" Z "d) input=\"%s\"\n",
name(), fmt.conv, size, inputLine.expand(consumedInput)());
if (consumed < 0)
{

View File

@ -194,8 +194,8 @@ protected:
// StreamBusInterface::Client methods
void lockCallback(StreamIoStatus status);
void writeCallback(StreamIoStatus status);
long readCallback(StreamIoStatus status,
const void* input, long size);
ssize_t readCallback(StreamIoStatus status,
const void* input, size_t size);
void eventCallback(StreamIoStatus status);
void execCallback(StreamIoStatus status);
void connectCallback(StreamIoStatus status);

View File

@ -80,7 +80,7 @@ extern "C" epicsShareFunc int epicsShareAPI iocshCmd(const char *command);
#include <sysSymTbl.h>
#endif
#define P PRINTF_SIZE_T_PREFIX
#define Z PRINTF_SIZE_T_PREFIX
enum MoreFlags {
// 0x00FFFFFF used by StreamCore
@ -1186,7 +1186,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
{
consumed = scanValue(format, lval);
if (consumed >= 0) ((epicsUInt32*)buffer)[nord] = lval;
debug("Stream::matchValue(%s): %s.%s[%" P "u] = %lu\n",
debug("Stream::matchValue(%s): %s.%s[%" Z "u] = %lu\n",
name(), pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
nord, lval);
@ -1196,7 +1196,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
{
consumed = scanValue(format, lval);
if (consumed >= 0) ((epicsInt32*)buffer)[nord] = lval;
debug("Stream::matchValue(%s): %s.%s[%" P "u] = %li\n",
debug("Stream::matchValue(%s): %s.%s[%" Z "u] = %li\n",
name(), pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
nord, lval);
@ -1207,7 +1207,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
consumed = scanValue(format, lval);
if (consumed >= 0)
((epicsUInt16*)buffer)[nord] = (epicsUInt16)lval;
debug("Stream::matchValue(%s): %s.%s[%" P "u] = %li\n",
debug("Stream::matchValue(%s): %s.%s[%" Z "u] = %li\n",
name(), pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
nord, lval);
@ -1223,7 +1223,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
if (consumed >= 0)
memcpy(((epicsFloat64*)buffer)+nord,
&f64, sizeof(f64));
debug("Stream::matchValue(%s): %s.%s[%" P "u] = %#g %#g\n",
debug("Stream::matchValue(%s): %s.%s[%" Z "u] = %#g %#g\n",
name(), pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
nord, dval,
@ -1249,7 +1249,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
stringsize = MAX_STRING_SIZE;
consumed = scanValue(format,
buffer+MAX_STRING_SIZE*nord, stringsize);
debug("Stream::matchValue(%s): %s.%s[%" P "u] = \"%.*s\"\n",
debug("Stream::matchValue(%s): %s.%s[%" Z "u] = \"%.*s\"\n",
name(), pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
nord, (int)stringsize, buffer+MAX_STRING_SIZE*nord);
@ -1353,14 +1353,14 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
case DBF_ULONG:
case DBF_LONG:
case DBF_ENUM:
error("%s: %s(%s.%s, %s, %li, %" P "u) failed\n",
error("%s: %s(%s.%s, %s, %li, %" Z "u) failed\n",
name(), putfunc, pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
pamapdbfType[fmt.type].strvalue,
lval, nord);
return false;
case DBF_DOUBLE:
error("%s: %s(%s.%s, %s, %#g, %" P "u) failed\n",
error("%s: %s(%s.%s, %s, %#g, %" Z "u) failed\n",
name(), putfunc, pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
pamapdbfType[fmt.type].strvalue,
@ -1368,7 +1368,7 @@ matchValue(const StreamFormat& format, const void* fieldaddress)
return false;
case DBF_STRING:
case DBF_CHAR:
error("%s: %s(%s.%s, %s, \"%.*s\", %" P "u) failed\n",
error("%s: %s(%s.%s, %s, \"%.*s\", %" Z "u) failed\n",
name(), putfunc, pdbaddr->precord->name,
((dbFldDes*)pdbaddr->pfldDes)->name,
pamapdbfType[fmt.type].strvalue,