]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
locks.h doxygen not enforced, it looks bad.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 20 Feb 2007 15:47:27 +0000 (15:47 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 20 Feb 2007 15:47:27 +0000 (15:47 +0000)
no lint and doxygen on yacc and lex generated files.
added doc to config_file.h

git-svn-id: file:///svn/unbound/trunk@132 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
doc/unbound.doxygen
testdata/01-doc.tpkg
util/config_file.c
util/config_file.h
util/locks.h

index 1f79b20aa6cd5dc868a9df9fab34e1dd9cca1a41..f2dd6604e71ee82c47d1cecd6aa7892cc8affa33 100644 (file)
@@ -115,7 +115,7 @@ realclean: clean
        rm -f Makefile 
 
 lint:
-       $Qfor i in $(sort $(ALL_SRC)); do \
+       $Qfor i in $(filter-out util/configparser.c,$(filter-out util/configlexer.c,$(sort $(ALL_SRC)))); do \
                echo lint $$i; \
                $(LINT) $(LINTFLAGS) -I. -I$(srcdir) -I$(ldnsdir)/include $(srcdir)/$$i ; \
                if [ $$? -ne 0 ] ; then exit 1 ; fi ; \
index baf13faafc97c3973d9c9ebb92e04ba715100889..73f9470e7e13cd588b9b44b7a9b6a5c32d130060 100644 (file)
@@ -480,7 +480,7 @@ RECURSIVE              = YES
 # excluded from the INPUT source files. This way you can easily exclude a 
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                =  ./build ./compat
+EXCLUDE                =  ./build ./compat util/configparser.c util/configparser.h util/configlexer.c util/locks.h
 
 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
 # directories that are symbolic links (a Unix filesystem feature) are excluded 
index 500d5ec9182870126aed43599f7aa02824d15e97..a2e5f0e5c0f183953b9abe041379d115c6c9c30c 100644 (file)
Binary files a/testdata/01-doc.tpkg and b/testdata/01-doc.tpkg differ
index 7894a810da9a359d260486326eeca823807f7c6d..df6d34e038b2dcc4ce560e156dbeac610ecf9ee2 100644 (file)
 #include "util/configyyrename.h"
 #include "util/config_file.h"
 #include "util/configparser.h"
+/** global config during parsing */
 struct config_parser_state* cfg_parser = 0;
-extern FILE* ub_c_in, *ub_c_out;
+/** lex in file */
+extern FILE* ub_c_in;
+/** lex out file */
+extern FILE* ub_c_out;
+/** the yacc lex generated parse function */
 int ub_c_parse(void);
+/** the lexer function */
 int ub_c_lex(void);
+/** wrap function */
 int ub_c_wrap(void);
+/** print error with file and line number */
 void ub_c_error(const char *message);
 
 struct config_file* 
@@ -85,6 +93,7 @@ config_delete(struct config_file* cfg)
        free(cfg);
 }
 
+/** print error with file and line number */
 void ub_c_error_va_list(const char *fmt, va_list args)
 {
        cfg_parser->errors++;
@@ -94,6 +103,7 @@ void ub_c_error_va_list(const char *fmt, va_list args)
        fprintf(stderr, "\n");
 }
 
