24#define PROGRAM_NAME "apinames"
25#define PROGRAM_VERSION "0.2"
27#define LINEBUFF_SIZE 1024
73 for ( nn = 0; nn <
len; nn++ )
81 if ( (
int)nm->
hash ==
h &&
94 panic(
"not enough memory" );
101 panic(
"not enough memory" );
129 const char* dll_name )
140 fprintf(
out,
"DESCRIPTION FreeType 2 DLL\n" );
150 fprintf(
out,
"DESCRIPTION FreeType 2 DLL\n" );
165 "you must provide a DLL name with the -d option!\n" );
170 dot =
strchr( dll_name,
'.' );
173 int len = dot - dll_name;
176 if (
len > (
int)(
sizeof (
temp ) - 1 ) )
182 dll_name = (
const char*)
temp;
234 while ( *
p && (*
p ==
' ' || *
p ==
'\\') )
237 if ( *
p ==
'\n' || *
p ==
'\r' )
244 if (
memcmp(
p,
"FT_EXPORT(", 10 ) != 0 )
250 if ( *
p == 0 || *
p ==
'\n' || *
p ==
'\r' )
268 while ( *
p ==
' ' || *
p ==
'\t' )
310 static const char*
const format =
311 "%s %s: extract FreeType API names from header files\n\n"
312 "this program is used to extract the list of public FreeType API\n"
313 "functions. It receives the list of header files as argument and\n"
314 "generates a sorted list of unique identifiers\n\n"
316 "usage: %s header1 [options] [header2 ...]\n\n"
318 "options: - : parse the content of stdin, ignore arguments\n"
319 " -v : verbose mode, output sent to standard error\n"
320 " -oFILE : write output to FILE instead of standard output\n"
321 " -dNAME : indicate DLL file name, 'freetype.dll' by default\n"
322 " -w : output .DEF file for Visual C++ and Mingw\n"
323 " -wB : output .DEF file for Borland C++\n"
324 " -wW : output Watcom Linker Response File\n"
325 " -wN : output NetWare Import File\n"
344 const char* library_name =
NULL;
350 while (
argc > 1 &&
argv[1][0] ==
'-' )
457 panic(
"could not find exported functions !!\n" );
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
static void names_dump(FILE *out, OutputFormat format, const char *dll_name)
static void names_sort(void)
static void panic(const char *message)
static int name_compare(const void *name1, const void *name2)
static int read_header_file(FILE *file, int verbose)
enum OutputFormat_ OutputFormat
static void names_add(const char *name, const char *end)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
GLfloat GLfloat GLfloat GLfloat h
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
_Check_return_ _CRTIMP int __cdecl feof(_In_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define memcpy(s1, s2, n)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out