From c1295ef6252a6d902d67f5f038534e9125743cd0 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 4 Feb 2003 13:52:05 +0000 Subject: [PATCH] converted comments to doxygen [r734] --- ir/adt/pset.h | 22 ++++++++++++++++++---- ir/adt/set.h | 20 ++++++++++++++++++-- ir/common/panic.h | 12 +++++++++--- ir/common/tune.h | 29 ++++++++++++++++++----------- 4 files changed, 63 insertions(+), 20 deletions(-) diff --git a/ir/adt/pset.h b/ir/adt/pset.h index 698d7536b..6aa7dcbe2 100644 --- a/ir/adt/pset.h +++ b/ir/adt/pset.h @@ -3,28 +3,37 @@ /* $Id$ */ +/** + * @file pset.h + * + * Declarations for pset. + */ + #ifndef _PSET_H #define _PSET_H #include +/** The type of a pset (Set of pointers) */ typedef struct pset pset; +/** a pset entry */ typedef struct { unsigned hash; void *dptr; } pset_entry; - +/** the type of a pset compare function */ typedef int (*pset_cmp_fun) (const void *, const void *); -/* Makes new hash table. Needs function to compare two nodes to +/** Makes new hash table. Needs function to compare two nodes to resolve hash value collision and the size. */ pset *new_pset (pset_cmp_fun, int slots); -/* Deletes hash table */ + +/** Deletes hash table */ void del_pset (pset *); -/* Returns the pointer associated with pointer key. Hash is +/** Returns the pointer associated with pointer key. Hash is the hash value computed from key. Returns Null if key not in hash table. */ void *pset_find (pset *, const void *key, unsigned hash); @@ -32,8 +41,13 @@ void *pset_insert (pset *, const void *key, unsigned hash); pset_entry *pset_hinsert (pset *, const void *key, unsigned hash); void *pset_remove (pset *, const void *key, unsigned hash); +/** returns the first element of a pset */ void *pset_first (pset *); + +/** returns the next element of a pset */ void *pset_next (pset *); + +/** breaks the iteration of a set. Must be called before the next pset_first() call */ void pset_break (pset *); #define new_pset(cmp, slots) (PSET_TRACE (new_pset) ((cmp), (slots))) diff --git a/ir/adt/set.h b/ir/adt/set.h index 3d6950451..8d32bab88 100644 --- a/ir/adt/set.h +++ b/ir/adt/set.h @@ -3,32 +3,48 @@ /* $Id$ */ +/** + * @file set.h + * + * Declarations for set. + */ + #ifndef _SET_H #define _SET_H #include +/** The type of a set. */ typedef struct set set; +/** an entry of a set */ typedef struct set_entry { unsigned hash; size_t size; - int dptr[1]; /* data copied in must not need more + int dptr[1]; /**< data copied in must not need more alignment than this */ } set_entry; - +/** the type of a set compare function */ typedef int (*set_cmp_fun) (const void *elt, const void *key, size_t size); +/** creates a new set */ set *new_set (set_cmp_fun, int slots); + +/** deletes a set */ void del_set (set *); void *set_find (set *, const void *key, size_t, unsigned hash); void *set_insert (set *, const void *key, size_t, unsigned hash); set_entry *set_hinsert (set *, const void *key, size_t, unsigned hash); +/** returns the first element of a set */ void *set_first (set *); + +/** returns the next element of a set */ void *set_next (set *); + +/** breaks the iteration of a set. Must be called before the next set_first() call */ void set_break (set *); #define new_set(cmp, slots) (SET_TRACE (new_set) ((cmp), (slots))) diff --git a/ir/common/panic.h b/ir/common/panic.h index 88065aead..b9f57cf5e 100644 --- a/ir/common/panic.h +++ b/ir/common/panic.h @@ -1,15 +1,21 @@ /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe * All rights reserved. -* -* Authors: Martin Trapp, Christian Schaefer -* */ +/** + * @file panic.h + * + * @author Martin Trapp, Christian Schaefer + */ + /* $Id$ */ # ifndef _PANIC_H_ # define _PANIC_H_ +/** + * Prints a panic message to stderr and exits. + */ void panic (const char *fmt, ...); # endif /*_PANIC_H_ */ diff --git a/ir/common/tune.h b/ir/common/tune.h index 6186679eb..7af5698c6 100644 --- a/ir/common/tune.h +++ b/ir/common/tune.h @@ -6,7 +6,14 @@ #ifndef _TUNE_H #define _TUNE_H -/* From the jargon file: +/** + @file tune.h + + Tunable parameters. + + @author Markus Armbruster & Christian von Roques + + From the jargon file: :tune: vt. [from automotive or musical usage] To optimize a program or system for a particular environment, esp. by adjusting @@ -19,10 +26,10 @@ */ -/* Suggested minimal block size for buffered I/O */ +/** Suggested minimal block size for buffered I/O */ #define TUNE_SMALL_IOBUF_SIZE 512 -/* Size of pdeq block cache */ +/** Size of pdeq block cache */ #define TUNE_NSAVED_PDEQS 16 @@ -31,28 +38,28 @@ larger values generally mean slower startup. */ -/* Expected number of distinct identifiers */ +/** Expected number of distinct identifiers */ #define TUNE_NIDENTS 1024 -/* Expected number of classes */ +/** Expected number of classes */ #define TUNE_NCLASSES 128 -/* Expected number of class types */ +/** Expected number of class types */ #define TUNE_NCTYPES 128 -/* Expected number of routine, stream and stream object types */ +/** Expected number of routine, stream and stream object types */ #define TUNE_NMTYPES 512 -/* Expected number of method families */ +/** Expected number of method families */ #define TUNE_NMFAMILIES (TUNE_NCTYPES * 16) -/* Expected number of Intermediate Representation nodes for a method */ +/** Expected number of Intermediate Representation nodes for a method */ #define TUNE_NIR_NODES 512 -/* Expected number of distinct constant target values */ +/** Expected number of distinct constant target values */ #define TUNE_NCONSTANTS 2048 -/* notify configuration manager to prefetch sources */ +/** notify configuration manager to prefetch sources */ #define TUNE_PREFETCH #endif -- 2.20.1