1 | --- prnt/hpijs/context2.cpp.orig 2010-12-19 21:38:35.000000000 +0100 |
---|
2 | +++ prnt/hpijs/context2.cpp 2010-12-19 21:34:05.000000000 +0100 |
---|
3 | @@ -39,6 +39,7 @@ |
---|
4 | //#include "bug.h" |
---|
5 | |
---|
6 | APDK_BEGIN_NAMESPACE |
---|
7 | + |
---|
8 | extern ColorMatcher* Create_ColorMatcher |
---|
9 | ( |
---|
10 | SystemServices* pSys, |
---|
11 | @@ -49,6 +50,15 @@ |
---|
12 | APDK_END_NAMESPACE |
---|
13 | |
---|
14 | APDK_BEGIN_NAMESPACE |
---|
15 | +int APDK_strnlen (const char *s, int size) |
---|
16 | +{ |
---|
17 | + int i; |
---|
18 | + |
---|
19 | + for (i = 0; i < size; i++) |
---|
20 | + if (s[i] == 0) |
---|
21 | + return i; |
---|
22 | + return size; |
---|
23 | +} |
---|
24 | |
---|
25 | extern PAPER_SIZE MediaSizeToPaper(MediaSize msize); |
---|
26 | extern MediaSize PaperToMediaSize(PAPER_SIZE psize); |
---|
27 | @@ -1300,7 +1310,7 @@ |
---|
28 | { |
---|
29 | return UNSUPPORTED_PRINTER; |
---|
30 | } |
---|
31 | - if(0 == strnlen((const char *)pSS->strDevID, DevIDBuffSize)) |
---|
32 | + if(0 == APDK_strnlen((const char *)pSS->strDevID, DevIDBuffSize)) |
---|
33 | { |
---|
34 | strncpy((char *)pSS->strDevID,szDeviceId,DevIDBuffSize); |
---|
35 | } |
---|