diff options
Diffstat (limited to 'src/Type1/scanfont.c')
-rw-r--r-- | src/Type1/scanfont.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/Type1/scanfont.c b/src/Type1/scanfont.c index 7b2db30..aa95736 100644 --- a/src/Type1/scanfont.c +++ b/src/Type1/scanfont.c @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.16 2003/05/27 22:26:46 tsi Exp $ */ +/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.17 2003/11/29 04:55:28 dawes Exp $ */ #ifndef FONTMODULE #include <string.h> @@ -1727,8 +1727,9 @@ scan_cidfont(cidfont *CIDFontP, cmapres *CMapP) tokenStartP[tokenLength] = '\0'; rc = FindDictValue(CMapP->CMapInfoP); - /* we are not going to report errors */ - rc = SCAN_OK; + /* we are not going to report errors except out of memory */ + if (rc != SCAN_OUT_OF_MEMORY) + rc = SCAN_OK; break; case TOKEN_NAME: if (0 == strncmp(tokenStartP,"begincodespacerange",19)) { @@ -1983,8 +1984,9 @@ scan_cidfont(cidfont *CIDFontP, cmapres *CMapP) if (CIDWantFontInfo) { rc = FindDictValue(CIDFontP->CIDfontInfoP); - /* we are not going to report errors */ - rc = SCAN_OK; + /* we are not going to report errors except out of memory */ + if (rc != SCAN_OUT_OF_MEMORY) + rc = SCAN_OK; break; } break; @@ -2109,8 +2111,10 @@ scan_cidtype1font(psfont *FontP) /* same UniqueID. We would faile on /UniqueID get */ /* because we are expecting a int to follow UniqueID*/ /* If the correct object type does not follow a Name*/ - /* then we will skip over it without reporting error*/ - rc = SCAN_OK; + /* then we will skip over it without reporting error except */ + /* out of memory */ + if (rc != SCAN_OUT_OF_MEMORY) + rc = SCAN_OK; break; } /* end of reading Private dictionary */ else @@ -2122,8 +2126,9 @@ scan_cidtype1font(psfont *FontP) else if (WantFontInfo) { rc = FindDictValue(FontP->fontInfoP); - /* we are not going to report errors */ - rc = SCAN_OK; + /* we are not going to report errors except out of memory */ + if (rc != SCAN_OUT_OF_MEMORY) + rc = SCAN_OK; break; } break; @@ -2298,8 +2303,10 @@ scan_font(psfont *FontP) /* same UniqueID. We would faile on /UniqueID get */ /* because we are expecting a int to follow UniqueID*/ /* If the correct object type does not follow a Name*/ - /* then we will skip over it without reporting error*/ - rc = SCAN_OK; + /* then we will skip over it without reporting error except */ + /* when out of memory */ + if (rc != SCAN_OUT_OF_MEMORY) + rc = SCAN_OK; break; } /* end of reading Private dictionary */ else @@ -2311,8 +2318,9 @@ scan_font(psfont *FontP) else if (WantFontInfo) { rc = FindDictValue(FontP->fontInfoP); - /* we are not going to report errors */ - rc = SCAN_OK; + /* we are not going to report errors except out of memory */ + if (rc != SCAN_OUT_OF_MEMORY) + rc = SCAN_OK; break; } break; |