]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.c
MdeModulePkg:Refine the code comments in RegularExpressionDxe.
[mirror_edk2.git] / MdeModulePkg / Universal / RegularExpressionDxe / RegularExpressionDxe.c
index 6c62957ca380ca4916f6c02669722fdf9dbf37cc..658031675e335c98bd5f5cf98262f5284d0d9c89 100644 (file)
@@ -1,5 +1,4 @@
-/**\r
-  @file\r
+/** @file\r
 \r
   EFI_REGULAR_EXPRESSION_PROTOCOL Implementation\r
 \r
@@ -12,6 +11,7 @@
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
   WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 **/\r
 \r
 #include "RegularExpressionDxe.h"\r
@@ -37,8 +37,40 @@ EFI_REGULAR_EXPRESSION_PROTOCOL mProtocolInstance = {
 \r
   Same parameters as RegularExpressionMatch, except SyntaxType is required.\r
 \r
-  @retval EFI_SUCCESS       Regex compilation and match completed successfully.\r
-  @retval EFI_DEVICE_ERROR  Regex compilation failed.\r
+  @param String         A pointer to a NULL terminated string to match against the\r
+                        regular expression string specified by Pattern.\r
+\r
+  @param Pattern        A pointer to a NULL terminated string that represents the\r
+                        regular expression.\r
+  @param SyntaxType     A pointer to the EFI_REGEX_SYNTAX_TYPE that identifies the\r
+                        regular expression syntax type to use. May be NULL in which\r
+                        case the function will use its default regular expression\r
+                        syntax type.\r
+\r
+  @param Result         On return, points to TRUE if String fully matches against\r
+                        the regular expression Pattern using the regular expression\r
+                        SyntaxType. Otherwise, points to FALSE.\r
+\r
+  @param Captures       A Pointer to an array of EFI_REGEX_CAPTURE objects to receive\r
+                        the captured groups in the event of a match. The full\r
+                        sub-string match is put in Captures[0], and the results of N\r
+                        capturing groups are put in Captures[1:N]. If Captures is\r
+                        NULL, then this function doesn't allocate the memory for the\r
+                        array and does not build up the elements. It only returns the\r
+                        number of matching patterns in CapturesCount. If Captures is\r
+                        not NULL, this function returns a pointer to an array and\r
+                        builds up the elements in the array. CapturesCount is also\r
+                        updated to the number of matching patterns found. It is the\r
+                        caller's responsibility to free the memory pool in Captures\r
+                        and in each CapturePtr in the array elements.\r
+\r
+  @param CapturesCount  On output, CapturesCount is the number of matching patterns\r
+                        found in String. Zero means no matching patterns were found\r
+                        in the string.\r
+\r
+  @retval  EFI_SUCCESS       Regex compilation and match completed successfully.\r
+  @retval  EFI_DEVICE_ERROR  Regex compilation failed.\r
+\r
 **/\r
 STATIC\r
 EFI_STATUS\r
@@ -144,23 +176,23 @@ OnigurumaMatch (
   Returns information about the regular expression syntax types supported\r
   by the implementation.\r
 \r
-  This                     A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL\r
-                           instance.\r
+  @param This                      A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL\r
+                                   instance.\r
 \r
-  RegExSyntaxTypeListSize  On input, the size in bytes of RegExSyntaxTypeList.\r
-                           On output with a return code of EFI_SUCCESS, the\r
-                           size in bytes of the data returned in\r
-                           RegExSyntaxTypeList. On output with a return code\r
-                           of EFI_BUFFER_TOO_SMALL, the size of\r
-                           RegExSyntaxTypeList required to obtain the list.\r
+  @param  RegExSyntaxTypeListSize  On input, the size in bytes of RegExSyntaxTypeList.\r
+                                   On output with a return code of EFI_SUCCESS, the\r
+                                   size in bytes of the data returned in\r
+                                   RegExSyntaxTypeList. On output with a return code\r
+                                   of EFI_BUFFER_TOO_SMALL, the size of\r
+                                   RegExSyntaxTypeList required to obtain the list.\r
 \r
-  RegExSyntaxTypeList      A caller-allocated memory buffer filled by the\r
-                           driver with one EFI_REGEX_SYNTAX_TYPE element\r
-                           for each supported Regular expression syntax\r
-                           type. The list must not change across multiple\r
-                           calls to the same driver. The first syntax\r
-                           type in the list is the default type for the\r
-                           driver.\r
+  @param   RegExSyntaxTypeList     A caller-allocated memory buffer filled by the\r
+                                   driver with one EFI_REGEX_SYNTAX_TYPE element\r
+                                   for each supported Regular expression syntax\r
+                                   type. The list must not change across multiple\r
+                                   calls to the same driver. The first syntax\r
+                                   type in the list is the default type for the\r
+                                   driver.\r
 \r
   @retval EFI_SUCCESS            The regular expression syntax types list\r
                                  was returned successfully.\r
@@ -209,41 +241,41 @@ RegularExpressionGetInfo (
 /**\r
   Checks if the input string matches to the regular expression pattern.\r
 \r
-  This          A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL instance.\r
-                Type EFI_REGULAR_EXPRESSION_PROTOCOL is defined in Section\r
-                XYZ.\r
-\r
-  String        A pointer to a NULL terminated string to match against the\r
-                regular expression string specified by Pattern.\r
-\r
-  Pattern       A pointer to a NULL terminated string that represents the\r
-                regular expression.\r
-\r
-  SyntaxType    A pointer to the EFI_REGEX_SYNTAX_TYPE that identifies the\r
-                regular expression syntax type to use. May be NULL in which\r
-                case the function will use its default regular expression\r
-                syntax type.\r
-\r
-  Result        On return, points to TRUE if String fully matches against\r
-                the regular expression Pattern using the regular expression\r
-                SyntaxType. Otherwise, points to FALSE.\r
-\r
-  Captures      A Pointer to an array of EFI_REGEX_CAPTURE objects to receive\r
-                the captured groups in the event of a match. The full\r
-                sub-string match is put in Captures[0], and the results of N\r
-                capturing groups are put in Captures[1:N]. If Captures is\r
-                NULL, then this function doesn't allocate the memory for the\r
-                array and does not build up the elements. It only returns the\r
-                number of matching patterns in CapturesCount. If Captures is\r
-                not NULL, this function returns a pointer to an array and\r
-                builds up the elements in the array. CapturesCount is also\r
-                updated to the number of matching patterns found. It is the\r
-                caller's responsibility to free the memory pool in Captures\r
-                and in each CapturePtr in the array elements.\r
-\r
-  CapturesCount On output, CapturesCount is the number of matching patterns\r
-                found in String. Zero means no matching patterns were found\r
-                in the string.\r
+  @param This          A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL instance.\r
+                       Type EFI_REGULAR_EXPRESSION_PROTOCOL is defined in Section\r
+                       XYZ.\r
+\r
+  @param String        A pointer to a NULL terminated string to match against the\r
+                       regular expression string specified by Pattern.\r
+\r
+  @param Pattern       A pointer to a NULL terminated string that represents the\r
+                       regular expression.\r
+\r
+  @param SyntaxType    A pointer to the EFI_REGEX_SYNTAX_TYPE that identifies the\r
+                       regular expression syntax type to use. May be NULL in which\r
+                       case the function will use its default regular expression\r
+                       syntax type.\r
+\r
+  @param Result        On return, points to TRUE if String fully matches against\r
+                       the regular expression Pattern using the regular expression\r
+                       SyntaxType. Otherwise, points to FALSE.\r
+\r
+  @param Captures      A Pointer to an array of EFI_REGEX_CAPTURE objects to receive\r
+                       the captured groups in the event of a match. The full\r
+                       sub-string match is put in Captures[0], and the results of N\r
+                       capturing groups are put in Captures[1:N]. If Captures is\r
+                       NULL, then this function doesn't allocate the memory for the\r
+                       array and does not build up the elements. It only returns the\r
+                       number of matching patterns in CapturesCount. If Captures is\r
+                       not NULL, this function returns a pointer to an array and\r
+                       builds up the elements in the array. CapturesCount is also\r
+                       updated to the number of matching patterns found. It is the\r
+                       caller's responsibility to free the memory pool in Captures\r
+                       and in each CapturePtr in the array elements.\r
+\r
+  @param CapturesCount On output, CapturesCount is the number of matching patterns\r
+                       found in String. Zero means no matching patterns were found\r
+                       in the string.\r
 \r
   @retval EFI_SUCCESS            The regular expression string matching\r
                                  completed successfully.\r
@@ -300,6 +332,12 @@ RegularExpressionMatch (
 \r
 /**\r
   Entry point for RegularExpressionDxe.\r
+\r
+  @param ImageHandle     Image handle this driver.\r
+  @param SystemTable     Pointer to SystemTable.\r
+\r
+  @retval Status         Whether this function complete successfully.\r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r