diff options
author | Michele Calgaro <[email protected]> | 2020-12-13 19:22:19 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-12-13 19:22:19 +0900 |
commit | 14d0fbe96c6abdb9da80e99953aec672f999948c (patch) | |
tree | d48726c1256a1a495b415570847f08ecf9e5ecdd /kpdf/xpdf/splash/SplashFontFile.cc | |
parent | db124e3167670efff59f6aef4bc0daff316dddf8 (diff) | |
download | tdegraphics-14d0fbe96c6abdb9da80e99953aec672f999948c.tar.gz tdegraphics-14d0fbe96c6abdb9da80e99953aec672f999948c.zip |
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kpdf/xpdf/splash/SplashFontFile.cc')
-rw-r--r-- | kpdf/xpdf/splash/SplashFontFile.cc | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/kpdf/xpdf/splash/SplashFontFile.cc b/kpdf/xpdf/splash/SplashFontFile.cc deleted file mode 100644 index ad58c22d..00000000 --- a/kpdf/xpdf/splash/SplashFontFile.cc +++ /dev/null @@ -1,108 +0,0 @@ -//======================================================================== -// -// SplashFontFile.cc -// -//======================================================================== - -#include <aconf.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#ifndef WIN32 -# include <unistd.h> -#endif -#include "gmem.h" -#include "GString.h" -#include "SplashFontFile.h" -#include "SplashFontFileID.h" - -#ifdef VMS -#if (__VMS_VER < 70000000) -extern "C" int unlink(char *filename); -#endif -#endif - -//------------------------------------------------------------------------ -// SplashFontFile -//------------------------------------------------------------------------ - -SplashFontFile::SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA) { - id = idA; - src = srcA; - src->ref(); - refCnt = 0; -} - -SplashFontFile::~SplashFontFile() { - src->unref(); - delete id; -} - -void SplashFontFile::incRefCnt() { - ++refCnt; -} - -void SplashFontFile::decRefCnt() { - if (!--refCnt) { - delete this; - } -} - -// - -SplashFontSrc::SplashFontSrc() { - isFile = gFalse; - deleteSrc = gFalse; - fileName = NULL; - buf = NULL; - refcnt = 1; -} - -SplashFontSrc::~SplashFontSrc() { - if (deleteSrc) { - if (isFile) { - if (fileName) - unlink(fileName->getCString()); - } else { - if (buf) - gfree(buf); - } - } - - if (isFile && fileName) - delete fileName; -} - -void SplashFontSrc::ref() { - refcnt++; -} - -void SplashFontSrc::unref() { - if (! --refcnt) - delete this; -} - -void SplashFontSrc::setFile(GString *file, GBool del) -{ - isFile = gTrue; - fileName = file->copy(); - deleteSrc = del; -} - -void SplashFontSrc::setFile(const char *file, GBool del) -{ - isFile = gTrue; - fileName = new GString(file); - deleteSrc = del; -} - -void SplashFontSrc::setBuf(char *bufA, int bufLenA, GBool del) -{ - isFile = gFalse; - buf = bufA; - bufLen = bufLenA; - deleteSrc = del; -} |