Changeset 12 for trunk/src/helpers/textview.c
- Timestamp:
- Nov 4, 2000, 8:55:45 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/textview.c
r8 r12 269 269 lstInit(&pxfd->llWords, 270 270 TRUE); // auto-free items 271 xstrInit(&pxfd->strViewText, 0); 271 272 } 272 273 … … 1088 1089 pxfd->ulViewportCY = 0; 1089 1090 1090 if (pxfd-> pszViewText)1091 if (pxfd->strViewText.cbAllocated) 1091 1092 { 1092 ULONG ulTextLen = strlen(pxfd->pszViewText);1093 ULONG ulTextLen = pxfd->strViewText.ulLength; 1093 1094 1094 1095 FORMATLINEBUF flbuf; … … 1102 1103 flbuf.pfmtc = &pxfd->fmtcStandard; 1103 1104 flbuf.lPointSize = pxfd->fmtcStandard.lPointSize; 1104 flbuf.pLastChar = pxfd-> pszViewText+ ulTextLen;1105 flbuf.pLastChar = pxfd->strViewText.psz + ulTextLen; 1105 1106 1106 1107 if (ulTextLen) … … 1115 1116 */ 1116 1117 1117 PSZ pCurrent = pxfd-> pszViewText;1118 PSZ pCurrent = pxfd->strViewText.psz; 1118 1119 1119 1120 // loop until null terminator … … 2394 2395 if (pwndParams->fsStatus & WPM_TEXT) 2395 2396 { 2396 xstrcpy(&ptxvd->xfd. pszViewText, pwndParams->pszText);2397 xstrcpy(&ptxvd->xfd.strViewText, pwndParams->pszText); 2397 2398 ptxvd->lViewXOfs = 0; 2398 2399 ptxvd->lViewYOfs = 0; … … 3061 3062 3062 3063 case WM_DESTROY: 3063 if (ptxvd->xfd.pszViewText) 3064 free(ptxvd->xfd.pszViewText); 3064 xstrClear(&ptxvd->xfd.strViewText); 3065 3065 lstClear(&ptxvd->xfd.llRectangles); 3066 3066 lstClear(&ptxvd->xfd.llWords); … … 3472 3472 3473 3473 // use text from window 3474 x fd.pszViewText = pszViewText;3474 xstrcpy(&xfd.strViewText, pszViewText); 3475 3475 3476 3476 // setup page … … 3621 3621 hdc, 3622 3622 hps, 3623 ptxvd->xfd. pszViewText,3623 ptxvd->xfd.strViewText.psz, 3624 3624 ulSize, 3625 3625 pszFaceName,
Note:
See TracChangeset
for help on using the changeset viewer.