+/** print error with file and line number */
 void ub_c_error_msg(const char* fmt, ...)
 {
        va_list args;
index 99223653a656fbc6fd558c8a76d4b970755016f0..f11c65a4f4c8105f9227657fdb2a39515f6271d7 100644 (file)
@@ -83,15 +83,21 @@ void config_delete(struct config_file* config);
  * Used during options parsing
  */
 struct config_parser_state {
+       /** name of file being parser */
        char* filename;
+       /** line number in the file, starts at 1 */
        int line;
+       /** number of errors encountered */
        int errors;
+       /** the result of parsing is stored here. */
        struct config_file* cfg;
 };
 
+/** global config parser object used during config parsing */
 extern struct config_parser_state* cfg_parser;
-/* parsing helpers */
+/** parsing helpers: print error with file and line numbers. */
 void ub_c_error(const char* msg);
+/** parsing helpers: print error with file and line numbers. */
 void ub_c_error_msg(const char* fmt, ...) ATTR_FORMAT(printf, 1, 2);
 
 #endif /* UTIL_CONFIG_FILE_H */
index bb8eaef669bece0dd50ae51bdc7c4c430b265a0b..317187cf701f7f336f04107f733e02a934518b66 100644 (file)
 typedef pthread_rwlock_t lock_rw_t;
 /** small front for pthread init func, NULL is default attrs. */
 #define lock_rw_init(lock) LOCKRET(pthread_rwlock_init(lock, NULL))
-/** free up the lock. must be unlocked. */
 #define lock_rw_destroy(lock) LOCKRET(pthread_rwlock_destroy(lock))
-/** acquire a read lock */
 #define lock_rw_rdlock(lock) LOCKRET(pthread_rwlock_rdlock(lock))
-/** acquire a write lock */
 #define lock_rw_wrlock(lock) LOCKRET(pthread_rwlock_wrlock(lock))
-/** unlock previously acquired read or write lock */
 #define lock_rw_unlock(lock) LOCKRET(pthread_rwlock_unlock(lock))
 
 /** use pthread mutex for basic lock */
 typedef pthread_mutex_t lock_basic_t;
 /** small front for pthread init func, NULL is default attrs. */
 #define lock_basic_init(lock) LOCKRET(pthread_mutex_init(lock, NULL))
-/** free up the lock. must be unlocked. */
 #define lock_basic_destroy(lock) LOCKRET(pthread_mutex_destroy(lock))
-/** acquire lock. This may block indefinetely. */
 #define lock_basic_lock(lock) LOCKRET(pthread_mutex_lock(lock))
-/** unlock acquired lock. */
 #define lock_basic_unlock(lock) LOCKRET(pthread_mutex_unlock(lock))
 
 #ifndef HAVE_PTHREAD_SPINLOCK_T
@@ -103,11 +96,8 @@ typedef pthread_mutex_t lock_basic_t;
 typedef pthread_mutex_t lock_quick_t;
 /** small front for pthread init func, NULL is default attrs. */
 #define lock_quick_init(lock) LOCKRET(pthread_mutex_init(lock, NULL))
-/** free up the lock. must be unlocked. */
 #define lock_quick_destroy(lock) LOCKRET(pthread_mutex_destroy(lock))
-/** acquire lock. may block. */
 #define lock_quick_lock(lock) LOCKRET(pthread_mutex_lock(lock))
-/** unlock acquired lock. */
 #define lock_quick_unlock(lock) LOCKRET(pthread_mutex_unlock(lock))
 
 #else /* HAVE_PTHREAD_SPINLOCK_T */
@@ -121,11 +111,8 @@ typedef pthread_spinlock_t lock_quick_t;
  * spinlocks are not supported on all pthread platforms. 
  */
 #define lock_quick_init(lock) LOCKRET(pthread_spin_init(lock, PTHREAD_PROCESS_PRIVATE))
-/** free up the lock. must be unlocked. */
 #define lock_quick_destroy(lock) LOCKRET(pthread_spin_destroy(lock))
-/** acquire lock. This may block indefinetely, and will spin. */
 #define lock_quick_lock(lock) LOCKRET(pthread_spin_lock(lock))
-/** unlock acquired lock. */
 #define lock_quick_unlock(lock) LOCKRET(pthread_spin_unlock(lock))
 
 #endif /* HAVE SPINLOCK */
@@ -140,37 +127,24 @@ typedef pthread_t ub_thread_t;
 
 /******************* SOLARIS THREADS ************************/
 typedef rwlock_t lock_rw_t;
-/** create thisprocessonly lock */
 #define lock_rw_init(lock) LOCKRET(rwlock_init(lock, USYNC_THREAD, NULL))
-/** destroy it */
 #define lock_rw_destroy(lock) LOCKRET(rwlock_destroy(lock))
-/** lock read */
 #define lock_rw_rdlock(lock) LOCKRET(rw_rdlock(lock))
-/** lock write */
 #define lock_rw_wrlock(lock) LOCKRET(rw_wrlock(lock))
-/** unlock */
 #define lock_rw_unlock(lock) LOCKRET(rw_unlock(lock))
 
 /** use basic mutex */
 typedef mutex_t lock_basic_t;
-/** create */
 #define lock_basic_init(lock) LOCKRET(mutex_init(lock, USYNC_THREAD, NULL))
-/** destroy */
 #define lock_basic_destroy(lock) LOCKRET(mutex_destroy(lock))
-/** lock */
 #define lock_basic_lock(lock) LOCKRET(mutex_lock(lock))
-/** unlock */
 #define lock_basic_unlock(lock) LOCKRET(mutex_unlock(lock))
 
 /** No spinlocks in solaris threads API. Use a mutex. */
 typedef mutex_t lock_quick_t;
-/** create */
 #define lock_quick_init(lock) LOCKRET(mutex_init(lock, USYNC_THREAD, NULL))
-/** destroy */
 #define lock_quick_destroy(lock) LOCKRET(mutex_destroy(lock))
-/** lock */
 #define lock_quick_lock(lock) LOCKRET(mutex_lock(lock))
-/** unlock */
 #define lock_quick_unlock(lock) LOCKRET(mutex_unlock(lock))
 
 /** Thread creation, create a default thread. */
@@ -182,37 +156,24 @@ typedef thread_t ub_thread_t;
 /******************* NO THREADS ************************/
 /** In case there is no thread support, define locks to do nothing */
 typedef int lock_rw_t;
-/** does nothing */
 #define lock_rw_init(lock) /* nop */
-/** does nothing */
 #define lock_rw_destroy(lock) /* nop */
-/** does nothing */
 #define lock_rw_rdlock(lock) /* nop */
-/** does nothing */
 #define lock_rw_wrlock(lock) /* nop */
-/** does nothing */
 #define lock_rw_unlock(lock) /* nop */
 
 /** define locks to do nothing */
 typedef int lock_basic_t;
-/** does nothing */
 #define lock_basic_init(lock) /* nop */
-/** does nothing */
 #define lock_basic_destroy(lock) /* nop */
-/** does nothing */
 #define lock_basic_lock(lock) /* nop */
-/** does nothing */
 #define lock_basic_unlock(lock) /* nop */
 
 /** define locks to do nothing */
 typedef int lock_quick_t;
-/** does nothing */
 #define lock_quick_init(lock) /* nop */
-/** does nothing */
 #define lock_quick_destroy(lock) /* nop */
-/** does nothing */
 #define lock_quick_lock(lock) /* nop */
-/** does nothing */
 #define lock_quick_unlock(lock) /* nop */
 
 /** Thread creation, threads do not exist */