-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpoppler.cpp
38 lines (33 loc) · 884 Bytes
/
poppler.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "stdafx.h"
#include "SecurityHandler.h"
#include "GlobalParams.h"
/*
void *StandardSecurityHandler::getAuthData()
{
return NULL;
}*/
void CDECL error(int pos, char *msg, ...) {
va_list args;
char buf[4096], *p = buf;
// NB: this can be called before the globalParams object is created
if (globalParams && globalParams->getErrQuiet()) {
return;
}
if (pos >= 0) {
p += _snprintf(p, sizeof(buf)-1, "Error (%d): ", pos);
*p = '\0';
OutputDebugString(p);
} else {
OutputDebugString("Error: ");
}
p = buf;
va_start(args, msg);
p += _vsnprintf(p, sizeof(buf) - 1, msg, args);
while ( p > buf && isspace(p[-1]) )
*--p = '\0';
*p++ = '\r';
*p++ = '\n';
*p = '\0';
OutputDebugString(buf);
va_end(args);
}