* src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c, src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c: s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for errors in the bytecode interpreter only.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
diff --git a/ChangeLog b/ChangeLog
index f6ff3cf..d5e1cb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-12-21 Werner Lemberg <wl@gnu.org>
+ * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
+ src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
+ s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for
+ errors in the bytecode interpreter only.
+
+2008-12-21 Werner Lemberg <wl@gnu.org>
+
* src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL
arguments.
Fix return value for non-PFR fonts. Both problems reported by Chi
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 171a8b4..bea470f 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3444,11 +3444,11 @@
if ( size == NULL )
- return FT_Err_Bad_Argument;
+ return FT_Err_Invalid_Argument;
face = size->face;
if ( face == NULL || face->driver == NULL )
- return FT_Err_Bad_Argument;
+ return FT_Err_Invalid_Argument;
/* we don't need anything more complex than that; all size objects */
/* are already listed by the face */
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 9d7347c..989b9e2 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -181,7 +181,7 @@
if ( asize == NULL )
- return FTC_Err_Bad_Argument;
+ return FTC_Err_Invalid_Argument;
*asize = NULL;
@@ -306,7 +306,7 @@
if ( aface == NULL )
- return FTC_Err_Bad_Argument;
+ return FTC_Err_Invalid_Argument;
*aface = NULL;
diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c
index b65850b..15cca98 100644
--- a/src/pfr/pfrdrivr.c
+++ b/src/pfr/pfrdrivr.c
@@ -66,7 +66,7 @@
FT_Pos *anadvance )
{
PFR_Face face = (PFR_Face)pfrface;
- FT_Error error = PFR_Err_Bad_Argument;
+ FT_Error error = PFR_Err_Invalid_Argument;
*anadvance = 0;
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 1221fa0..2f9a3b8 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -458,7 +458,7 @@
face_index = 0;
if ( face_index >= face->ttc_header.count )
- return SFNT_Err_Bad_Argument;
+ return SFNT_Err_Invalid_Argument;
if ( FT_STREAM_SEEK( face->ttc_header.offsets[face_index] ) )
return error;
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 206a1ea..571b57a 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -184,7 +184,7 @@
#define ErrRaster_Invalid_Mode Smooth_Err_Cannot_Render_Glyph
#define ErrRaster_Invalid_Outline Smooth_Err_Invalid_Outline
#define ErrRaster_Memory_Overflow Smooth_Err_Out_Of_Memory
-#define ErrRaster_Invalid_Argument Smooth_Err_Bad_Argument
+#define ErrRaster_Invalid_Argument Smooth_Err_Invalid_Argument
#endif /* !_STANDALONE_ */
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index e27a324..cb6b035 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -360,7 +360,7 @@
if ( face_index >= font_count )
{
- error = FNT_Err_Bad_Argument;
+ error = FNT_Err_Invalid_Argument;
goto Exit;
}
else if ( face_index < 0 )
@@ -566,7 +566,7 @@
if ( face_index >= face->root.num_faces )
{
- error = FNT_Err_Bad_Argument;
+ error = FNT_Err_Invalid_Argument;
goto Exit;
}
}
@@ -719,7 +719,7 @@
if ( !error )
{
if ( face_index > 0 )
- error = FNT_Err_Bad_Argument;
+ error = FNT_Err_Invalid_Argument;
else if ( face_index < 0 )
goto Exit;
}