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'.
This commit is contained in:
Guenter 2013-05-24 11:38:09 +02:00 committed by Werner Lemberg
parent 2d6e1fbce7
commit 41e4480e43
2 changed files with 31 additions and 3 deletions

View File

@ -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.

View File

@ -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;