summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Marchesin <marcheu@chromium.org>2013-01-15 10:08:58 -0800
committerStéphane Marchesin <marcheu@chromium.org>2013-01-17 20:40:00 -0800
commit871812ce74520b45689ee043f112ce08929afff9 (patch)
tree9c9440ff24fc3c17c424f803b14acc94b6209424
parent12b2b8543a5e590f27ad185ad367ffc2ccea3b48 (diff)
Small cleanups.HEADmaster
-rw-r--r--epilogue.c6
-rw-r--r--gen.c20
2 files changed, 13 insertions, 13 deletions
diff --git a/epilogue.c b/epilogue.c
index 5de3c0e..108d78b 100644
--- a/epilogue.c
+++ b/epilogue.c
@@ -222,12 +222,12 @@ static void exit_func()
}
/* Modify the __start function by overiding this function */
-int __libc_start_main(int(*main_fct)(int, char **), int argc,
- char ** ubp_av,void (*init) (void), void (*fini) (void),
+int __libc_start_main(int(*main_fct)(int, char **), int argc,
+ char ** ubp_av,void (*init) (void), void (*fini) (void),
void (*rtld_fini) (void),void (* stack_end)) {
int (*func)(int(*)(int, char **), int, char **,
- void (*) (void), void (*) (void),
+ void (*) (void), void (*) (void),
void (*) (void), void(*));
func = dlsym(((void *) -1l), "__libc_start_main");
diff --git a/gen.c b/gen.c
index e31d8ce..bb7fad1 100644
--- a/gen.c
+++ b/gen.c
@@ -50,7 +50,7 @@ typedef struct gl_type{
int size;
char* print;
char* cast;
-}gl_type;
+} gl_type;
@@ -134,7 +134,7 @@ gl_type type_table[]=
-char * type_remove_const(char * type)
+static char * type_remove_const(char * type)
{
char* r = strstr(type,"const");
if (r)
@@ -143,7 +143,7 @@ char * type_remove_const(char * type)
return type;
}
-int type_match(char* type)
+static int type_match(char* type)
{
char* t = type_remove_const(type);
@@ -160,39 +160,39 @@ int type_match(char* type)
return -1;
}
-char* type_print(char* type)
+static char* type_print(char* type)
{
int i=0;
while(type_table[i].name!=NULL)
{
if (strcmp(type_remove_const(type),type_table[i].name)==0)
- return type_table[i].print;
+ return type_table[i].print;
i++;
}
return NULL;
}
-int type_size(char* type)
+static int type_size(char* type)
{
int i=0;
while(type_table[i].name!=NULL)
{
if (strcmp(type_remove_const(type),type_table[i].name)==0)
- return type_table[i].size;
+ return type_table[i].size;
i++;
}
return 0;
}
-char* type_cast(char* type)
+static char* type_cast(char* type)
{
int i=0;
while(type_table[i].name!=NULL)
{
if (strcmp(type_remove_const(type),type_table[i].name)==0)
- return type_table[i].cast;
+ return type_table[i].cast;
i++;
}
return NULL;
@@ -257,7 +257,7 @@ int main()
fprintf(file_functable, "static void* functable[4096];\n");
fprintf(file_functable, "static void functable_init()\n{\n");
- fprintf(file_getprocaddr, "static struct { \n\tchar* name; \n\tint num;\n} \nget_proc_list[] = {\n");
+ fprintf(file_getprocaddr, "static struct {\n\tchar* name;\n\tint num;\n}\nget_proc_list[] = {\n");
cur = cur->xmlChildrenNode;
cur = cur->next;