doc: use doxygen @p to refer to parameters

This commit is contained in:
Justin Viiret 2017-11-07 13:33:01 +11:00 committed by Xiang Wang
parent f9af9f85b2
commit 58eda9155d
3 changed files with 31 additions and 31 deletions

View File

@ -143,7 +143,7 @@ hs_error_t HS_CDECL hs_deserialize_database(const char *bytes,
* by @ref hs_serialize_database() at a given memory location.
*
* This function (unlike @ref hs_deserialize_database()) will write the
* reconstructed database to the memory location given in the @a db parameter.
* reconstructed database to the memory location given in the @p db parameter.
* The amount of space required at this location can be determined with the
* @ref hs_serialized_database_size() function.
*

View File

@ -303,9 +303,9 @@ typedef struct hs_expr_ext {
* @param expression
* The NULL-terminated expression to parse. Note that this string must
* represent ONLY the pattern to be matched, with no delimiters or flags;
* any global flags should be specified with the @a flags argument. For
* any global flags should be specified with the @p flags argument. For
* example, the expression `/abc?def/i` should be compiled by providing
* `abc?def` as the @a expression, and @ref HS_FLAG_CASELESS as the @a
* `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a
* flags.
*
* @param flags
@ -372,8 +372,8 @@ hs_error_t HS_CDECL hs_compile(const char *expression, unsigned int flags,
* hs_compile()) these strings must contain only the pattern to be
* matched, with no delimiters or flags. For example, the expression
* `/abc?def/i` should be compiled by providing `abc?def` as the first
* string in the @a expressions array, and @ref HS_FLAG_CASELESS as the
* first value in the @a flags array.
* string in the @p expressions array, and @ref HS_FLAG_CASELESS as the
* first value in the @p flags array.
*
* @param flags
* Array of flags which modify the behaviour of each expression. Multiple
@ -428,7 +428,7 @@ hs_error_t HS_CDECL hs_compile(const char *expression, unsigned int flags,
*
* @return
* @ref HS_SUCCESS is returned on successful compilation; @ref
* HS_COMPILER_ERROR on failure, with details provided in the @a error
* HS_COMPILER_ERROR on failure, with details provided in the @p error
* parameter.
*
*/
@ -452,8 +452,8 @@ hs_error_t HS_CDECL hs_compile_multi(const char *const *expressions,
* hs_compile()) these strings must contain only the pattern to be
* matched, with no delimiters or flags. For example, the expression
* `/abc?def/i` should be compiled by providing `abc?def` as the first
* string in the @a expressions array, and @ref HS_FLAG_CASELESS as the
* first value in the @a flags array.
* string in the @p expressions array, and @ref HS_FLAG_CASELESS as the
* first value in the @p flags array.
*
* @param flags
* Array of flags which modify the behaviour of each expression. Multiple
@ -515,7 +515,7 @@ hs_error_t HS_CDECL hs_compile_multi(const char *const *expressions,
*
* @return
* @ref HS_SUCCESS is returned on successful compilation; @ref
* HS_COMPILER_ERROR on failure, with details provided in the @a error
* HS_COMPILER_ERROR on failure, with details provided in the @p error
* parameter.
*
*/
@ -559,9 +559,9 @@ hs_error_t HS_CDECL hs_free_compile_error(hs_compile_error_t *error);
* @param expression
* The NULL-terminated expression to parse. Note that this string must
* represent ONLY the pattern to be matched, with no delimiters or flags;
* any global flags should be specified with the @a flags argument. For
* any global flags should be specified with the @p flags argument. For
* example, the expression `/abc?def/i` should be compiled by providing
* `abc?def` as the @a expression, and @ref HS_FLAG_CASELESS as the @a
* `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a
* flags.
*
* @param flags
@ -621,9 +621,9 @@ hs_error_t HS_CDECL hs_expression_info(const char *expression,
* @param expression
* The NULL-terminated expression to parse. Note that this string must
* represent ONLY the pattern to be matched, with no delimiters or flags;
* any global flags should be specified with the @a flags argument. For
* any global flags should be specified with the @p flags argument. For
* example, the expression `/abc?def/i` should be compiled by providing
* `abc?def` as the @a expression, and @ref HS_FLAG_CASELESS as the @a
* `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a
* flags.
*
* @param flags

View File

@ -101,7 +101,7 @@ typedef struct hs_scratch hs_scratch_t;
* - If the start of match value lies outside this horizon (possible only
* when the SOM_HORIZON value is not @ref HS_MODE_SOM_HORIZON_LARGE),
* the @a from value will be set to @ref HS_OFFSET_PAST_HORIZON.
* the @p from value will be set to @ref HS_OFFSET_PAST_HORIZON.
* - This argument will be set to zero if the Start of Match flag is not
* enabled for the given pattern.
@ -195,7 +195,7 @@ hs_error_t HS_CDECL hs_scan_stream(hs_stream_t *id, const char *data,
*
* This function completes matching on the given stream and frees the memory
* associated with the stream state. After this call, the stream pointed to by
* @a id is invalid and can no longer be used. To reuse the stream state after
* @p id is invalid and can no longer be used. To reuse the stream state after
* completion, rather than closing it, the @ref hs_reset_stream function can be
* used.
*
@ -216,7 +216,7 @@ hs_error_t HS_CDECL hs_scan_stream(hs_stream_t *id, const char *data,
*
* @param scratch
* A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is
* allowed to be NULL only if the @a onEvent callback is also NULL.
* allowed to be NULL only if the @p onEvent callback is also NULL.
*
* @param onEvent
* Pointer to a match event callback function. If a NULL pointer is given,
@ -257,7 +257,7 @@ hs_error_t HS_CDECL hs_close_stream(hs_stream_t *id, hs_scratch_t *scratch,
*
* @param scratch
* A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is
* allowed to be NULL only if the @a onEvent callback is also NULL.
* allowed to be NULL only if the @p onEvent callback is also NULL.
*
* @param onEvent
* Pointer to a match event callback function. If a NULL pointer is given,
@ -293,7 +293,7 @@ hs_error_t HS_CDECL hs_copy_stream(hs_stream_t **to_id,
/**
* Duplicate the given 'from' stream state onto the 'to' stream. The 'to' stream
* will first be reset (reporting any EOD matches if a non-NULL @a onEvent
* will first be reset (reporting any EOD matches if a non-NULL @p onEvent
* callback handler is provided).
*
* Note: the 'to' stream and the 'from' stream must be open against the same
@ -308,7 +308,7 @@ hs_error_t HS_CDECL hs_copy_stream(hs_stream_t **to_id,
*
* @param scratch
* A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is
* allowed to be NULL only if the @a onEvent callback is also NULL.
* allowed to be NULL only if the @p onEvent callback is also NULL.
*
* @param onEvent
* Pointer to a match event callback function. If a NULL pointer is given,
@ -331,10 +331,10 @@ hs_error_t HS_CDECL hs_reset_and_copy_stream(hs_stream_t *to_id,
* Creates a compressed representation of the provided stream in the buffer
* provided. This compressed representation can be converted back into a stream
* state by using @ref hs_expand_stream() or @ref hs_reset_and_expand_stream().
* The size of the compressed representation will be placed into @a used_space.
* The size of the compressed representation will be placed into @p used_space.
*
* If there is not sufficient space in the buffer to hold the compressed
* represention, @ref HS_INSUFFICIENT_SPACE will be returned and @a used_space
* representation, @ref HS_INSUFFICIENT_SPACE will be returned and @p used_space
* will be populated with the amount of space required.
*
* Note: this function does not close the provided stream, you may continue to
@ -346,15 +346,15 @@ hs_error_t HS_CDECL hs_reset_and_copy_stream(hs_stream_t *to_id,
* @param buf
* Buffer to write the compressed representation into. Note: if the call is
* just being used to determine the amount of space required, it is allowed
* to pass NULL here and @a buf_space as 0.
* to pass NULL here and @p buf_space as 0.
*
* @param buf_space
* The number of bytes in @a buf. If buf_space is too small, the call will
* The number of bytes in @p buf. If buf_space is too small, the call will
* fail with @ref HS_INSUFFICIENT_SPACE.
*
* @param used_space
* Pointer to where the amount of used space will be written to. The used
* buffer space is always less than or equal to @a buf_space. If the call
* buffer space is always less than or equal to @p buf_space. If the call
* fails with @ref HS_INSUFFICIENT_SPACE, this pointer will be used to
* write out the amount of buffer space required.
*
@ -369,8 +369,8 @@ hs_error_t HS_CDECL hs_compress_stream(const hs_stream_t *stream, char *buf,
* Decompresses a compressed representation created by @ref hs_compress_stream()
* into a new stream.
*
* Note: @a buf must correspond to a complete compressed representation created
* by @ref hs_compress_stream() of a stream that was opened against @a db. It is
* Note: @p buf must correspond to a complete compressed representation created
* by @ref hs_compress_stream() of a stream that was opened against @p db. It is
* not always possible to detect misuse of this API and behaviour is undefined
* if these properties are not satisfied.
*
@ -399,13 +399,13 @@ hs_error_t HS_CDECL hs_expand_stream(const hs_database_t *db,
/**
* Decompresses a compressed representation created by @ref hs_compress_stream()
* on top of the 'to' stream. The 'to' stream will first be reset (reporting
* any EOD matches if a non-NULL @a onEvent callback handler is provided).
* any EOD matches if a non-NULL @p onEvent callback handler is provided).
*
* Note: the 'to' stream must be opened against the same database as the
* compressed stream.
*
* Note: @a buf must correspond to a complete compressed representation created
* by @ref hs_compress_stream() of a stream that was opened against @a db. It is
* Note: @p buf must correspond to a complete compressed representation created
* by @ref hs_compress_stream() of a stream that was opened against @p db. It is
* not always possible to detect misuse of this API and behaviour is undefined
* if these properties are not satisfied.
*
@ -422,7 +422,7 @@ hs_error_t HS_CDECL hs_expand_stream(const hs_database_t *db,
*
* @param scratch
* A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is
* allowed to be NULL only if the @a onEvent callback is also NULL.
* allowed to be NULL only if the @p onEvent callback is also NULL.
*
* @param onEvent
* Pointer to a match event callback function. If a NULL pointer is given,
@ -498,7 +498,7 @@ hs_error_t HS_CDECL hs_scan(const hs_database_t *db, const char *data,
*
* @param count
* Number of data blocks to scan. This should correspond to the size of
* of the @a data and @a length arrays.
* of the @p data and @p length arrays.
*
* @param flags
* Flags modifying the behaviour of this function. This parameter is