| /plan9/sys/src/cmd/aux/antiword/ |
| H A D | imgexam.c | 112 bFillPaletteDIB(FILE *pFile, imagedata_type *pImg, BOOL bNewFormat) in bFillPaletteDIB() argument 117 fail(pFile == NULL); in bFillPaletteDIB() 138 pImg->aucPalette[iIndex][2] = (UCHAR)iNextByte(pFile); in bFillPaletteDIB() 139 pImg->aucPalette[iIndex][1] = (UCHAR)iNextByte(pFile); in bFillPaletteDIB() 140 pImg->aucPalette[iIndex][0] = (UCHAR)iNextByte(pFile); in bFillPaletteDIB() 142 (void)iNextByte(pFile); in bFillPaletteDIB() 162 bExamineDIB(FILE *pFile, imagedata_type *pImg) in bExamineDIB() argument 167 tHeaderSize = (size_t)ulNextLong(pFile); in bExamineDIB() 170 pImg->iWidth = (int)usNextWord(pFile); in bExamineDIB() 171 pImg->iHeight = (int)usNextWord(pFile); in bExamineDIB() [all …]
|
| H A D | wordlib.c | 18 bCheckBytes(FILE *pFile, const UCHAR *aucBytes, size_t tBytes) in bCheckBytes() argument 22 fail(pFile == NULL || aucBytes == NULL || tBytes == 0); in bCheckBytes() 24 rewind(pFile); in bCheckBytes() 27 iChar = getc(pFile); in bCheckBytes() 42 bIsWordForDosFile(FILE *pFile, long lFilesize) in bIsWordForDosFile() argument 49 if (pFile == NULL || lFilesize < 0) { in bIsWordForDosFile() 57 return bCheckBytes(pFile, aucBytes, elementsof(aucBytes)); in bIsWordForDosFile() 65 bIsWordFileWithOLE(FILE *pFile, long lFilesize) in bIsWordFileWithOLE() argument 71 if (pFile == NULL || lFilesize < 0) { in bIsWordFileWithOLE() 102 return bCheckBytes(pFile, aucBytes, elementsof(aucBytes)); in bIsWordFileWithOLE() [all …]
|
| H A D | properties.c | 18 vGetPropertyInfo(FILE *pFile, const pps_info_type *pPPS, in vGetPropertyInfo() argument 27 fail(pFile == NULL); in vGetPropertyInfo() 39 vGet0DopInfo(pFile, aucHeader); in vGetPropertyInfo() 40 vGet0SepInfo(pFile, aucHeader); in vGetPropertyInfo() 41 vGet0PapInfo(pFile, aucHeader); in vGetPropertyInfo() 47 vGet0ChrInfo(pFile, aucHeader); in vGetPropertyInfo() 54 vSet0SummaryInfo(pFile, aucHeader); in vGetPropertyInfo() 58 vGet2Stylesheet(pFile, iWordVersion, aucHeader); in vGetPropertyInfo() 59 vGet2DopInfo(pFile, aucHeader); in vGetPropertyInfo() 60 vGet2SepInfo(pFile, aucHeader); in vGetPropertyInfo() [all …]
|
| H A D | png2eps.c | 25 tSkipToData(FILE *pFile, size_t tMaxBytes, size_t *ptSkipped) in tSkipToData() argument 31 fail(pFile == NULL); in tSkipToData() 36 tDataLength = (size_t)ulNextLongBE(pFile); in tSkipToData() 42 ulTmp = (ULONG)iNextByte(pFile); in tSkipToData() 66 (void)tSkipBytes(pFile, tToSkip); in tSkipToData() 79 tFindFirstPixelData(FILE *pFile, size_t tMaxBytes, size_t *ptSkipped) in tFindFirstPixelData() argument 81 fail(pFile == NULL); in tFindFirstPixelData() 91 (void)tSkipBytes(pFile, 8); in tFindFirstPixelData() 94 return tSkipToData(pFile, tMaxBytes, ptSkipped); in tFindFirstPixelData() 103 tFindNextPixelData(FILE *pFile, size_t tMaxBytes, size_t *ptSkipped) in tFindNextPixelData() argument [all …]
|
| H A D | dib2sprt.c | 145 vDecode1bpp(FILE *pFile, UCHAR *pucData, const imagedata_type *pImg) in vDecode1bpp() argument 152 fail(pFile == NULL); in vDecode1bpp() 164 iTmp = iNextByte(pFile); in vDecode1bpp() 180 (void)tSkipBytes(pFile, iPadding); in vDecode1bpp() 188 vDecode4bpp(FILE *pFile, UCHAR *pucData, const imagedata_type *pImg) in vDecode4bpp() argument 195 fail(pFile == NULL); in vDecode4bpp() 207 iTmp = iNextByte(pFile); in vDecode4bpp() 217 (void)tSkipBytes(pFile, iPadding); in vDecode4bpp() 225 vDecode8bpp(FILE *pFile, UCHAR *pucData, const imagedata_type *pImg) in vDecode8bpp() argument 231 fail(pFile == NULL); in vDecode8bpp() [all …]
|
| H A D | fmt_text.c | 43 vPrintFMT(FILE *pFile, in vPrintFMT() argument 55 fprintf(pFile, "%.*s", (int)tStringLength, szString); in vPrintFMT() 76 (void)putc(' ', pFile); in vPrintFMT() 87 (void)putc('*', pFile); in vPrintFMT() 90 (void)putc('/', pFile); in vPrintFMT() 93 (void)putc('_', pFile); in vPrintFMT() 99 (void)putc(' ', pFile); in vPrintFMT() 101 (void)putc((char)*pucByte, pFile); in vPrintFMT() 108 (void)putc('_', pFile); in vPrintFMT() 111 (void)putc('/', pFile); in vPrintFMT() [all …]
|
| H A D | wordole.c | 44 ulReadLong(FILE *pFile, ULONG ulOffset) in ulReadLong() argument 48 fail(pFile == NULL); in ulReadLong() 50 if (!bReadBytes(aucBytes, 4, ulOffset, pFile)) { in ulReadLong() 85 tReadBlockIndices(FILE *pFile, ULONG *aulBlockDepot, in tReadBlockIndices() argument 92 fail(pFile == NULL || aulBlockDepot == NULL); in tReadBlockIndices() 96 if (!bReadBytes(aucBytes, BIG_BLOCK_SIZE, ulOffset, pFile)) { in tReadBlockIndices() 114 bGetBBD(FILE *pFile, const ULONG *aulDepot, size_t tDepotLen, in bGetBBD() argument 121 fail(pFile == NULL || aulDepot == NULL || aulBBD == NULL); in bGetBBD() 129 tDone = tReadBlockIndices(pFile, aulBBD, tToGo, ulBegin); in bGetBBD() 144 bGetSBD(FILE *pFile, const ULONG *aulDepot, size_t tDepotLen, in bGetSBD() argument [all …]
|
| H A D | datalist.c | 120 ulGetDataOffset(FILE *pFile) in ulGetDataOffset() argument 131 bSetDataOffset(FILE *pFile, ULONG ulFileOffset) in bSetDataOffset() argument 154 if (!bReadBytes(aucBlock, tReadLen, ulFileOffset, pFile)) { in bSetDataOffset() 170 iNextByte(FILE *pFile) in iNextByte() argument 199 if (!bReadBytes(aucBlock, tReadLen, ulReadOff, pFile)) { in iNextByte() 216 usNextWord(FILE *pFile) in usNextWord() argument 220 usLSB = (USHORT)iNextByte(pFile); in usNextWord() 225 usMSB = (USHORT)iNextByte(pFile); in usNextWord() 242 ulNextLong(FILE *pFile) in ulNextLong() argument 246 ulLSW = (ULONG)usNextWord(pFile); in ulNextLong() [all …]
|
| H A D | notes.c | 60 vGet0FootnotesInfoAndText(FILE *pFile, const UCHAR *aucHeader) in vGet0FootnotesInfoAndText() argument 72 fail(pFile == NULL || aucHeader == NULL); in vGet0FootnotesInfoAndText() 87 if (!bReadBytes(aucTmp, 2, ulBeginFootnoteInfo, pFile)) { in vGet0FootnotesInfoAndText() 99 tFootnoteInfoLen, ulBeginFootnoteInfo + 4, pFile)) { in vGet0FootnotesInfoAndText() 154 vGet0NotesInfo(FILE *pFile, const UCHAR *aucHeader) in vGet0NotesInfo() argument 158 vGet0FootnotesInfoAndText(pFile, aucHeader); in vGet0NotesInfo() 166 vGet2FootnotesInfo(FILE *pFile, const UCHAR *aucHeader) in vGet2FootnotesInfo() argument 175 fail(pFile == NULL || aucHeader == NULL); in vGet2FootnotesInfo() 191 tFootnoteInfoLen, ulBeginFootnoteInfo, pFile)) { in vGet2FootnotesInfo() 218 vGet2FootnotesText(FILE *pFile, const UCHAR *aucHeader) in vGet2FootnotesText() argument [all …]
|
| H A D | main_u.c | 153 FILE *pFile; in bProcessFile() local 164 pFile = pStdin2TmpFile(&lFilesize); in bProcessFile() 165 if (pFile == NULL) { in bProcessFile() 170 pFile = fopen(szFilename, "rb"); in bProcessFile() 171 if (pFile == NULL) { in bProcessFile() 178 (void)fclose(pFile); in bProcessFile() 184 iWordVersion = iGuessVersionNumber(pFile, lFilesize); in bProcessFile() 186 if (bIsRtfFile(pFile)) { in bProcessFile() 190 } if (bIsWordPerfectFile(pFile)) { in bProcessFile() 202 (void)fclose(pFile); in bProcessFile() [all …]
|
| H A D | jpeg2eps.c | 23 vCopy2File(FILE *pFile, ULONG ulFileOffset, size_t tPictureLen) in vCopy2File() argument 30 if (!bSetDataOffset(pFile, ulFileOffset)) { in vCopy2File() 40 iTmp = iNextByte(pFile); in vCopy2File() 57 bTranslateJPEG(diagram_type *pDiag, FILE *pFile, in bTranslateJPEG() argument 61 vCopy2File(pFile, ulFileOffset, tPictureLen); in bTranslateJPEG() 65 if (!bSetDataOffset(pFile, ulFileOffset)) { in bTranslateJPEG() 70 vASCII85EncodeFile(pFile, pDiag->pOutFile, tPictureLen); in bTranslateJPEG()
|
| H A D | worddos.c | 18 bGetDocumentText(FILE *pFile, long lFilesize, const UCHAR *aucHeader) in bGetDocumentText() argument 25 fail(pFile == NULL); in bGetDocumentText() 71 iInitDocumentDOS(FILE *pFile, long lFilesize) in iInitDocumentDOS() argument 78 fail(pFile == NULL); in iInitDocumentDOS() 85 if (!bReadBytes(aucHeader, 128, 0x00, pFile)) { in iInitDocumentDOS() 97 bSuccess = bGetDocumentText(pFile, lFilesize, aucHeader); in iInitDocumentDOS() 99 vGetPropertyInfo(pFile, NULL, in iInitDocumentDOS() 102 vSetDefaultTabWidth(pFile, NULL, in iInitDocumentDOS() 105 vGetNotesInfo(pFile, NULL, in iInitDocumentDOS()
|
| H A D | tabstop.c | 37 vSet2DefaultTabWidth(FILE *pFile, const UCHAR *aucHeader) in vSet2DefaultTabWidth() argument 44 fail(pFile == NULL || aucHeader == NULL); in vSet2DefaultTabWidth() 56 if (!bReadBytes(aucBuffer, tDocpInfoLen, ulBeginDocpInfo, pFile)) { in vSet2DefaultTabWidth() 70 vSet6DefaultTabWidth(FILE *pFile, ULONG ulStartBlock, in vSet6DefaultTabWidth() argument 88 if (!bReadBuffer(pFile, ulStartBlock, in vSet6DefaultTabWidth() 104 vSet8DefaultTabWidth(FILE *pFile, const pps_info_type *pPPS, in vSet8DefaultTabWidth() argument 143 if (!bReadBuffer(pFile, pPPS->tTable.ulSB, in vSet8DefaultTabWidth() 159 vSetDefaultTabWidth(FILE *pFile, const pps_info_type *pPPS, in vSetDefaultTabWidth() argument 164 fail(pFile == NULL && iWordVersion >= 1); in vSetDefaultTabWidth() 179 vSet2DefaultTabWidth(pFile, aucHeader); in vSetDefaultTabWidth() [all …]
|
| H A D | wordwin.c | 18 bGetDocumentText(FILE *pFile, const UCHAR *aucHeader) in bGetDocumentText() argument 28 fail(pFile == NULL); in bGetDocumentText() 84 vSplitBlockList(pFile, in bGetDocumentText() 105 vGetDocumentData(FILE *pFile, const UCHAR *aucHeader) in vGetDocumentData() argument 168 iInitDocumentWIN(FILE *pFile, long lFilesize) in iInitDocumentWIN() argument 175 fail(pFile == NULL); in iInitDocumentWIN() 182 if (!bReadBytes(aucHeader, 384, 0x00, pFile)) { in iInitDocumentWIN() 195 bSuccess = bGetDocumentText(pFile, aucHeader); in iInitDocumentWIN() 197 vGetDocumentData(pFile, aucHeader); in iInitDocumentWIN() 198 vGetPropertyInfo(pFile, NULL, in iInitDocumentWIN() [all …]
|
| H A D | saveas.c | 48 bWrite2File(void *pvBytes, size_t tSize, FILE *pFile, const char *szFilename) in bWrite2File() argument 50 if (fwrite(pvBytes, sizeof(char), tSize, pFile) != tSize) { in bWrite2File() 63 FILE *pFile; in bText2File() local 79 pFile = fopen(szFilename, "w"); in bText2File() 80 if (pFile == NULL) { in bText2File() 109 1, pFile, szFilename); in bText2File() 118 1, pFile, szFilename); in bText2File() 126 strlen(pText->text), pFile, szFilename); in bText2File() 147 bSuccess = bWrite2File("\n", 1, pFile, szFilename); in bText2File() 149 (void)fclose(pFile); in bText2File() [all …]
|
| H A D | wordmac.c | 18 bGetDocumentText(FILE *pFile, const UCHAR *aucHeader) in bGetDocumentText() argument 26 fail(pFile == NULL); in bGetDocumentText() 72 iInitDocumentMAC(FILE *pFile, long lFilesize) in iInitDocumentMAC() argument 79 fail(pFile == NULL); in iInitDocumentMAC() 86 if (!bReadBytes(aucHeader, 256, 0x00, pFile)) { in iInitDocumentMAC() 98 bSuccess = bGetDocumentText(pFile, aucHeader); in iInitDocumentMAC() 100 vGetPropertyInfo(pFile, NULL, in iInitDocumentMAC() 103 vSetDefaultTabWidth(pFile, NULL, in iInitDocumentMAC()
|
| H A D | options.c | 180 FILE *pFile; in pOpenCharacterMappingFile() local 211 pFile = fopen(szMappingFile, "r"); in pOpenCharacterMappingFile() 212 if (pFile != NULL) { in pOpenCharacterMappingFile() 213 return pFile; in pOpenCharacterMappingFile() 230 pFile = fopen(szMappingFile, "r"); in pOpenCharacterMappingFile() 231 if (pFile != NULL) { in pOpenCharacterMappingFile() 232 return pFile; in pOpenCharacterMappingFile() 247 pFile = fopen(szMappingFile, "r"); in pOpenCharacterMappingFile() 248 if (pFile != NULL) { in pOpenCharacterMappingFile() 249 return pFile; in pOpenCharacterMappingFile() [all …]
|
| H A D | fonts_u.c | 29 FILE *pFile; in pOpenFontTableFile() local 52 pFile = fopen(szEnvironmentFile, "r"); in pOpenFontTableFile() 53 if (pFile != NULL) { in pOpenFontTableFile() 54 return pFile; in pOpenFontTableFile() 72 pFile = fopen(szLocalFile, "r"); in pOpenFontTableFile() 73 if (pFile != NULL) { in pOpenFontTableFile() 74 return pFile; in pOpenFontTableFile() 81 pFile = fopen(szGlobalFile, "r"); in pOpenFontTableFile() 82 if (pFile != NULL) { in pOpenFontTableFile() 83 return pFile; in pOpenFontTableFile()
|
| H A D | imgtrans.c | 21 bTranslateImage(diagram_type *pDiag, FILE *pFile, BOOL bMinimalInformation, in bTranslateImage() argument 29 fail(pFile == NULL); in bTranslateImage() 44 return bTranslateDIB(pDiag, pFile, in bTranslateImage() 48 return bTranslateJPEG(pDiag, pFile, in bTranslateImage() 56 return bTranslatePNG(pDiag, pFile, in bTranslateImage()
|
| H A D | jpeg2sprt.c | 49 bSave2Draw(diagram_type *pDiag, FILE *pFile, in bSave2Draw() argument 58 iByte = iNextByte(pFile); in bSave2Draw() 84 bTranslateJPEG(diagram_type *pDiag, FILE *pFile, in bTranslateJPEG() argument 88 if (!bSetDataOffset(pFile, ulFileOffset)) { in bTranslateJPEG() 93 return bSave2Draw(pDiag, pFile, tPictureLen, pImg); in bTranslateJPEG()
|
| H A D | summary.c | 303 pucAnalyseSummaryInfoHeader(FILE *pFile, in pucAnalyseSummaryInfoHeader() argument 333 if (!bReadBuffer(pFile, ulStartBlock, in pucAnalyseSummaryInfoHeader() 381 if (!bReadBuffer(pFile, ulStartBlock, in pucAnalyseSummaryInfoHeader() 409 if (!bReadBuffer(pFile, ulStartBlock, in pucAnalyseSummaryInfoHeader() 423 vSet0SummaryInfo(FILE *pFile, const UCHAR *aucHeader) in vSet0SummaryInfo() argument 432 fail(pFile == NULL || aucHeader == NULL); in vSet0SummaryInfo() 459 if (!bReadBytes(aucBuffer, tLen, ulBeginSumdInfo, pFile)) { in vSet0SummaryInfo() 489 vSet2SummaryInfo(FILE *pFile, int iWordVersion, const UCHAR *aucHeader) in vSet2SummaryInfo() argument 497 fail(pFile == NULL || aucHeader == NULL); in vSet2SummaryInfo() 545 if (!bReadBytes(aucBuffer, tSumdInfoLen, ulBeginSumdInfo, pFile)) { in vSet2SummaryInfo() [all …]
|
| H A D | prop0.c | 90 vGet0DopInfo(FILE *pFile, const UCHAR *aucHeader) in vGet0DopInfo() argument 113 if (bReadBytes(aucBuffer, tLen, ulBeginSumdInfo, pFile)) { in vGet0DopInfo() 166 vGet0SepInfo(FILE *pFile, const UCHAR *aucHeader) in vGet0SepInfo() argument 175 fail(pFile == NULL || aucHeader == NULL); in vGet0SepInfo() 189 if (!bReadBytes(aucTmp, 2, ulBeginSectInfo, pFile)) { in vGet0SepInfo() 199 if (!bReadBytes(aucBuffer, tSectInfoLen, ulBeginSectInfo + 4, pFile)) { in vGet0SepInfo() 221 if (!bReadBytes(aucTmp, 1, ulSectPage, pFile)) { in vGet0SepInfo() 231 if (!bReadBytes(aucFpage, tBytes, ulSectPage, pFile)) { in vGet0SepInfo() 325 vGet0PapInfo(FILE *pFile, const UCHAR *aucHeader) in vGet0PapInfo() argument 332 fail(pFile == NULL || aucHeader == NULL); in vGet0PapInfo() [all …]
|
| H A D | main_ros.c | 248 FILE *pFile; in vProcessFile() local 259 pFile = fopen(szFilename, "rb"); in vProcessFile() 260 if (pFile == NULL) { in vProcessFile() 267 (void)fclose(pFile); in vProcessFile() 272 iWordVersion = iGuessVersionNumber(pFile, lFilesize); in vProcessFile() 274 if (bIsRtfFile(pFile)) { in vProcessFile() 278 } if (bIsWordPerfectFile(pFile)) { in vProcessFile() 285 (void)fclose(pFile); in vProcessFile() 289 rewind(pFile); in vProcessFile() 300 (void)fclose(pFile); in vProcessFile() [all …]
|
| H A D | blocklist.c | 278 bIsEmptyBox(FILE *pFile, const list_mem_type *pAnchor) in bIsEmptyBox() argument 285 fail(pFile == NULL); in bIsEmptyBox() 303 pCurr->tInfo.ulFileOffset, pFile)) { in bIsEmptyBox() 337 vSplitBlockList(FILE *pFile, ULONG ulTextLen, ULONG ulFootnoteLen, in vSplitBlockList() argument 385 if (bIsEmptyBox(pFile, pTextBoxAnchor)) { in vSplitBlockList() 388 if (bIsEmptyBox(pFile, pHdrTextBoxAnchor)) { in vSplitBlockList() 487 usGetNextByte(FILE *pFile, readinfo_type *pInfoCurrent, list_mem_type *pAnchor, in usGetNextByte() argument 528 tReadLen, ulReadOff, pFile)) { in usGetNextByte() 558 usGetNextChar(FILE *pFile, list_id_enum eListID, in usGetNextChar() argument 595 usLSB = usGetNextByte(pFile, pReadinfo, pAnchor, in usGetNextChar() [all …]
|
| H A D | prop8.c | 63 aucFillInfoBuffer(FILE *pFile, const pps_type *pTable, in aucFillInfoBuffer() argument 72 fail(pFile == NULL || pTable == NULL); in aucFillInfoBuffer() 95 if (!bReadBuffer(pFile, pTable->ulSB, in aucFillInfoBuffer() 108 vGet8DopInfo(FILE *pFile, const pps_type *pTable, in vGet8DopInfo() argument 119 fail(pFile == NULL || pTable == NULL || aucHeader == NULL); in vGet8DopInfo() 131 aucBuffer = aucFillInfoBuffer(pFile, pTable, in vGet8DopInfo() 220 vGet8SepInfo(FILE *pFile, const pps_info_type *pPPS, in vGet8SepInfo() argument 232 fail(pFile == NULL || pPPS == NULL || aucHeader == NULL); in vGet8SepInfo() 246 aucBuffer = aucFillInfoBuffer(pFile, &pPPS->tTable, in vGet8SepInfo() 283 if (!bReadBuffer(pFile, pPPS->tWordDocument.ulSB, in vGet8SepInfo() [all …]
|