Apply Savannah patch #8055. Make `apinames' create an import file for NetWare. * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2. (OutputFormat): Add `OUTPUT_NETWARE_IMP'. (names_dump): Handle it. (usage): Updated. (main): Handle new command line flag `-wN'.
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
diff --git a/ChangeLog b/ChangeLog
index 04b98b1..e4f5148 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-05-24 Guenter <info@gknw.net>
+
+ Apply Savannah patch #8055.
+
+ Make `apinames' create an import file for NetWare.
+
+ * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2.
+ (OutputFormat): Add `OUTPUT_NETWARE_IMP'.
+ (names_dump): Handle it.
+ (usage): Updated.
+ (main): Handle new command line flag `-wN'.
+
2013-05-23 Behdad Esfahbod <behdad@behdad.org>
Compilation fix.
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index 3dc6559..f940859 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-2012
+ * Author: David Turner, 2005, 2006, 2008-2013
*
* This code is explicitly placed into the public domain.
*
@@ -22,7 +22,7 @@
#include <ctype.h>
#define PROGRAM_NAME "apinames"
-#define PROGRAM_VERSION "0.1"
+#define PROGRAM_VERSION "0.2"
#define LINEBUFF_SIZE 1024
@@ -31,7 +31,8 @@ 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 */
OUTPUT_BORLAND_DEF, /* output a Windows .DEF file for Borland C++ */
- OUTPUT_WATCOM_LBC /* output a Watcom Linker Command File */
+ OUTPUT_WATCOM_LBC, /* output a Watcom Linker Command File */
+ OUTPUT_NETWARE_IMP /* output a NetWare ImportFile */
} OutputFormat;
@@ -187,6 +188,16 @@ names_dump( FILE* out,
}
break;
+ case OUTPUT_NETWARE_IMP:
+ {
+ if ( dll_name != NULL )
+ fprintf( out, " (%s)\n", dll_name );
+ for ( nn = 0; nn < num_names - 1; nn++ )
+ fprintf( out, " %s,\n", the_names[nn].name );
+ fprintf( out, " %s\n", the_names[num_names - 1].name );
+ }
+ break;
+
default: /* LIST */
for ( nn = 0; nn < num_names; nn++ )
fprintf( out, "%s\n", the_names[nn].name );
@@ -311,6 +322,7 @@ usage( void )
" -w : output .DEF file for Visual C++ and Mingw\n"
" -wB : output .DEF file for Borland C++\n"
" -wW : output Watcom Linker Response File\n"
+ " -wN : output NetWare Import File\n"
"\n";
fprintf( stderr,
@@ -394,6 +406,10 @@ int main( int argc, const char* const* argv )
format = OUTPUT_WATCOM_LBC;
break;
+ case 'N':
+ format = OUTPUT_NETWARE_IMP;
+ break;
+
case 0:
break;