]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
parse.h doxygened and added to function_manpages
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 26 Apr 2005 12:24:20 +0000 (12:24 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 26 Apr 2005 12:24:20 +0000 (12:24 +0000)
ldns/parse.h

index a73a3ff12a6735d3a397acf477b1c767807b60dd..31b45ad945504464266892e1c2a53553b8e1bd89 100644 (file)
 #define MAXLINE_LEN            512
 #define MAXKEYWORD_LEN         32
 
-/* 
- * get a token/char from the stream F
- * return 0 on error of EOF of F
- * return >0 length of what is read.
- * This function deals with ( and ) in the stream
- * and ignore \n when it finds them
- * if the limit == 0, don't use it
- * otherwise its the maximum returned dize
+/** 
+ * Get a token/char from the stream F.
+ * This function deals with ( and ) in the stream,
+ * and ignore \n when it finds them.
+ * \param[in] *f the file to read from
+ * \param[out] *token the read token is put here
+ * \param[in] *delim chars at which the parsing should stop
+ * \param[in] *limit how much to read. If 0 use builtin maximum
+ * \return 0 on error of EOF of F otherwise return the length of what is * read
  */
 ssize_t ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit);
 
@@ -37,14 +38,15 @@ ssize_t ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit);
  */
 ssize_t ldns_fget_keyword_data(FILE *f, const char *keyword, const char *k_del, char *data, const char *d_del);
 
-/* 
- * get a token/char from the buffer b
- * return 0 on error of EOF of F
- * return >0 length of what is read.
- * This function deals with ( and ) in the stream
- * and ignore \n when it finds them
- * if the limit == 0, don't use it
- * otherwise its the maximum returned dize
+/**
+ * Get a token/char from the stream b.
+ * This function deals with ( and ) in the stream,
+ * and ignore \n when it finds them.
+ * \param[in] *f the file to read from
+ * \param[out] *token the read token is put here
+ * \param[in] *delim chars at which the parsing should stop
+ * \param[in] *limit how much to read. If 0 use builtin maximum
+ * \return 0 on error of EOF of b otherwise return the length of what is * read
  */
 ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t limit);
 
@@ -54,28 +56,39 @@ ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t l
  */
 ssize_t ldns_bget_keyword_data(ldns_buffer *b, const char *keyword, const char *k_del, char *data, const char *d_del);
 
-/* remove comments from a string. Comment = ';' until \n
- * replace ; until \n with spaces
- * return the new string
+/**
+ * Remove comments from a string. A comment = ';'.
+ * Go on with this until one reaches a newline (\n).
+ * The comments are replaces with spaces.
+ * \param[in] the string to remove the comments from. String must be * writeable
+ * \return the new string
  */
 char * ldns_str_remove_comment(char *str);
 
-/*
- * Get the next character from a buffer. Advance the position
- * pointer with 1.
- * When end of buffer is reached return EOF
+/**
+ * Get the next character from a buffer. Advance the position pointer with 1.
+ * When end of buffer is reached return EOF. This is the buffer's equiv.
+ * for getc().
+ * \param[in] *buffer buffer to read from
+ * \return EOF on failure otherwise return the character
  */
 int ldns_bgetc(ldns_buffer *buffer);
 
 /**
  * Skip all of the characters in the given string in the buffer, moving
  * the position to the first character that is not in *s
+ * \param[in] *buffer buffer to use
+ * \param[in] *s character to skip
+ * \return void
  */
 void ldns_bskipcs(ldns_buffer *buffer, const char *s);
 
 /**
  * Skip all of the characters in the given string in the fp, moving
  * the position to the first character that is not in *s
+ * \param[in] *fp file to use
+ * \param[in] *s character to skip
+ * \return void
  */
 void ldns_fskipcs(FILE *fp, const char *s);