ipp and lpr print transports: fixes 64 bit warnings
This commit is contained in:
parent
14bf5c3248
commit
f39eb5cf94
@ -93,7 +93,8 @@ IPPPrinterRoster::Listen()
|
||||
packet[len] = '\0';
|
||||
|
||||
// Verify packet format
|
||||
if (sscanf(packet, "%lx%lx%1023s", &type, &state, uri) == 3) {
|
||||
if (sscanf(packet, "%" B_SCNx32 "%" B_SCNx32 "%1023s", &type, &state,
|
||||
uri) == 3) {
|
||||
IPPPrinter *printer = fPrinters.Get(uri);
|
||||
if (!printer) {
|
||||
printer = new IPPPrinter(uri, type);
|
||||
|
@ -64,7 +64,7 @@ IppTransport::IppTransport(BMessage *msg)
|
||||
else
|
||||
strcpy(__user, "baron");
|
||||
|
||||
sprintf(__file, "%s/%s@ipp.%ld", spool_path, __user, __jobid);
|
||||
sprintf(__file, "%s/%s@ipp.%" B_PRId32, spool_path, __user, __jobid);
|
||||
|
||||
__fs.open(__file, ios::in | ios::out | ios::binary | ios::trunc);
|
||||
if (__fs.good()) {
|
||||
|
@ -66,7 +66,7 @@ LprTransport::LprTransport(BMessage *msg)
|
||||
}
|
||||
dir.WriteAttr(LPR_JOB_ID, B_INT32_TYPE, 0, &fJobId, sizeof(fJobId));
|
||||
|
||||
sprintf(fFile, "%s/%s@ipp.%ld", spool_path, fUser, fJobId);
|
||||
sprintf(fFile, "%s/%s@ipp.%" B_PRId32, spool_path, fUser, fJobId);
|
||||
|
||||
fStream.open(fFile, ios::in | ios::out | ios::binary | ios::trunc);
|
||||
if (fStream.good()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user