diff options
Diffstat (limited to 'src/Type1/scanfont.c')
-rw-r--r-- | src/Type1/scanfont.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/Type1/scanfont.c b/src/Type1/scanfont.c index 7b2db30..de3836a 100644 --- a/src/Type1/scanfont.c +++ b/src/Type1/scanfont.c @@ -1,3 +1,4 @@ +/* $XdotOrg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* $Xorg: scanfont.c,v 1.3 2000/08/17 19:46:32 cpqbld Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved @@ -45,7 +46,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 +1728,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 +1985,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 +2112,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 +2127,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 +2304,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 +2319,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; |