cff.cxx (15336cfd) | cff.cxx (b87d82ff) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1875 unchanged lines hidden (view full) --- 1884 explicit Type1Emitter( FILE* pOutFile, bool bPfbSubset = true); 1885 /*virtual*/ ~Type1Emitter( void); 1886 void setSubsetName( const char* ); 1887 1888 void emitRawData( const char* pData, int nLength) const; 1889 void emitAllRaw( void); 1890 void emitAllHex( void); 1891 void emitAllCrypted( void); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1875 unchanged lines hidden (view full) --- 1884 explicit Type1Emitter( FILE* pOutFile, bool bPfbSubset = true); 1885 /*virtual*/ ~Type1Emitter( void); 1886 void setSubsetName( const char* ); 1887 1888 void emitRawData( const char* pData, int nLength) const; 1889 void emitAllRaw( void); 1890 void emitAllHex( void); 1891 void emitAllCrypted( void); |
1892 int tellPos( void) const; | 1892 int tellPos( void) const; |
1893 void updateLen( int nTellPos, int nLength); 1894 void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&); 1895private: 1896 FILE* mpFileOut; 1897 bool mbCloseOutfile; 1898 char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation | 1893 void updateLen( int nTellPos, int nLength); 1894 void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&); 1895private: 1896 FILE* mpFileOut; 1897 bool mbCloseOutfile; 1898 char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation |
1899 int mnEECryptR; | 1899 int mnEECryptR; |
1900public: 1901 char* mpPtr; 1902 1903 char maSubsetName[256]; 1904 bool mbPfbSubset; | 1900public: 1901 char* mpPtr; 1902 1903 char maSubsetName[256]; 1904 bool mbPfbSubset; |
1905 int mnHexLineCol; | 1905 int mnHexLineCol; |
1906}; 1907 1908// -------------------------------------------------------------------- 1909 1910Type1Emitter::Type1Emitter( const char* pPfbFileName, bool bPfbSubset) 1911: mpFileOut( NULL) 1912, mbCloseOutfile( true) 1913, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed --- 52 unchanged lines hidden (view full) --- 1966void Type1Emitter::updateLen( int nTellPos, int nLength) 1967{ 1968 // update PFB segment header length 1969 U8 cData[4]; 1970 cData[0] = static_cast<U8>(nLength >> 0); 1971 cData[1] = static_cast<U8>(nLength >> 8); 1972 cData[2] = static_cast<U8>(nLength >> 16); 1973 cData[3] = static_cast<U8>(nLength >> 24); | 1906}; 1907 1908// -------------------------------------------------------------------- 1909 1910Type1Emitter::Type1Emitter( const char* pPfbFileName, bool bPfbSubset) 1911: mpFileOut( NULL) 1912, mbCloseOutfile( true) 1913, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed --- 52 unchanged lines hidden (view full) --- 1966void Type1Emitter::updateLen( int nTellPos, int nLength) 1967{ 1968 // update PFB segment header length 1969 U8 cData[4]; 1970 cData[0] = static_cast<U8>(nLength >> 0); 1971 cData[1] = static_cast<U8>(nLength >> 8); 1972 cData[2] = static_cast<U8>(nLength >> 16); 1973 cData[3] = static_cast<U8>(nLength >> 24); |
1974 const int nCurrPos = ftell( mpFileOut); | 1974 const long nCurrPos = ftell( mpFileOut); |
1975 fseek( mpFileOut, nTellPos, SEEK_SET); 1976 fwrite( cData, 1, sizeof(cData), mpFileOut); | 1975 fseek( mpFileOut, nTellPos, SEEK_SET); 1976 fwrite( cData, 1, sizeof(cData), mpFileOut); |
1977 fseek( mpFileOut, nCurrPos, SEEK_SET); | 1977 if( nCurrPos >= 0) 1978 fseek( mpFileOut, nCurrPos, SEEK_SET); |
1978} 1979 1980// -------------------------------------------------------------------- 1981 1982inline void Type1Emitter::emitRawData( const char* pData, int nLength) const 1983{ 1984 fwrite( pData, 1, nLength, mpFileOut); 1985} --- 431 unchanged lines hidden --- | 1979} 1980 1981// -------------------------------------------------------------------- 1982 1983inline void Type1Emitter::emitRawData( const char* pData, int nLength) const 1984{ 1985 fwrite( pData, 1, nLength, mpFileOut); 1986} --- 431 unchanged lines hidden --- |