comparison os2/dw.c @ 1000:99907f19a703

Minor fixed and code cleanups on OS/2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 08 May 2011 03:28:10 +0000
parents 69cf9f26e899
children f1256b32fd22
comparison
equal deleted inserted replaced
999:1b40686277df 1000:99907f19a703
6367 int amount, len = strlen(buffer), written = 0; 6367 int amount, len = strlen(buffer), written = 0;
6368 6368
6369 while(written < len) 6369 while(written < len)
6370 { 6370 {
6371 int z, x = 0; 6371 int z, x = 0;
6372 char buf[1024];
6373 6372
6374 if((len - written) > 65535) 6373 if((len - written) > 65535)
6375 amount = 65535; 6374 amount = 65535;
6376 else 6375 else
6377 amount = len - written; 6376 amount = len - written;
6406 * startpoint: Point to start grabbing text. 6405 * startpoint: Point to start grabbing text.
6407 * length: Amount of text to be grabbed. 6406 * length: Amount of text to be grabbed.
6408 */ 6407 */
6409 void API dw_mle_export(HWND handle, char *buffer, int startpoint, int length) 6408 void API dw_mle_export(HWND handle, char *buffer, int startpoint, int length)
6410 { 6409 {
6411 PBYTE mlebuf; 6410 PBYTE mlebuf;
6412 6411
6413 /* Work around 64K limit */ 6412 /* Work around 64K limit */
6414 if(!DosAllocMem((PPVOID) &mlebuf, 65535, PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_TILE)) 6413 if(!DosAllocMem((PPVOID) &mlebuf, 65535, PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_TILE))
6415 { 6414 {
6416 int amount, copied, written = 0; 6415 int amount, copied, written = 0;
6519 * handle: Handle to the MLE to be positioned. 6518 * handle: Handle to the MLE to be positioned.
6520 * point: Point to position cursor. 6519 * point: Point to position cursor.
6521 */ 6520 */
6522 void API dw_mle_set_cursor(HWND handle, int point) 6521 void API dw_mle_set_cursor(HWND handle, int point)
6523 { 6522 {
6524 point--;
6525 WinSendMsg(handle, MLM_SETSEL, MPFROMLONG(point), MPFROMLONG(point)); 6523 WinSendMsg(handle, MLM_SETSEL, MPFROMLONG(point), MPFROMLONG(point));
6526 } 6524 }
6527 6525
6528 /* 6526 /*
6529 * Finds text in an MLE box. 6527 * Finds text in an MLE box.