Changeset 3922 for trunk/src/riched32/text-writer.c
- Timestamp:
- Aug 2, 2000, 4:58:40 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/riched32/text-writer.c
r3515 r3922 1 /* $Id: text-writer.c,v 1.2 2000-08-02 14:58:40 bird Exp $ */ 1 2 /* 2 3 * text-writer -- RTF-to-text translation writer code. … … 58 59 int RTFToBuffer(char* pBuffer, int nBufferSize) 59 60 { 60 61 /* check if the buffer is big enough to hold all characters */ 61 62 /* check if the buffer is big enough to hold all characters */ 62 63 /* we require one more for the '\0' */ 63 64 64 65 65 66 if(nBufferSize < charlist.nCount + 1) { 66 67 return charlist.nCount + CHARLIST_CountChar(&charlist, '\n') + 1; 67 68 } 68 69 69 70 while(charlist.nCount) 70 71 { … … 74 75 *pBuffer = '\r'; 75 76 pBuffer++; 76 *pBuffer = '\n'; 77 *pBuffer = '\n'; 77 78 } 78 79 pBuffer++; … … 80 81 *pBuffer = '\0'; 81 82 82 return 0; 83 return 0; 83 84 } 84 85 … … 243 244 void PutStdChar (int stdCode) 244 245 { 245 246 246 247 char *oStr = (char *) NULL; 247 248 char buf[rtfBufSiz]; 248 249 249 250 /* if (stdCode == rtfSC_nothing) 250 251 RTFPanic ("Unknown character code, logic error\n"); 251 */ 252 */ 252 253 oStr = outMap[stdCode]; 253 254 if (oStr == (char *) NULL) /* no output sequence in map */
Note:
See TracChangeset
for help on using the changeset viewer.