Changeset 333
- Timestamp:
- Feb 22, 2012, 8:50:40 PM (13 years ago)
- Location:
- trunk/openjdk
- Files:
-
- 73 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/hotspot/make/os2/makefiles/compile.make
r325 r333 101 101 CPP_FLAGS += -D__WIN32OS2__ -D__i386__ -DSTRICT -D_POSIX_SOURCE \ 102 102 -D_POSIX_C_SOURCE=200112 -D_EMX_SOURCE -D_XOPEN_SOURCE=600 \ 103 -D_SVID_SOURCE 103 -D_SVID_SOURCE -DOS2EMX_PLAIN_CHAR 104 104 CPP_FLAGS += -I$(ALT_ODINSDK_HEADERS_PATH)/Win -I$(ALT_ODINSDK_HEADERS_PATH) 105 105 -
trunk/openjdk/jdk/make/common/Defs-os2.gmk
r330 r333 124 124 125 125 # We compile a lot of MSVC code which seems to silently tolerate this 126 GCC_WARNINGS += -Wno-sign-compare 127 GCC_WARNINGS_C += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-missing-field-initializers126 GCC_WARNINGS += -Wno-sign-compare -Wno-type-limits -Wno-missing-field-initializers -Wno-missing-braces 127 GCC_WARNINGS_C += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast 128 128 GCC_WARNINGS_CXX += -Wno-write-strings 129 129 … … 146 146 CXXFLAGS_DBG = $(CFLAGS_DBG) 147 147 148 # Some code uses very unstrict aliasing turn this optimization off 149 CFLAGS_COMMON += -fno-strict-aliasing 150 CXXFLAGS_COMMON += -fno-strict-aliasing 151 148 152 # 149 153 # Preprocessor macro definitions … … 173 177 CPPFLAGS_COMMON += -D__WIN32OS2__ -D__i386__ -DSTRICT -D_POSIX_SOURCE \ 174 178 -D_POSIX_C_SOURCE=200112 -D_EMX_SOURCE -D_XOPEN_SOURCE=600 \ 175 -D_SVID_SOURCE 179 -D_SVID_SOURCE -DOS2EMX_PLAIN_CHAR 176 180 CPPFLAGS_COMMON += -I$(ODINSDK_HEADERS_PATH)/Win -I$(ODINSDK_HEADERS_PATH) \ 177 181 -DWINE_LARGE_INTEGER -
trunk/openjdk/jdk/src/share/bin/java.c
r278 r333 205 205 int ret; 206 206 InvocationFunctions ifn; 207 jlong start , end;207 jlong start = 0, end; 208 208 char jrepath[MAXPATHLEN], jvmpath[MAXPATHLEN]; 209 209 char ** original_argv = argv; … … 389 389 jobjectArray mainArgs; 390 390 int ret = 0; 391 jlong start , end;391 jlong start = 0, end; 392 392 393 393 /* … … 1390 1390 char *s = buf, *t = name, c; 1391 1391 jclass cls; 1392 jlong start , end;1392 jlong start = 0, end; 1393 1393 1394 1394 if (_launcher_debug) … … 1809 1809 int cnt = 0; 1810 1810 int lineno = 0; 1811 jlong start , end;1811 jlong start = 0, end; 1812 1812 int vmType; 1813 1813 char *tmpPtr; -
trunk/openjdk/jdk/src/share/instrument/InvocationAdapter.c
r278 r333 30 30 #include <string.h> 31 31 #include <stdlib.h> 32 33 #ifdef __EMX__ 34 #include <strings.h> // strcasecmp 35 #endif 32 36 33 37 #include "jni.h" -
trunk/openjdk/jdk/src/share/instrument/JarFacade.c
r278 r333 26 26 #include <string.h> 27 27 #include <stdlib.h> 28 29 #ifdef __EMX__ 30 #include <strings.h> // strcasecmp 31 #endif 28 32 29 33 #include "jni.h" -
trunk/openjdk/jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c
r278 r333 49 49 int isSigned; 50 50 int isBigEndian; 51 UINT8* conversionBuffer;51 char* conversionBuffer; 52 52 int conversionBufferSize; 53 53 } DAUDIO_Info; … … 173 173 * as conversionSize 174 174 */ 175 void handleSignEndianConversion(INT8* data, INT8* output, int byteSize, int conversionSize) {175 static void handleSignEndianConversion(char* data, char* output, int byteSize, int conversionSize) { 176 176 TRACE1("conversion with size %d\n", conversionSize); 177 177 switch (conversionSize) { … … 186 186 } 187 187 case 2: { 188 INT8h;188 char h; 189 189 byteSize = byteSize / 2; 190 190 while (byteSize > 0) { … … 200 200 } 201 201 case 3: { 202 INT8h;202 char h; 203 203 byteSize = byteSize / 3; 204 204 while (byteSize > 0) { … … 215 215 } 216 216 case 4: { 217 INT8h1, h2;217 char h1, h2; 218 218 byteSize = byteSize / 4; 219 219 while (byteSize > 0) { … … 312 312 313 313 314 void handleGainAndConversion(DAUDIO_Info* info, UINT8* input, UINT8* output,314 void handleGainAndConversion(DAUDIO_Info* info, char* input, char* output, 315 315 int len, float leftGain, float rightGain, 316 316 int conversionSize) { … … 585 585 jint offset, jint len, jint conversionSize, jfloat leftGain, jfloat rightGain) { 586 586 int ret = -1; 587 #if USE_DAUDIO == TRUE588 UINT8* data;589 UINT8* dataOffset;590 UINT8* convertedData;587 #if USE_DAUDIO != TRUE 588 char* data; 589 char* dataOffset; 590 char* convertedData; 591 591 jboolean didCopy; 592 592 DAUDIO_Info* info = (DAUDIO_Info*) (UINT_PTR) id; … … 599 599 if (len == 0) return 0; 600 600 if (info && info->handle) { 601 data = ( UINT8*) ((*env)->GetByteArrayElements(env, jData, &didCopy));601 data = ((*env)->GetByteArrayElements(env, jData, &didCopy)); 602 602 dataOffset = data; 603 603 dataOffset += (int) offset; … … 615 615 } 616 616 if (!info->conversionBuffer) { 617 info->conversionBuffer = ( UINT8*) malloc(len);617 info->conversionBuffer = (char*) malloc(len); 618 618 if (!info->conversionBuffer) { 619 619 // do not commit the native array … … 630 630 || ((info->channels * info->sampleSizeInBits / 8) != info->frameSize) 631 631 || (info->sampleSizeInBits != 8 && info->sampleSizeInBits != 16)) { 632 handleSignEndianConversion( (INT8*) dataOffset, (INT8*)convertedData, (int) len,632 handleSignEndianConversion(dataOffset, convertedData, (int) len, 633 633 (int) conversionSize); 634 634 } else { … … 639 639 } 640 640 641 ret = DAUDIO_Write(info->handle, (INT8*)convertedData, (int) len);641 ret = DAUDIO_Write(info->handle, convertedData, (int) len); 642 642 643 643 // do not commit the native array -
trunk/openjdk/jdk/src/share/native/java/util/zip/zlib-1.1.3/inftrees.c
r278 r333 153 153 register uIntf *p; /* pointer into c[], b[], or v[] */ 154 154 inflate_huft *q; /* points to current table */ 155 struct inflate_huft_s r ;/* table entry for structure assignment */155 struct inflate_huft_s r = {0};/* table entry for structure assignment */ 156 156 inflate_huft *u[BMAX]; /* table stack */ 157 157 register int w; /* bits before this table == (l * h) */ -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffine.c
r278 r333 155 155 mlib_status res; 156 156 mlib_type type; 157 mlib_s32 nchan, t_ind , kw, kw1;157 mlib_s32 nchan, t_ind = 0, kw, kw1; 158 158 mlib_addr align; 159 159 mlib_d64 buff_lcl[BUFF_SIZE / 8]; … … 319 319 320 320 break; 321 322 default: 323 break; 321 324 } 322 325 -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffineEdge.c
r278 r333 617 617 break; 618 618 } 619 620 default: 621 break; 619 622 } 620 623 } … … 643 646 case MLIB_DOUBLE: 644 647 MLIB_PROCESS_EDGES(MLIB_EDGE_NEAREST_LINE, mlib_d64); 648 break; 649 650 default: 645 651 break; 646 652 } … … 692 698 MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_u8i, mlib_s16); 693 699 break; 700 701 default: 702 break; 694 703 } 695 704 … … 706 715 MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_s16i, mlib_s16); 707 716 break; 717 718 default: 719 break; 708 720 } 709 721 722 break; 723 724 default: 710 725 break; 711 726 } … … 744 759 srcStride >>= 3; 745 760 MLIB_PROCESS_EDGES(MLIB_EDGE_BL, mlib_d64); 761 break; 762 763 default: 746 764 break; 747 765 } … … 822 840 MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_u8i, mlib_s16); 823 841 break; 842 843 default: 844 break; 824 845 } 825 846 … … 836 857 MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_s16i, mlib_s16); 837 858 break; 859 860 default: 861 break; 838 862 } 839 863 864 break; 865 866 default: 840 867 break; 841 868 } … … 896 923 897 924 break; 925 926 default: 927 break; 898 928 } 899 929 -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageColorTrue2Index.c
r278 r333 2624 2624 } 2625 2625 } 2626 2627 default: 2628 break; 2626 2629 } 2627 2630 … … 2679 2682 } 2680 2683 } 2684 2685 default: 2686 break; 2681 2687 } 2682 2688 -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConvMxN.c
r278 r333 212 212 ret = mlib_convMxNnw_d64(dst_i, src_i, kernel, m, n, dm, dn, cmask); 213 213 break; 214 default: 215 break; 214 216 } 215 217 } … … 221 223 case MLIB_EDGE_DST_COPY_SRC: 222 224 mlib_ImageConvCopyEdge(dst_e, src_e, dx_l, dx_r, dy_t, dy_b, cmask); 225 break; 226 default: 223 227 break; 224 228 } … … 280 284 mlib_convMxNext_d64(dst_e, src_e, kernel, m, n, dx_l, dx_r, dy_t, dy_b, cmask); 281 285 break; 286 default: 287 break; 282 288 } 283 289 } -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c
r278 r333 1870 1870 mlib_status CONV_FUNC_MxN 1871 1871 { 1872 DTYPE *adr_src, *sl, *sp ;1873 DTYPE *adr_dst, *dl, *dp ;1872 DTYPE *adr_src, *sl, *sp = 0; 1873 DTYPE *adr_dst, *dl, *dp = 0; 1874 1874 FTYPE buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; 1875 1875 FTYPE **buffs = buffs_arr, *buffd; … … 2333 2333 mlib_status CONV_FUNC_MxN_I 2334 2334 { 2335 DTYPE *adr_src, *sl, *sp ;2336 DTYPE *adr_dst, *dl, *dp ;2335 DTYPE *adr_src, *sl, *sp = 0; 2336 DTYPE *adr_dst, *dl, *dp = 0; 2337 2337 mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; 2338 2338 mlib_s32 *pbuff = buff; -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c
r278 r333 149 149 /***************************************************************/ 150 150 #define DEF_VARS(type) \ 151 type *adr_src, *sl, *sp ;\152 type *adr_dst, *dl, *dp ;\151 type *adr_src, *sl, *sp = 0; \ 152 type *adr_dst, *dl, *dp = 0; \ 153 153 FTYPE *pbuff = buff; \ 154 154 mlib_s32 wid, hgt, sll, dll; \ … … 2061 2061 mlib_s32 k0, k1, k2, k3, k4, k5, k6; 2062 2062 mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7; 2063 DTYPE *adr_src, *sl, *sp ;2064 DTYPE *adr_dst, *dl, *dp ;2063 DTYPE *adr_src, *sl, *sp = 0; 2064 DTYPE *adr_dst, *dl, *dp = 0; 2065 2065 mlib_s32 wid, hgt, sll, dll; 2066 2066 mlib_s32 nchannel, chan1; -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_32nw.c
r278 r333 71 71 #define DEF_VARS(type) \ 72 72 GET_SRC_DST_PARAMETERS(type); \ 73 type *sl, *sp , *sl1, *dl, *dp;\73 type *sl, *sp = 0, *sl1, *dl, *dp = 0; \ 74 74 mlib_d64 *pbuff = buff, *buff0, *buff1, *buff2, *buffT; \ 75 75 mlib_s32 i, j, c; \ … … 79 79 #define DEF_VARS_MxN(type) \ 80 80 GET_SRC_DST_PARAMETERS(type); \ 81 type *sl, *sp , *dl, *dp;\81 type *sl, *sp = 0, *dl, *dp = 0; \ 82 82 mlib_d64 *pbuff = buff; \ 83 83 mlib_s32 i, j, c -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c
r278 r333 1870 1870 mlib_status CONV_FUNC_MxN 1871 1871 { 1872 DTYPE *adr_src, *sl, *sp ;1873 DTYPE *adr_dst, *dl, *dp ;1872 DTYPE *adr_src, *sl, *sp = 0; 1873 DTYPE *adr_dst, *dl, *dp = 0; 1874 1874 FTYPE buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; 1875 1875 FTYPE **buffs = buffs_arr, *buffd; … … 2333 2333 mlib_status CONV_FUNC_MxN_I 2334 2334 { 2335 DTYPE *adr_src, *sl, *sp ;2336 DTYPE *adr_dst, *dl, *dp ;2335 DTYPE *adr_src, *sl, *sp = 0; 2336 DTYPE *adr_dst, *dl, *dp = 0; 2337 2337 mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; 2338 2338 mlib_s32 *pbuff = buff; -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c
r278 r333 150 150 /***************************************************************/ 151 151 #define DEF_VARS(type) \ 152 type *adr_src, *sl, *sp ;\153 type *adr_dst, *dl, *dp ;\152 type *adr_src, *sl, *sp = 0; \ 153 type *adr_dst, *dl, *dp = 0; \ 154 154 FTYPE *pbuff = buff; \ 155 155 mlib_s32 wid, hgt, sll, dll; \ … … 2062 2062 mlib_s32 k0, k1, k2, k3, k4, k5, k6; 2063 2063 mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7; 2064 DTYPE *adr_src, *sl, *sp ;2065 DTYPE *adr_dst, *dl, *dp ;2064 DTYPE *adr_src, *sl, *sp = 0; 2065 DTYPE *adr_dst, *dl, *dp = 0; 2066 2066 mlib_s32 wid, hgt, sll, dll; 2067 2067 mlib_s32 nchannel, chan1; -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_D64nw.c
r278 r333 72 72 GET_SRC_DST_PARAMETERS(type); \ 73 73 type *sl; \ 74 type *dl, *dp ;\75 mlib_s32 i , j, c74 type *dl, *dp = 0; \ 75 mlib_s32 i = 0, j, c 76 76 77 77 /***************************************************************/ -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_F32nw.c
r278 r333 72 72 GET_SRC_DST_PARAMETERS(type); \ 73 73 type *sl; \ 74 type *dl, *dp ;\74 type *dl, *dp = 0; \ 75 75 mlib_s32 i, j, c 76 76 -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c
r278 r333 1870 1870 mlib_status CONV_FUNC_MxN 1871 1871 { 1872 DTYPE *adr_src, *sl, *sp ;1873 DTYPE *adr_dst, *dl, *dp ;1872 DTYPE *adr_src, *sl, *sp = 0; 1873 DTYPE *adr_dst, *dl, *dp = 0; 1874 1874 FTYPE buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; 1875 1875 FTYPE **buffs = buffs_arr, *buffd; … … 2333 2333 mlib_status CONV_FUNC_MxN_I 2334 2334 { 2335 DTYPE *adr_src, *sl, *sp ;2336 DTYPE *adr_dst, *dl, *dp ;2335 DTYPE *adr_src, *sl, *sp = 0; 2336 DTYPE *adr_dst, *dl, *dp = 0; 2337 2337 mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; 2338 2338 mlib_s32 *pbuff = buff; -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c
r278 r333 149 149 /***************************************************************/ 150 150 #define DEF_VARS(type) \ 151 type *adr_src, *sl, *sp ;\152 type *adr_dst, *dl, *dp ;\151 type *adr_src, *sl, *sp = 0; \ 152 type *adr_dst, *dl, *dp = 0; \ 153 153 FTYPE *pbuff = buff; \ 154 154 mlib_s32 wid, hgt, sll, dll; \ … … 2061 2061 mlib_s32 k0, k1, k2, k3, k4, k5, k6; 2062 2062 mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7; 2063 DTYPE *adr_src, *sl, *sp ;2064 DTYPE *adr_dst, *dl, *dp ;2063 DTYPE *adr_src, *sl, *sp = 0; 2064 DTYPE *adr_dst, *dl, *dp = 0; 2065 2065 mlib_s32 wid, hgt, sll, dll; 2066 2066 mlib_s32 nchannel, chan1; -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c
r278 r333 205 205 mlib_u64 *sp; /* 8-byte aligned start point in src */ 206 206 mlib_s32 j; /* offset of address in dst */ 207 mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFF ;207 mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFFLL; 208 208 mlib_u64 dmask; 209 mlib_u64 lsrc, lsrc0, lsrc1 , ldst;209 mlib_u64 lsrc, lsrc0, lsrc1 = 0, ldst; 210 210 mlib_s32 ls_offset, ld_offset, shift; 211 211 … … 428 428 mlib_u64 *sp; /* 8-byte aligned start point in src */ 429 429 mlib_s32 j; /* offset of address in dst */ 430 mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFF ;430 mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFFLL; 431 431 mlib_u64 dmask; 432 mlib_u64 lsrc, lsrc0, lsrc1 , ldst;432 mlib_u64 lsrc, lsrc0, lsrc1 = 0, ldst; 433 433 mlib_s32 ls_offset, ld_offset, shift; 434 434 -
trunk/openjdk/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c
r278 r333 335 335 mlib_s32 height; /* for parent image */ 336 336 mlib_s32 stride; 337 mlib_s32 bitoffset ;337 mlib_s32 bitoffset = 0; 338 338 void *data; 339 339 … … 424 424 mlib_s32 stride = src -> stride; 425 425 mlib_u8 *data = src -> data; 426 mlib_s32 bitoffset ;426 mlib_s32 bitoffset = 0; 427 427 428 428 data += y * stride; -
trunk/openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.c
r278 r333 290 290 int alphaMask) 291 291 { 292 int i, shift , numBits;292 int i, shift = 0, numBits = 0; 293 293 294 294 format->byteOrder = BYTE_ORDER_NATIVE; -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/AnyByteBinary.h
r278 r333 151 151 #define DeclareByteBinaryAlphaLoadData(TYPE, PREFIX) \ 152 152 jint *PREFIX ## Lut; \ 153 jint PREFIX ## rgb ;153 jint PREFIX ## rgb = 0; 154 154 155 155 #define InitByteBinaryAlphaLoadData(TYPE, PREFIX, pRasInfo) \ -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/ByteIndexed.h
r278 r333 200 200 #define DeclareByteIndexedAlphaLoadData(PREFIX) \ 201 201 jint *PREFIX ## Lut; \ 202 jint PREFIX ## rgb ;202 jint PREFIX ## rgb = 0; 203 203 204 204 #define InitByteIndexedAlphaLoadData(PREFIX, pRasInfo) \ -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/IntArgb.h
r278 r333 119 119 120 120 #define DeclareIntArgbAlphaLoadData(PREFIX) \ 121 jint PREFIX ;121 jint PREFIX = 0; 122 122 123 123 #define InitIntArgbAlphaLoadData(PREFIX, pRasInfo) -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/IntArgbBm.h
r278 r333 130 130 131 131 #define DeclareIntArgbBmAlphaLoadData(PREFIX) \ 132 jint PREFIX ;132 jint PREFIX = 0; 133 133 134 134 #define InitIntArgbBmAlphaLoadData(PREFIX, pRasInfo) -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/IntArgbPre.h
r278 r333 150 150 151 151 #define DeclareIntArgbPreAlphaLoadData(PREFIX) \ 152 jint PREFIX ;152 jint PREFIX = 0; 153 153 154 154 #define InitIntArgbPreAlphaLoadData(PREFIX, pRasInfo) -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/TransformHelper.c
r309 r333 281 281 RegionData clipInfo; 282 282 TransformInfo itxInfo; 283 jint maxlinepix ;284 TransformHelperFunc *pHelperFunc ;285 TransformInterpFunc *pInterpFunc ;283 jint maxlinepix = 0; 284 TransformHelperFunc *pHelperFunc = NULL; 285 TransformInterpFunc *pInterpFunc = NULL; 286 286 jdouble xorig, yorig; 287 287 jlong numedges; -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/Ushort4444Argb.h
r278 r333 117 117 118 118 #define DeclareUshort4444ArgbAlphaLoadData(PREFIX) \ 119 jint PREFIX ;119 jint PREFIX = 0; 120 120 121 121 #define InitUshort4444ArgbAlphaLoadData(PREFIX, pRasInfo) -
trunk/openjdk/jdk/src/share/native/sun/java2d/loops/UshortIndexed.h
r278 r333 168 168 #define DeclareUshortIndexedAlphaLoadData(PREFIX) \ 169 169 jint *PREFIX ## Lut; \ 170 jint PREFIX ## rgb ;170 jint PREFIX ## rgb = 0; 171 171 172 172 #define InitUshortIndexedAlphaLoadData(PREFIX, pRasInfo) \ -
trunk/openjdk/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c
r278 r333 629 629 GLfloat foff; 630 630 GLint loc; 631 void *bands[4] ;631 void *bands[4] = {0}; 632 632 int i; 633 633 jint flags = 0; -
trunk/openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_keymgmt.c
r278 r333 218 218 CK_OBJECT_HANDLE ckWrappingKeyHandle; 219 219 CK_OBJECT_HANDLE ckKeyHandle; 220 jbyteArray jWrappedKey ;220 jbyteArray jWrappedKey = 0; 221 221 CK_RV rv; 222 222 CK_BYTE BUF[MAX_STACK_BUFFER_LEN]; -
trunk/openjdk/jdk/src/windows/bin/java_md.c
r294 r333 403 403 && type == REG_SZ 404 404 && (size < (unsigned int)bufsize)) { 405 if (RegQueryValueEx(key, name, 0, 0, buf, &size) == 0) {405 if (RegQueryValueEx(key, name, 0, 0, (LPBYTE)buf, &size) == 0) { 406 406 return JNI_TRUE; 407 407 } … … 693 693 JLI_MemFree(best); 694 694 len = MAXNAMELEN; 695 if (RegQueryValueEx(ver_key, "JavaHome", NULL, NULL, (LPBYTE)name, &len) 695 if (RegQueryValueEx(ver_key, "JavaHome", NULL, NULL, (LPBYTE)name, 696 (LPDWORD)&len) 696 697 != ERROR_SUCCESS) { 697 698 if (ver_key != NULL) … … 975 976 char *p; 976 977 char *np; 977 c har*ocl;978 const char *ocl; 978 979 char *ccl; 979 980 char *unquoted; … … 1191 1192 if (thread_handle) { 1192 1193 WaitForSingleObject(thread_handle, INFINITE); 1193 GetExitCodeThread(thread_handle, &rslt);1194 GetExitCodeThread(thread_handle, (LPDWORD)&rslt); 1194 1195 CloseHandle(thread_handle); 1195 1196 } else { -
trunk/openjdk/jdk/src/windows/instrument/FileSystemSupport_md.c
r278 r333 27 27 #include <string.h> 28 28 #include <malloc.h> 29 30 #ifdef __EMX__ 31 #include <strings.h> // strcasecmp 32 #endif 29 33 30 34 #include "FileSystemSupport_md.h" -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp
r278 r333 795 795 DSCBUFFERDESC dscbdesc; 796 796 #endif 797 HRESULT res ;797 HRESULT res = 0; 798 798 WAVEFORMATEXTENSIBLE format; 799 799 void* buffer; … … 1076 1076 DWORD* playCursor, DWORD* writeCursor, 1077 1077 int* bufferSize, BOOL fromPlayCursor) { 1078 int available ;1078 int available = 0; 1079 1079 int newReadPos; 1080 1080 -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_Util.c
r278 r333 94 94 SysExQueue* sysex; 95 95 int i; 96 UBYTE* dataPtr;96 char* dataPtr; 97 97 int structSize = sizeof(SysExQueue) + ((count - 1) * sizeof(MIDIHDR)); 98 98 … … 116 116 117 117 // set up headers 118 dataPtr = preAllocatedMem;118 dataPtr = (char*)preAllocatedMem; 119 119 for (i=0; i<count; i++) { 120 120 sysex->header[i].lpData = dataPtr; -
trunk/openjdk/jdk/src/windows/native/java/net/NetworkInterface.c
r278 r333 332 332 */ 333 333 strcpy(curr->name, dev_name); 334 strncpy(curr->displayName, ifrowP->bDescr, ifrowP->dwDescrLen);334 strncpy(curr->displayName, (char*)ifrowP->bDescr, ifrowP->dwDescrLen); 335 335 curr->displayName[ifrowP->dwDescrLen] = '\0'; 336 336 curr->dwIndex = ifrowP->dwIndex; -
trunk/openjdk/jdk/src/windows/native/java/net/SocketOutputStream.c
r278 r333 31 31 #include <malloc.h> 32 32 #include <sys/types.h> 33 34 #ifdef __EMX__35 #define min(a, b) ((a) < (b) ? (a) : (b))36 #endif37 33 38 34 #include "java_net_SocketOutputStream.h" -
trunk/openjdk/jdk/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c
r278 r333 430 430 jobject fd1Obj = (*env)->GetObjectField(env, this, pdsi_fd1ID); 431 431 432 int fd, fd1 , family;432 int fd, fd1 = -1, family; 433 433 int ipv6_supported = ipv6_available(); 434 434 … … 935 935 jint packetBufferOffset, packetBufferLen; 936 936 937 int fd , fd1, fduse, nsockets=0, errorCode;937 int fd = -1, fd1 = -1, fduse, nsockets=0, errorCode; 938 938 int port; 939 939 jbyteArray data; … … 1210 1210 * must be called prior to receive() so that fduse can be set. 1211 1211 */ 1212 int fd , fd1, fduse, errorCode;1212 int fd = -1, fd1 = -1, fduse, errorCode; 1213 1213 jbyteArray data; 1214 1214 -
trunk/openjdk/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c
r278 r333 196 196 /* family and localport are int fields of iaObj */ 197 197 int family; 198 jint fd , fd1=-1;198 jint fd = -1, fd1 = -1; 199 199 jint len; 200 200 int ipv6_supported = ipv6_available(); … … 269 269 } 270 270 } else { 271 intoptval;271 u_long optval; 272 272 int optlen = sizeof(optval); 273 273 … … 405 405 jobject fdObj, fd1Obj; 406 406 /* fd is an int field on fdObj */ 407 int fd , fd1, len;407 int fd = -1, fd1 = -1, len; 408 408 int ipv6_supported = ipv6_available(); 409 409 … … 524 524 jobject address; 525 525 /* fdObj's int fd field */ 526 int fd , fd1;526 int fd = -1, fd1; 527 527 SOCKETADDRESS addr; int addrlen; 528 528 … … 790 790 Java_java_net_TwoStacksPlainSocketImpl_socketAvailable(JNIEnv *env, jobject this) { 791 791 792 jintavailable = -1;792 u_long available = -1; 793 793 jint res; 794 794 jobject fdObj = (*env)->GetObjectField(env, this, psi_fdID); … … 1023 1023 int level, optname, optlen; 1024 1024 union { 1025 inti;1025 u_long i; 1026 1026 struct linger ling; 1027 1027 } optval; -
trunk/openjdk/jdk/src/windows/native/java/net/net_util_md.c
r278 r333 590 590 if (family == AF_INET) { 591 591 struct sockaddr_in *him = (struct sockaddr_in *)addr; 592 printf ("AF_INET: port %d: % x\n", ntohs(him->sin_port),593 ntohl(him->sin_addr.s_addr));592 printf ("AF_INET: port %d: %lx\n", ntohs(him->sin_port), 593 ntohl(him->sin_addr.s_addr)); 594 594 } else { 595 595 int i; … … 597 597 printf ("AF_INET6 "); 598 598 printf ("port %d ", ntohs (a->sin6_port)); 599 printf ("flow % d ", a->sin6_flowinfo);599 printf ("flow %ld ", a->sin6_flowinfo); 600 600 printf ("addr "); 601 601 for (i=0; i<7; i++) { … … 603 603 } 604 604 printf ("%04x", ntohs(in->s6_words[7])); 605 printf (" scope % d\n", a->sin6_scope_id);605 printf (" scope %ld\n", a->sin6_scope_id); 606 606 } 607 607 } -
trunk/openjdk/jdk/src/windows/native/java/net/net_util_md.h
r278 r333 342 342 extern jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout); 343 343 extern int NET_Socket (int domain, int type, int protocol); 344 extern void NET_ThrowSocketException(JNIEnv *env, char* msg); 344 345 extern void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name, 345 346 const char *defaultDetail); -
trunk/openjdk/jdk/src/windows/native/sun/java2d/j2d_md.h
r278 r333 27 27 #define j2d_md_h_Included 28 28 29 #ifdef _MSC_VER 29 30 #ifndef DEBUG 30 31 #pragma optimize("t", on) 32 #endif 31 33 #endif 32 34 -
trunk/openjdk/jdk/src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.c
r278 r333 202 202 int pixfmts[32]; 203 203 int chosenPixFmt = 0; 204 intnfmts, i;204 UINT nfmts, i; 205 205 206 206 // this is the initial minimum value for the combined depth+stencil size -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/GDIRenderer.cpp
r278 r333 321 321 } 322 322 323 longsx, sy, ex, ey;323 jint sx, sy, ex, ey; 324 324 if (angleExtent >= 360 || angleExtent <= -360) { 325 325 sx = ex = x + w; … … 594 594 return; 595 595 } 596 longsx, sy, ex, ey;597 int angleEnd;596 jint sx, sy, ex, ey; 597 jint angleEnd; 598 598 if (angleExtent < 0) { 599 599 angleEnd = angleStart; -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/Win32OffScreenSurfaceData.cpp
r278 r333 467 467 if (wsdo->lockFlags & SD_LOCK_LUT) { 468 468 pRasInfo->lutBase = 469 ( long*) wsdo->device->GetSystemPaletteEntries();469 (jint *) wsdo->device->GetSystemPaletteEntries(); 470 470 pRasInfo->lutSize = 256; 471 471 } else { -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/Win32SurfaceData.cpp
r278 r333 940 940 if (wsdo->lockFlags & SD_LOCK_LUT) { 941 941 pRasInfo->lutBase = 942 ( long*) wsdo->device->GetSystemPaletteEntries();942 (jint *) wsdo->device->GetSystemPaletteEntries(); 943 943 pRasInfo->lutSize = 256; 944 944 } else { -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.cpp
r278 r333 439 439 440 440 DXSurface *dxSurface; 441 DWORD dwFlags, ddsCaps ;441 DWORD dwFlags, ddsCaps = 0; 442 442 443 443 // Create the offscreen surface -
trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawUtils.cpp
r278 r333 1800 1800 break; 1801 1801 default: 1802 sprintf(buffer, "DirectX Error Unknown 0x% x", errNum);1803 break; 1804 } 1805 1806 } 1802 sprintf(buffer, "DirectX Error Unknown 0x%lx", errNum); 1803 break; 1804 } 1805 1806 } -
trunk/openjdk/jdk/src/windows/native/sun/management/FileSystemImpl.c
r278 r333 209 209 static ACL* getFileDACL(JNIEnv* env, SECURITY_DESCRIPTOR* sd) { 210 210 ACL *acl; 211 intdefaulted, present;211 BOOL defaulted, present; 212 212 213 213 if (!(*GetSecurityDescriptorDacl_func)(sd, &present, &acl, &defaulted)) { -
trunk/openjdk/jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c
r278 r333 31 31 #include <time.h> 32 32 #include <assert.h> 33 34 #ifdef __WIN32OS2__ 35 #include <string.h> 36 #endif 33 37 34 38 #include "jni_util.h" -
trunk/openjdk/jdk/src/windows/native/sun/net/spi/DefaultProxySelector.c
r278 r333 25 25 26 26 #include <windows.h> 27 28 #ifdef __WIN32OS2__ 29 #include <string.h> 30 #endif 31 27 32 #include "jni.h" 28 33 #include "jni_util.h" -
trunk/openjdk/jdk/src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c
r278 r333 66 66 { 67 67 OSVERSIONINFO version; 68 UCHARlibName[MAX_PATH];68 char libName[MAX_PATH]; 69 69 70 70 ntlm_ctxHandleID = (*env)->GetFieldID(env, clazz, "ctxHandle", "J"); … … 196 196 CtxtHandle *newContext; 197 197 TimeStamp ltime; 198 jbyteArray result ;198 jbyteArray result = 0; 199 199 200 200 -
trunk/openjdk/jdk/src/windows/native/sun/nio/ch/WindowsSelectorImpl.c
r309 r333 195 195 { 196 196 char bytes[WAKEUP_SOCKET_BUF_SIZE]; 197 long bytesToRead;197 u_long bytesToRead; 198 198 199 199 /* Drain socket */ -
trunk/openjdk/jdk/src/windows/native/sun/security/mscapi/security.cpp
r278 r333 641 641 HCRYPTKEY hKeyPair; 642 642 DWORD dwFlags = (keySize << 16) | CRYPT_EXPORTABLE; 643 jobject keypair ;643 jobject keypair = NULL; 644 644 const char* pszKeyContainerName = NULL; // UUID 645 645 … … 738 738 } else { 739 739 char buffer[64]; 740 if (sprintf(buffer, "% lu", dwAlgId)) {740 if (sprintf(buffer, "%u", dwAlgId)) { 741 741 return env->NewStringUTF(buffer); 742 742 } … … 1401 1401 jbyteArray blob = NULL; 1402 1402 DWORD dwBlobLen; 1403 BYTE* pbKeyBlob ;1403 BYTE* pbKeyBlob = NULL; 1404 1404 1405 1405 __try -
trunk/openjdk/jdk/src/windows/native/sun/security/pkcs11/j2secmod_md.h
r278 r333 26 26 #include <windows.h> 27 27 28 #ifdef __EMX__ 29 #define DECLSPEC_DLLIMPORT 30 #else 31 #define DECLSPEC_DLLIMPORT __declspec(dllimport) 32 #endif 33 28 34 // in nss.h: 29 35 // extern PRBool NSS_VersionCheck(const char *importedVersion); 30 36 // extern SECStatus NSS_Init(const char *configdir); 31 typedef int __declspec(dllimport)(*FPTR_VersionCheck)(const char *importedVersion);32 typedef int __declspec(dllimport)(*FPTR_Init)(const char *configdir);37 typedef int DECLSPEC_DLLIMPORT (*FPTR_VersionCheck)(const char *importedVersion); 38 typedef int DECLSPEC_DLLIMPORT (*FPTR_Init)(const char *configdir); 33 39 34 40 // in secmod.h … … 38 44 //extern SECMODModuleList *SECMOD_GetDBModuleList(void); 39 45 40 typedef void __declspec(dllimport)*(*FPTR_LoadModule)(char *moduleSpec, void *parent, int recurse);41 typedef char __declspec(dllimport)**(*FPTR_GetModuleSpecList)(void *module);42 typedef void __declspec(dllimport)*(*FPTR_GetDBModuleList)(void);46 typedef void DECLSPEC_DLLIMPORT *(*FPTR_LoadModule)(char *moduleSpec, void *parent, int recurse); 47 typedef char DECLSPEC_DLLIMPORT **(*FPTR_GetModuleSpecList)(void *module); 48 typedef void DECLSPEC_DLLIMPORT *(*FPTR_GetDBModuleList)(void); -
trunk/openjdk/jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.h
r2 r333 59 59 #include <windows.h> 60 60 61 #ifdef __EMX__ 62 #define DECLSPEC_DLLIMPORT 63 #else 64 #define DECLSPEC_DLLIMPORT __declspec(dllimport) 65 #endif 66 61 67 /* statement according to PKCS11 docu */ 62 68 #pragma pack(push, cryptoki, 1) … … 64 70 /* definitions according to PKCS#11 docu for Win32 environment */ 65 71 #define CK_PTR * 66 #define CK_DEFINE_FUNCTION(returnType, name) returnType __declspec(dllexport)name67 #define CK_DECLARE_FUNCTION(returnType, name) returnType __declspec(dllimport)name68 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType __declspec(dllimport)(* name)72 #define CK_DEFINE_FUNCTION(returnType, name) returnType DECLSPEC_DLLIMPORT name 73 #define CK_DECLARE_FUNCTION(returnType, name) returnType DECLSPEC_DLLIMPORT name 74 #define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType DECLSPEC_DLLIMPORT (* name) 69 75 #define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name) 70 76 #ifndef NULL_PTR -
trunk/openjdk/jdk/src/windows/native/sun/windows/GDIHashtable.cpp
r278 r333 135 135 UINT nSecondThreshold, 136 136 UINT nDestroyPeriod) : 137 m_nCounter(0), 137 138 m_nFirstThreshold(nFirstThreshold), 138 139 m_nSecondThreshold(nSecondThreshold), 139 140 m_nDestroyPeriod(nDestroyPeriod), 140 m_nCounter(0),141 141 m_bBatchingEnabled(TRUE) { 142 142 load_rsrc32_procs(); -
trunk/openjdk/jdk/src/windows/native/sun/windows/ShellFolder2.cpp
r278 r333 231 231 if (FAILED(hr)) { 232 232 char c[64]; 233 sprintf(c, "Could not initialize COM: HRESULT=0x%08 X", hr);233 sprintf(c, "Could not initialize COM: HRESULT=0x%08lX", hr); 234 234 JNU_ThrowInternalError(env, c); 235 235 } … … 625 625 STRRET strret; 626 626 OLECHAR olePath[MAX_PATH]; // wide-char version of path name 627 LPWSTR wstr ;627 LPWSTR wstr = NULL; 628 628 629 629 IShellFolder* pParent = (IShellFolder*)parentIShellFolder; … … 959 959 // Extract the color bitmap 960 960 int nBits = iconSize * iconSize; 961 longcolorBits[1024];961 jint colorBits[1024]; 962 962 GetDIBits(dc, iconInfo.hbmColor, 0, iconSize, colorBits, &bmi, DIB_RGB_COLORS); 963 963 // XP supports alpha in some icons, and depending on device. … … 1011 1011 HBITMAP hBitmap = NULL; 1012 1012 BITMAP bm; 1013 HINSTANCE libComCtl32 ;1013 HINSTANCE libComCtl32 = NULL; 1014 1014 HINSTANCE libShell32; 1015 1015 … … 1052 1052 int numPixels = bm.bmWidth * bm.bmHeight; 1053 1053 //long colorBits[192 * 16]; 1054 long *colorBits = (long*)safe_Malloc(numPixels * sizeof(long));1054 jint *colorBits = (jint*)safe_Malloc(numPixels * sizeof(jint)); 1055 1055 if (GetDIBits(dc, hBitmap, 0, bm.bmHeight, colorBits, &bmi, DIB_RGB_COLORS) == 0) { 1056 1056 return NULL; -
trunk/openjdk/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp
r278 r333 46 46 HMODULE UnicowsLoader::hmodUnicows = NULL; 47 47 48 extern "C" 49 { 48 50 // MSLU loader entry point, which is called when the module 49 51 // is initialized. 50 extern "C"HMODULE (__stdcall *_PfnLoadUnicows)(void) =52 HMODULE (__stdcall *_PfnLoadUnicows)(void) = 51 53 &UnicowsLoader::LoadUnicows; 52 54 53 55 // Overriede APIs that are not supported by MSLU. 54 extern "C"FARPROC Unicows_GetPrinterW =56 FARPROC Unicows_GetPrinterW = 55 57 (FARPROC)&UnicowsLoader::GetPrinterWImpl; 56 extern "C"FARPROC Unicows_EnumPrintersW =58 FARPROC Unicows_EnumPrintersW = 57 59 (FARPROC)&UnicowsLoader::EnumPrintersWImpl; 60 } 58 61 59 62 HMODULE __stdcall UnicowsLoader::LoadUnicows(void) -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Component.cpp
r309 r333 5250 5250 jint wheelAmt = 0; 5251 5251 jint id = (env)->GetIntField(mouseEvent, AwtAWTEvent::idID); 5252 UINT message ;5252 UINT message = 0; 5253 5253 switch (id) { 5254 5254 case java_awt_event_MouseEvent_MOUSE_PRESSED: { -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp
r278 r333 367 367 368 368 BOOL fontSmoothing = FALSE, settingsChanged; 369 UINT fontSmoothingType=0, fontSmoothingContrast=0, subPixelOrder ;369 UINT fontSmoothingType=0, fontSmoothingContrast=0, subPixelOrder=0; 370 370 371 371 if (firstTime) { -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp
r278 r333 1178 1178 m_parent = parent; 1179 1179 1180 m_buffer = ( signed char *)safe_Calloc(sizeof(signed char), m_blen = blen);1180 m_buffer = (jbyte *)safe_Calloc(sizeof(jbyte), m_blen = blen); 1181 1181 1182 1182 env->GetByteArrayRegion(buffer, 0, blen, m_buffer); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_DnDDS.h
r278 r333 207 207 AwtDragSource* m_parent; 208 208 209 signed char*m_buffer;209 jbyte* m_buffer; 210 210 unsigned int m_off; 211 211 unsigned int m_blen; -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Font.cpp
r278 r333 891 891 892 892 for (; len; len--) { 893 result += widths[ *pStr++];893 result += widths[(unsigned char)*pStr++]; 894 894 } 895 895 } catch (...) { … … 1199 1199 1200 1200 LONG AwtFontCache::IncRefCount(Item* item){ 1201 LONG newVal ;1201 LONG newVal = 0; 1202 1202 1203 1203 if(NULL != item){ … … 1208 1208 1209 1209 LONG AwtFontCache::DecRefCount(Item* item){ 1210 LONG newVal ;1210 LONG newVal = 0; 1211 1211 1212 1212 if(NULL != item){ -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Frame.cpp
r278 r333 147 147 PDATA pData; 148 148 HWND hwndParent = NULL; 149 AwtFrame* frame ;149 AwtFrame* frame = NULL; 150 150 jclass cls = NULL; 151 151 jclass inputMethodWindowCls = NULL; … … 872 872 MsgRouting AwtFrame::WmActivate(UINT nState, BOOL fMinimized, HWND opposite) 873 873 { 874 jint type ;874 jint type = 0; 875 875 BOOL doActivateFrame = TRUE; 876 876 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Label.cpp
r278 r333 125 125 if (env->EnsureLocalCapacity(3) < 0) 126 126 return; 127 long x ,y;127 long x = 0, y; 128 128 SIZE size; 129 129 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Menu.h
r278 r333 80 80 /*for multifont menu */ 81 81 BOOL IsTopMenu(); 82 virtual AwtMenuItem* GetItem(jobject target, longindex);82 virtual AwtMenuItem* GetItem(jobject target, jint index); 83 83 84 84 virtual int CountItem(jobject target); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp
r278 r333 915 915 HGLOBAL hDevNames = AwtPrintControl::getPrintHDName(env, self); 916 916 if (hDevNames != NULL) { 917 DWORD dmFields ;917 DWORD dmFields = 0; 918 918 DEVNAMES *devnames = (DEVNAMES *)::GlobalLock(hDevNames); 919 919 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextArea.cpp
r278 r333 114 114 { 115 115 /* Adjust style for scrollbar visibility and word wrap */ 116 DWORD scroll_style ;116 DWORD scroll_style = 0; 117 117 jint scrollbarVisibility = 118 118 env->GetIntField(target, AwtTextArea::scrollbarVisibilityID); -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp
r278 r333 775 775 JNI_CHECK_PEER_RETURN_NULL(self); 776 776 AwtComponent* c = (AwtComponent*)pData; 777 /* 778 int line = 0;779 int lineIndex = 0;780 while (lineIndex < i) {781 lineIndex = c->SendMessage(EM_LINEINDEX, 1 + line++);782 }783 line--; // line is now the line which contains our character at position 'i'784 int offsetIndex = i - lineIndex; // offsetIndex is now distance in on the line785 * / 777 778 // int line = 0; 779 // int lineIndex = 0; 780 // while (lineIndex < i) { 781 // lineIndex = c->SendMessage(EM_LINEINDEX, 1 + line++); 782 // } 783 // line--; // line is now the line which contains our character at position 'i' 784 // int offsetIndex = i - lineIndex; // offsetIndex is now distance in on the line 785 786 786 POINT p; 787 787 … … 793 793 jint charHeight; 794 794 795 /* 796 HFONT font = c->SendMessage(WM_GETFONT); 797 if (GetCharWidth32(c->hdc, i, i, &charWidth) != 0) { // [[[FIXME]]] need to get hDC! 798 799 JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); 800 jobject rect = JNU_NewObjectByName(env, "java/awt/Rectangle", "(IIII)V", 801 (jint) p.x, (jint) p.y, charWidth, charHeight); 802 803 return rect; 804 } 805 * / 795 // HFONT font = c->SendMessage(WM_GETFONT); 796 // if (GetCharWidth32(c->hdc, i, i, &charWidth) != 0) { // [[[FIXME]]] need to get hDC! 797 // 798 // JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); 799 // jobject rect = JNU_NewObjectByName(env, "java/awt/Rectangle", "(IIII)V", 800 // (jint) p.x, (jint) p.y, charWidth, charHeight); 801 // 802 // return rect; 803 // } 804 806 805 return (jobject) 0; 807 806 -
trunk/openjdk/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp
r278 r333 412 412 #endif 413 413 414 // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\414 /////////////////////////////////////////////////////////////////////////// 415 415 // Bugs 4032109, 4047966, and 4071991 to fix AWT 416 416 // crash in 16 color display mode. 16 color mode is supported. Less … … 583 583 584 584 jobject gcomponent = env->NewGlobalRef((jobject)component); 585 jobject gparent ;585 jobject gparent = 0; 586 586 if (isParentALocalReference) gparent = env->NewGlobalRef((jobject)parent); 587 587 ComponentCreatePacket ccp = { gcomponent,
Note:
See TracChangeset
for help on using the changeset viewer.