Mercurial > dwindows
comparison os2/dw.c @ 72:ab77a22a2a36
Added localization APIs as well as some miscellaneous bug fixes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 15 Feb 2002 09:30:50 +0000 |
parents | 5e7a4d93d8d7 |
children | eeb98f881663 |
comparison
equal
deleted
inserted
replaced
71:291c30a92b9b | 72:ab77a22a2a36 |
---|---|
5422 while((blah = (void *)WinSendMsg(handle, CM_ALLOCRECORD, MPFROMLONG(size), MPFROMLONG(rowcount))) == NULL) | 5422 while((blah = (void *)WinSendMsg(handle, CM_ALLOCRECORD, MPFROMLONG(size), MPFROMLONG(rowcount))) == NULL) |
5423 { | 5423 { |
5424 z++; | 5424 z++; |
5425 if(z > 5000000) | 5425 if(z > 5000000) |
5426 break; | 5426 break; |
5427 DosSleep(1); | 5427 dw_main_sleep(1); |
5428 } | 5428 } |
5429 | 5429 |
5430 if(!blah) | 5430 if(!blah) |
5431 return NULL; | 5431 return NULL; |
5432 | 5432 |
5472 if(!flags) | 5472 if(!flags) |
5473 return; | 5473 return; |
5474 | 5474 |
5475 temp = (PRECORDCORE)ci->data; | 5475 temp = (PRECORDCORE)ci->data; |
5476 | 5476 |
5477 if(!WinSendMsg(handle, CM_QUERYCNRINFO, (MPARAM)&cnr, MPFROMSHORT(sizeof(CNRINFO)))) | 5477 z = 0; |
5478 return; | 5478 |
5479 | 5479 while(WinSendMsg(handle, CM_QUERYCNRINFO, (MPARAM)&cnr, MPFROMSHORT(sizeof(CNRINFO))) == 0) |
5480 { | |
5481 z++; | |
5482 if(z > 5000000) | |
5483 return; | |
5484 dw_main_sleep(1); | |
5485 } | |
5480 currentcount = cnr.cRecords; | 5486 currentcount = cnr.cRecords; |
5481 | 5487 |
5482 /* Figure out the offsets to the items in the struct */ | 5488 /* Figure out the offsets to the items in the struct */ |
5483 for(z=0;z<column;z++) | 5489 for(z=0;z<column;z++) |
5484 { | 5490 { |
5570 if(!ci) | 5576 if(!ci) |
5571 return; | 5577 return; |
5572 | 5578 |
5573 temp = (PRECORDCORE)ci->data; | 5579 temp = (PRECORDCORE)ci->data; |
5574 | 5580 |
5575 WinSendMsg(ci->handle, CM_QUERYCNRINFO, (MPARAM)&cnr, MPFROMSHORT(sizeof(CNRINFO))); | 5581 z = 0; |
5582 | |
5583 while(WinSendMsg(ci->handle, CM_QUERYCNRINFO, (MPARAM)&cnr, MPFROMSHORT(sizeof(CNRINFO))) == 0) | |
5584 { | |
5585 z++; | |
5586 if(z > 5000000) | |
5587 return; | |
5588 dw_main_sleep(1); | |
5589 } | |
5576 currentcount = cnr.cRecords; | 5590 currentcount = cnr.cRecords; |
5577 | 5591 |
5578 for(z=0;z<(row-currentcount);z++) | 5592 for(z=0;z<(row-currentcount);z++) |
5579 temp = temp->preccNextRecord; | 5593 temp = temp->preccNextRecord; |
5580 | 5594 |
5611 while(WinSendMsg(handle, CM_INSERTRECORD, MPFROMP(ci->data), MPFROMP(&recin)) == 0) | 5625 while(WinSendMsg(handle, CM_INSERTRECORD, MPFROMP(ci->data), MPFROMP(&recin)) == 0) |
5612 { | 5626 { |
5613 z++; | 5627 z++; |
5614 if(z > 5000000) | 5628 if(z > 5000000) |
5615 break; | 5629 break; |
5616 DosSleep(1); | 5630 dw_main_sleep(1); |
5617 } | 5631 } |
5618 | 5632 |
5619 free(ci); | 5633 free(ci); |
5620 } | 5634 } |
5621 | 5635 |
5632 while((int)WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)0L, MPFROM2SHORT(0, (redraw ? CMA_INVALIDATE : 0) | CMA_FREE)) == -1) | 5646 while((int)WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)0L, MPFROM2SHORT(0, (redraw ? CMA_INVALIDATE : 0) | CMA_FREE)) == -1) |
5633 { | 5647 { |
5634 z++; | 5648 z++; |
5635 if(z > 5000000) | 5649 if(z > 5000000) |
5636 break; | 5650 break; |
5637 DosSleep(1); | 5651 dw_main_sleep(1); |
5638 } | 5652 } |
5639 } | 5653 } |
5640 | 5654 |
5641 /* | 5655 /* |
5642 * Removes the first x rows from a container. | 5656 * Removes the first x rows from a container. |
5662 while((int)WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)prc, MPFROM2SHORT(current, CMA_INVALIDATE | CMA_FREE)) == -1) | 5676 while((int)WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)prc, MPFROM2SHORT(current, CMA_INVALIDATE | CMA_FREE)) == -1) |
5663 { | 5677 { |
5664 z++; | 5678 z++; |
5665 if(z > 5000000) | 5679 if(z > 5000000) |
5666 break; | 5680 break; |
5667 DosSleep(1); | 5681 dw_main_sleep(1); |
5668 } | 5682 } |
5669 | 5683 |
5670 free(prc); | 5684 free(prc); |
5671 } | 5685 } |
5672 | 5686 |