diff options
Diffstat (limited to 'x11-misc/ttmkfdir/files/ttmkfdir-3.0.9-encoding.patch')
-rw-r--r-- | x11-misc/ttmkfdir/files/ttmkfdir-3.0.9-encoding.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/x11-misc/ttmkfdir/files/ttmkfdir-3.0.9-encoding.patch b/x11-misc/ttmkfdir/files/ttmkfdir-3.0.9-encoding.patch deleted file mode 100644 index 30f0170f4b3b..000000000000 --- a/x11-misc/ttmkfdir/files/ttmkfdir-3.0.9-encoding.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -urN ttmkfdir-3.0.9.orig/directory.cpp ttmkfdir-3.0.9/directory.cpp ---- ttmkfdir-3.0.9.orig/directory.cpp 2002-12-09 00:29:11.000000000 -0800 -+++ ttmkfdir-3.0.9/directory.cpp 2004-09-02 23:42:16.000000000 -0700 -@@ -9,10 +9,12 @@ - { - } - --void -+int - directory::scan (const std::string &dir) - { - DIR *ttfdir = opendir(dir.c_str ()); -+ if(!ttfdir) -+ return -1; - - this->clear (); - dirpath = dir; -@@ -26,6 +28,7 @@ - } - - closedir (ttfdir); -+ return 0; - } - - bool -diff -urN ttmkfdir-3.0.9.orig/directory.h ttmkfdir-3.0.9/directory.h ---- ttmkfdir-3.0.9.orig/directory.h 2002-12-09 00:29:11.000000000 -0800 -+++ ttmkfdir-3.0.9/directory.h 2004-09-02 23:42:16.000000000 -0700 -@@ -11,7 +11,7 @@ - if (path != "") scan (path); - }; - virtual ~directory (void); -- void scan (const std::string &path = "."); -+ int scan (const std::string &path = "."); - virtual bool select (const char *name) const; - const std::string &path (void) const { - return dirpath; -diff -urN ttmkfdir-3.0.9.orig/encoding.l ttmkfdir-3.0.9/encoding.l ---- ttmkfdir-3.0.9.orig/encoding.l 2003-01-07 21:25:25.000000000 -0800 -+++ ttmkfdir-3.0.9/encoding.l 2004-09-02 23:42:51.000000000 -0700 -@@ -108,7 +108,7 @@ - } - - /* now mark all the unassigned codes */ -- for (long i = i1; i <= i2; i++) { -+ for (long i = i1; i <= i2 && i < cur_enc->size; i++) { - (*cur_map)[i] = -1; - } - } -@@ -140,7 +140,7 @@ - break; - } - -- for (i = start_range; i <= end_range; i++, target++) { -+ for (i = start_range; i <= end_range && i < cur_enc->size; i++, target++) { - (*cur_map)[i] = target; - } - cur_enc->enc_size = cur_enc->enc_size + end_range - start_range + 1; -diff -urN ttmkfdir-3.0.9.orig/ttmkfdir.cpp ttmkfdir-3.0.9/ttmkfdir.cpp ---- ttmkfdir-3.0.9.orig/ttmkfdir.cpp 2003-01-19 15:33:11.000000000 -0800 -+++ ttmkfdir-3.0.9/ttmkfdir.cpp 2004-09-02 23:42:16.000000000 -0700 -@@ -60,7 +60,10 @@ - return 0; - } - -- dir::instance()->scan (cmdline::instance()->option ("font-dir")); -+ if(dir::instance()->scan (cmdline::instance()->option ("font-dir")) == -1) { -+ printf("No such directory...\n"); -+ return -1; -+ } - - for (directory::iterator i = dir::instance()->begin (); i != dir::instance()->end(); i++) { - const ttf::Face face (dir::instance()->path() + '/' + *i); |