Changeset 333 for trunk/openjdk/jdk/src/windows
- Timestamp:
- Feb 22, 2012, 8:50:40 PM (13 years ago)
- Location:
- trunk/openjdk/jdk/src/windows
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
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.