From ca48c05f7a07de0b8617acb024d1a343a5a0ad6f Mon Sep 17 00:00:00 2001 From: twisti Date: Tue, 21 Dec 2004 10:14:35 +0000 Subject: [PATCH] Declare functions with (void). --- src/mm/boehm.h | 23 ++++++++++++----------- src/mm/memory.h | 6 +++--- src/toolbox/chain.h | 6 +++--- src/toolbox/logging.h | 14 +++++++------- src/vm/builtin.h | 18 +++++++++--------- src/vm/jit/inline/sets.h | 10 +++++----- src/vm/loader.h | 24 ++++++++++++------------ src/vm/tables.h | 18 ++++++++++-------- 8 files changed, 61 insertions(+), 58 deletions(-) diff --git a/src/mm/boehm.h b/src/mm/boehm.h index f427997c2..d8687e78a 100644 --- a/src/mm/boehm.h +++ b/src/mm/boehm.h @@ -26,7 +26,7 @@ Authors: Christian Thalinger - $Id: boehm.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: boehm.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -52,18 +52,19 @@ struct otherstackcall { /* function prototypes */ void *heap_alloc_uncollectable(u4 bytelength); -void runboehmfinalizer(void *o, void *p); +void runboehmfinalizer(void *o, void *p); void *heap_allocate (u4 bytelength, bool references, methodinfo *finalizer); void *heap_reallocate(void *p, u4 bytelength); -void heap_free(void *p); -void gc_init(u4 heapmaxsize, u4 heapstartsize); -void gc_call(); -s8 gc_get_heap_size(); -s8 gc_get_free_bytes(); -s8 gc_get_max_heap_size(); -void gc_invoke_finalizers(); -void gc_finalize_all(); -void *gc_out_of_memory(); +void heap_free(void *p); + +void gc_init(u4 heapmaxsize, u4 heapstartsize); +void gc_call(void); +s8 gc_get_heap_size(void); +s8 gc_get_free_bytes(void); +s8 gc_get_max_heap_size(void); +void gc_invoke_finalizers(void); +void gc_finalize_all(void); +void *gc_out_of_memory(void); #endif /* _BOEHM_H */ diff --git a/src/mm/memory.h b/src/mm/memory.h index 5a4baa853..0f1429ba9 100644 --- a/src/mm/memory.h +++ b/src/mm/memory.h @@ -1,4 +1,4 @@ -/* toolbox/memory.h - macros for memory management +/* mm/memory.h - macros for memory management Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner, @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: memory.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: memory.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -170,7 +170,7 @@ void *mem_realloc(void *src, s4 len1, s4 len2); void *dump_alloc(s4 size); void *dump_realloc(void *src, s4 len1, s4 len2); -s4 dump_size(); +s4 dump_size(void); void dump_release(s4 size); #endif /* _MEMORY_H */ diff --git a/src/toolbox/chain.h b/src/toolbox/chain.h index 4397de2ea..a95b23959 100644 --- a/src/toolbox/chain.h +++ b/src/toolbox/chain.h @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: chain.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: chain.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -50,8 +50,8 @@ typedef struct chain { /* structure for list */ /* function prototypes */ -chain *chain_new(); -chain *chain_dnew(); +chain *chain_new(void); +chain *chain_dnew(void); void chain_free(chain *c); void chain_addafter(chain *c, void *element); diff --git a/src/toolbox/logging.h b/src/toolbox/logging.h index 98f684480..2f4dfad65 100644 --- a/src/toolbox/logging.h +++ b/src/toolbox/logging.h @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: logging.h 1761 2004-12-15 15:48:43Z twisti $ + $Id: logging.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -41,21 +41,21 @@ #define MAXLOGTEXT 500 -/* function prototypes */ +/* function prototypes ********************************************************/ void log_init(char *fname); void log_text(char *txt); void log_plain(char *txt); /* same as log_text without "LOG: " and newline */ -void log_flush(); /* fflush logfile */ -void log_nl(); /* newline and fflush */ +void log_flush(void); /* fflush logfile */ +void log_nl(void); /* newline and fflush */ -void log_cputime(); +void log_cputime(void); void log_message_class(const char *msg, classinfo *c); void log_message_method(const char *msg, methodinfo *m); void dolog(char *txt, ...); -void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline */ +void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline*/ void error(char *txt, ...); /* XXX this is just a quick hack on darwin */ @@ -63,7 +63,7 @@ void error(char *txt, ...); void panic(char *txt); #endif -FILE *get_logfile(); /* return the current logfile */ +FILE *get_logfile(void); /* return the current logfile */ #endif /* _LOGGING_H */ diff --git a/src/vm/builtin.h b/src/vm/builtin.h index c21a3c292..ca1cf5bb4 100644 --- a/src/vm/builtin.h +++ b/src/vm/builtin.h @@ -28,7 +28,7 @@ Changes: Edwin Steiner - $Id: builtin.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: builtin.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -370,7 +370,7 @@ java_arrayheader *builtin_clone_array(void *env, java_arrayheader *o); /* NOT AN OP */ /* builtin_dummy just panics if it is executed. */ -s4 builtin_dummy(); +s4 builtin_dummy(void); /* NOT AN OP */ /* conversion helper functions */ @@ -378,20 +378,20 @@ inline float intBitsToFloat(s4 i); inline float longBitsToDouble(s8 l); /* this is a wrapper for calls from asmpart */ -java_objectheader **builtin_asm_get_exceptionptrptr(); +java_objectheader **builtin_asm_get_exceptionptrptr(void); #if defined(USE_THREADS) && defined(NATIVE_THREADS) -static inline java_objectheader **builtin_get_exceptionptrptr(); +static inline java_objectheader **builtin_get_exceptionptrptr(void); /* NOT AN OP */ -static inline methodinfo **builtin_get_threadrootmethod(); +static inline methodinfo **builtin_get_threadrootmethod(void); /* NOT AN OP */ -inline java_objectheader **builtin_get_exceptionptrptr() +inline java_objectheader **builtin_get_exceptionptrptr(void) { return &THREADINFO->_exceptionptr; } -inline methodinfo **builtin_get_threadrootmethod() +inline methodinfo **builtin_get_threadrootmethod(void) { return &THREADINFO->_threadrootmethod; } @@ -401,7 +401,7 @@ inline methodinfo **builtin_get_threadrootmethod() /* returns the root method of a thread. this is used in asmpart.S and delivers the abort condition for the stack unwinding for getClassContext and getClassLoader. For the main thread this is the main function. Otherwhise it is the thread's run method (at least that's how I see it) (jowenn) */ -methodinfo *builtin_asm_get_threadrootmethod(); +methodinfo *builtin_asm_get_threadrootmethod(void); /* returns the current top element of the stack frame info list (needed for unwinding across native functions) */ /* on i386 this is a pointer to a structure @@ -412,7 +412,7 @@ methodinfo *builtin_asm_get_threadrootmethod(); points here---->| previous element in list | ------------------------------------------------ */ -void *builtin_asm_get_stackframeinfo(); +void *builtin_asm_get_stackframeinfo(void); stacktraceelement *builtin_stacktrace_copy(stacktraceelement **,stacktraceelement *begin, stacktraceelement *end); #endif /* _BUILTIN_H */ diff --git a/src/vm/jit/inline/sets.h b/src/vm/jit/inline/sets.h index c6f91f1ed..b12d41553 100644 --- a/src/vm/jit/inline/sets.h +++ b/src/vm/jit/inline/sets.h @@ -1,4 +1,4 @@ -/* jit/sets.h - +/* vm/jit/sets.h - Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner, @@ -26,7 +26,7 @@ Authors: Carolyn Oates - $Id: sets.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: sets.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -96,7 +96,7 @@ struct fldSetNode { fldSetNode *inFldSet (fldSetNode *, fieldinfo *); fldSetNode *addFldRef(fldSetNode *, fieldinfo *); fldSet *add2FldSet(fldSet *, fieldinfo *, bool, bool); -fldSet *createFldSet(); +fldSet *createFldSet(void); int printFldSet(fldSetNode *); int printFieldSet(fldSet *); @@ -124,7 +124,7 @@ struct methSetNode { int inMethSet (methSetNode *, methodinfo *); methSetNode *addMethRef(methSetNode *, methodinfo *); methSet *add2MethSet(methSet *, methodinfo *); -methSet *createMethSet(); +methSet *createMethSet(void); int printMethSet (methSetNode *); int printMethodSet (methSet *); @@ -151,7 +151,7 @@ struct classSetNode { int inSet(classSetNode *, classinfo *); classSetNode *addElement(classSetNode *, classinfo *); classSet *add2ClassSet(classSet *, classinfo *); -classSet *createClassSet(); +classSet *createClassSet(void); int inRange(classSetNode *, classinfo *); classSetNode *addClassCone(classSetNode *, classinfo *); classSetNode *intersectSubtypesWithSet(classinfo *, classSetNode *); diff --git a/src/vm/loader.h b/src/vm/loader.h index 6909bdae4..ee323d916 100644 --- a/src/vm/loader.h +++ b/src/vm/loader.h @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: loader.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: loader.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -44,15 +44,15 @@ typedef struct classbuffer { classinfo *class; /* pointer to classinfo structure */ - u1 *data; /* pointer to byte code */ - s4 size; /* size of the byte code */ - u1 *pos; /* current read position */ + u1 *data; /* pointer to byte code */ + s4 size; /* size of the byte code */ + u1 *pos; /* current read position */ } classbuffer; /* export variables */ -#ifdef USE_THREADS +#if defined(USE_THREADS) extern int blockInts; #endif @@ -99,17 +99,17 @@ extern utf *array_packagename; /************************ prototypes ******************************************/ -/* initialize laoder, load important systemclasses */ -void loader_init(); +/* initialize loader, load important systemclasses */ +void loader_init(u1 *stackbottom); void suck_init(char *cpath); -void create_all_classes(); +void create_all_classes(void); void suck_stop(classbuffer *cb); /* free resources */ -void loader_close(); +void loader_close(void); -void loader_compute_subclasses(); +void loader_compute_subclasses(classinfo *c); /* retrieve constantpool element */ voidptr class_getconstant(classinfo *class, u4 pos, u4 ctype); @@ -190,8 +190,8 @@ void field_display(fieldinfo *f); void method_display(methodinfo *m); void method_display_w_class(methodinfo *m); -utf* clinit_desc(); -utf* clinit_name(); +utf* clinit_desc(void); +utf* clinit_name(void); /******************************** CLASSPATH handling *******************/ diff --git a/src/vm/tables.h b/src/vm/tables.h index 7c19b1baf..590a731ad 100644 --- a/src/vm/tables.h +++ b/src/vm/tables.h @@ -1,4 +1,4 @@ -/* tables.h - +/* vm/tables.h - Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner, @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: tables.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: tables.h 1793 2004-12-21 10:14:35Z twisti $ */ @@ -35,7 +35,9 @@ #define _TABLES_H #include -#include "global.h" /* for unicode. -- phil */ + +#include "vm/global.h" + #define CLASS(name) (unicode_getclasslink(unicode_new_char(name))) @@ -50,10 +52,10 @@ extern list unlinkedclasses; /* this is only used for eager class loading */ /* creates hashtables for symboltables */ -void tables_init(); +void tables_init(void); /* free memory for hashtables */ -void tables_close(); +void tables_close(void); /* check if a UTF-8 string is valid */ bool is_valid_utf(char *utf_ptr, char *end_pos); @@ -84,7 +86,7 @@ utf *utf_new_char(char *text); utf *utf_new_char_classname(char *text); /* show utf-table */ -void utf_show(); +void utf_show(void); /* get next unicode character of a utf-string */ u2 utf_nextu2(char **utf); @@ -123,8 +125,8 @@ classinfo *class_get(utf *u); bool class_remove(classinfo *c); #if defined(USE_THREADS) && defined(NATIVE_THREADS) -void tables_lock(); -void tables_unlock(); +void tables_lock(void); +void tables_unlock(void); #endif #endif /* _TABLES_H */ -- 2.25.1