summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2010-07-11 09:28:21 +0200
committerWerner Lemberg <wl@gnu.org>2010-07-11 09:28:21 +0200
commitebfd454a603a0be3ffb8e7d0886cd3e1a96ce53b (patch)
tree74373c97078d6cb0b4972074897939c6fc2fb2ab
parentd594202ebb9473885a07086ed4a8185ebcf59fa1 (diff)
downloadfreetype2-ebfd454a603a0be3ffb8e7d0886cd3e1a96ce53b.tar.gz
Fix C++ compilation issue.
* src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix typo of `dot' variable.
-rw-r--r--ChangeLog7
-rw-r--r--src/tools/apinames.c20
2 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 8dfd25511..49c22c905 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-11 Werner Lemberg <wl@gnu.org>
+
+ Fix C++ compilation issue.
+
+ * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
+ typo of `dot' variable.
+
2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Fix another case reported in Savannah bug #30373.
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index 7f191e19c..99e3028c9 100644
--- a/src/tools/apinames.c
+++ b/src/tools/apinames.c
@@ -10,7 +10,7 @@
* accepted if you are using GCC for compilation (and probably by
* other compilers too).
*
- * Author: David Turner, 2005, 2006, 2008, 2009
+ * Author: David Turner, 2005, 2006, 2008, 2009, 2010
*
* This code is explicitly placed into the public domain.
*
@@ -126,6 +126,7 @@ names_dump( FILE* out,
{
int nn;
+
switch ( format )
{
case OUTPUT_WINDOWS_DEF:
@@ -151,22 +152,25 @@ names_dump( FILE* out,
case OUTPUT_WATCOM_LBC:
{
/* we must omit the .dll suffix from the library name */
- char temp[512];
- char* dot;
+ char temp[512];
+ const char* dot;
+
if ( dll_name == NULL )
{
fprintf( stderr,
- "you must provide a DLL name with the -d option !!\n" );
- exit(4);
+ "you must provide a DLL name with the -d option!\n" );
+ exit( 4 );
}
dot = strchr( dll_name, '.' );
if ( dot != NULL )
{
- int len = (dot - dll_name);
- if ( len > (int)(sizeof(temp)-1) )
- len = sizeof(temp)-1;
+ int len = dot - dll_name;
+
+
+ if ( len > (int)( sizeof( temp ) - 1 ) )
+ len = sizeof ( temp ) - 1;
memcpy( temp, dll_name, len );
temp[len] = 0;