1 | --- prnt/hpijs/ljzjscolor.cpp.orig 2011-05-14 20:29:11.000000000 +0200 |
---|
2 | +++ prnt/hpijs/ljzjscolor.cpp 2011-07-06 18:50:07.000000000 +0200 |
---|
3 | @@ -42,6 +42,16 @@ |
---|
4 | |
---|
5 | #define LJZJSCOLOR2DEVICESCOUNT 8 |
---|
6 | |
---|
7 | +int LJ_strnlen (const char *s, int size) |
---|
8 | +{ |
---|
9 | + int i; |
---|
10 | + |
---|
11 | + for (i = 0; i < size; i++) |
---|
12 | + if (s[i] == 0) |
---|
13 | + return i; |
---|
14 | + return size; |
---|
15 | +} |
---|
16 | + |
---|
17 | extern uint32_t ulMapGRAY_K_6x6x1[9 * 9 * 9]; |
---|
18 | |
---|
19 | extern uint32_t ulMapDJ600_CCM_K[9 * 9 * 9]; |
---|
20 | @@ -526,7 +536,7 @@ |
---|
21 | for(int i=0; i< LJZJSCOLOR2DEVICESCOUNT; i++) |
---|
22 | { |
---|
23 | if( NO_ERROR == err && |
---|
24 | - (strnlen((const char*)strDeviceID, DevIDBuffSize)< DevIDBuffSize) && |
---|
25 | + (LJ_strnlen((const char*)strDeviceID, DevIDBuffSize)< DevIDBuffSize) && |
---|
26 | (strstr((const char*)strDeviceID, (const char*)szLJZjsColor2ModelNames[i]))) |
---|
27 | { |
---|
28 | bLJZjsColor2Printer = TRUE; |
---|