[CMAKE]
[reactos.git] / lib / 3rdparty / freetype / src / tools / apinames.c
index f08919b..99e3028 100644 (file)
@@ -10,7 +10,7 @@
  * accepted if you are using GCC for compilation (and probably by
  * other compilers too).
  *
- * Author: David Turner, 2005, 2006
+ * Author: David Turner, 2005, 2006, 2008, 2009, 2010
  *
  * This code is explicitly placed into the public domain.
  *
@@ -26,7 +26,7 @@
 
 #define  LINEBUFF_SIZE  1024
 
-typedef enum
+typedef enum  OutputFormat_
 {
   OUTPUT_LIST = 0,      /* output the list of names, one per line             */
   OUTPUT_WINDOWS_DEF,   /* output a Windows .DEF file for Visual C++ or Mingw */
@@ -44,7 +44,7 @@ panic( const char*  message )
 }
 
 
-typedef struct
+typedef struct  NameRec_
 {
   char*         name;
   unsigned int  hash;
@@ -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;
@@ -191,7 +195,7 @@ names_dump( FILE*         out,
 
 /* states of the line parser */
 
-typedef enum
+typedef enum  State_
 {
   STATE_START = 0,  /* waiting for FT_EXPORT keyword and return type */
   STATE_TYPE        /* type was read, waiting for function name      */
@@ -265,7 +269,7 @@ read_header_file( FILE*  file, int  verbose )
           if ( p > name )
           {
             if ( verbose )
-              fprintf( stderr, ">>> %.*s\n", p-name, name );
+              fprintf( stderr, ">>> %.*s\n", (int)(p - name), name );
 
             names_add( name, p );
           }