20#if !defined(__FreeBSD__) && !defined(__APPLE__)
33#define DIR_SEPARATOR_CHAR '/'
34#define DIR_SEPARATOR_STRING "/"
36#define DIR_SEPARATOR_CHAR '\\'
37#define DIR_SEPARATOR_STRING "\\"
41#define TAG_IMPLEMENTED 0
42#define TAG_UNIMPLEMENTED 1
73 newpath =
strdup(origpath);
76 while (newpath[
i] != 0)
79 if (newpath[
i] ==
'\\')
85 if (newpath[
i] ==
'/')
147 printf(
"Out of memory\n");
205 if ((ch >=
'a') && (ch <=
'z'))
209 if ((ch >=
'A') && (ch <=
'Z'))
213 if ((ch >=
'0') && (ch <=
'9'))
343 unsigned int my_file_pointer =
end;
355 if ((my_file_pointer > 0) && (
file_buffer[my_file_pointer] ==
'/'))
357 if ((my_file_pointer > 0) && (
file_buffer[my_file_pointer - 1] ==
'*'))
360 while ((my_file_pointer > 0) && !((
file_buffer[my_file_pointer] ==
'*')
365 my_file_pointer -= 2;
375 end = my_file_pointer;
376 while ((my_file_pointer > 0))
380 len =
end - my_file_pointer;
441 printf(
"Warning: empty function name in file %s. Previous function name was %s.\n",
445 if (api_info ==
NULL)
447 printf(
"Out of memory\n");
481 if (findhandle != -1)
487 if (
f.name[0] !=
'.')
493 strcpy(newcvspath, cvspath);
573 strcpy(newcvspath, cvspath);
635 strcpy(newcvspath, cvspath);
683 char *component_base)
689 int implemented_total;
690 int unimplemented_total;
695 implemented_total = 0;
696 unimplemented_total = 0;
699 while (api_info !=
NULL)
702 implemented_total ++;
704 unimplemented_total ++;
706 api_info = api_info->
next;
709 if (implemented_total + unimplemented_total > 0)
710 complete = ((implemented_total) * 100) / (implemented_total + unimplemented_total);
714 strcpy(canonical_base, component_base);
717 sprintf(
buf,
"<component name=\"%s\" base=\"%s\" complete=\"%d\" implemented_total=\"%d\" unimplemented_total=\"%d\">",
718 component_name, canonical_base,
complete, implemented_total, unimplemented_total);
726 while (api_info !=
NULL)
728 sprintf(
buf,
"<f n=\"%s\" i=\"%s\" f=\"%s\" />",
734 api_info = api_info->
next;
748 char *canonical_path;
760 printf(
"Cannot open input file");
773 printf(
"Out of memory\n");
780 printf(
"Read error in file %s\n", input_file);
786 write_line(
"<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>");
787 write_line(
"<?xml-stylesheet type=\"text/xsl\" href=\"rapistatus.xsl\"?>");
796 next_api_info = api_info->
next;
826 component_name[
len] = 0;
841 component_path[
len] = 0;
846 int i =
strlen(component_path);
848 component_path[
i + 1] = 0;
858 if (canonical_path !=
NULL)
861 free(canonical_path);
871 "RGENSTAT input-filename output-filename\n"
873 " input-filename File containing list of components to process\n"
874 " output-filename File to create\n";
888 if (input_file[0] == 0)
891 printf(
"Missing input-filename\n");
896 if (output_file[0] == 0)
900 printf(
"Missing output-filename\n");
909 printf(
"Cannot open output file");
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
int puts(const char *string)
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl getcwd(_Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
static const WCHAR *const ext[]
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
int __cdecl closedir(DIR *)
DIR *__cdecl opendir(const char *)
struct dirent *__cdecl readdir(DIR *)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP long __cdecl ftell(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
#define sprintf(buf, format,...)
const char * strerror(int err)
static int compare_api_order(PAPI_INFO p, PAPI_INFO q)
static unsigned int file_size
static void skip_comments()
struct _API_INFO * PAPI_INFO
static int is_valid_file(char *filename)
#define DIR_SEPARATOR_CHAR
static void read_input_file(char *input_file)
static char * path_to_url(char *path)
#define DIR_SEPARATOR_STRING
static int is_eol_char(char ch)
static int get_tag_id(char *tag)
static int is_end_of_tag(char ch)
static int get_previous_identifier(unsigned int end, char *name)
static PAPI_INFO api_info_list
static unsigned int file_pointer
static int skip_to_next_name(char *name)
static FILE * file_handle
static void generate_xml_for_component(char *component_name, char *component_base)
static int is_end_of_name(char ch)
char * get_filename_without_base(char *component_base, char *filename)
static void write_line(char *line)
struct _API_INFO API_INFO
static int is_whitespace(char ch)
static int skip_to_next_tag()
static char * convert_path(char *origpath)
static void process_directory(char *path, char *cvspath)
static void get_filename(char *cvspath, char *filename, char *result)
static char * file_buffer
static void parse_file(char *fullname, char *cvspath, char *filename)
#define TAG_UNIMPLEMENTED
PAPI_INFO sort_linked_list(PAPI_INFO, unsigned, int(*)(PAPI_INFO, PAPI_INFO))
static void read_file(char *filename)
_Check_return_opt_ _CRTIMP int __cdecl _findclose(_In_ intptr_t _FindHandle)
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)