diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-01-24 19:29:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-01-24 19:29:39 +0000 |
commit | 394e10e4f80d42b6ab4d005517ab6a0959440701 (patch) | |
tree | 1658e57e1330682519b837c6354291e850c7ccb9 | |
parent | f1f99299716ff662be2ae0e0a668915664bbe766 (diff) |
updates from ncurses-4.2-990123
-rw-r--r-- | lib/libform/fty_regex.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/libform/fty_regex.c b/lib/libform/fty_regex.c index d018dde95dc..59cbe4129d4 100644 --- a/lib/libform/fty_regex.c +++ b/lib/libform/fty_regex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fty_regex.c,v 1.4 1998/07/24 02:37:48 millert Exp $ */ +/* $OpenBSD: fty_regex.c,v 1.5 1999/01/24 19:29:38 millert Exp $ */ /* @@ -15,7 +15,7 @@ #include "form.priv.h" -MODULE_ID("$From: fty_regex.c,v 1.11 1997/10/18 19:32:35 tom Exp $") +MODULE_ID("$From: fty_regex.c,v 1.12 1999/01/24 03:24:42 Kimio.Ishii Exp $") #if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */ #include <regex.h> @@ -68,9 +68,9 @@ typedef struct #endif /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Make_RegularExpression_Type(va_list * ap) -| +| | Description : Allocate structure for regex type argument. | | Return Values : Pointer to argument structure or NULL on error @@ -105,7 +105,7 @@ static void *Make_RegularExpression_Type(va_list * ap) RegExp_Arg *pArg; pArg = (RegExp_Arg *)malloc(sizeof(RegExp_Arg)); - + if (pArg) { int blen = RX_INCREMENT; @@ -119,8 +119,8 @@ static void *Make_RegularExpression_Type(va_list * ap) { #if HAVE_REGEXP_H_FUNCS char *last_pos = compile (rx, buf, &buf[blen], '\0'); -#else - char *last_pos = compile (rx, buf, &buf[blen], '\0'); +#else /* HAVE_REGEXPR_H_FUNCS */ + char *last_pos = compile (rx, buf, &buf[blen]); #endif if (reg_errno) { @@ -128,7 +128,7 @@ static void *Make_RegularExpression_Type(va_list * ap) if (reg_errno==50) blen += RX_INCREMENT; else - { + { free(pArg); pArg = NULL; break; @@ -154,11 +154,11 @@ static void *Make_RegularExpression_Type(va_list * ap) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void *Copy_RegularExpression_Type( | const void * argp) -| -| Description : Copy structure for regex type argument. +| +| Description : Copy structure for regex type argument. | | Return Values : Pointer to argument structure or NULL on error. +--------------------------------------------------------------------------*/ @@ -166,8 +166,8 @@ static void *Copy_RegularExpression_Type(const void * argp) { #if (HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS) const RegExp_Arg *ap = (const RegExp_Arg *)argp; - const RegExp_Arg *result = (const RegExp_Arg *)0; - + const RegExp_Arg *result = (const RegExp_Arg *)0; + if (ap) { *(ap->refCount) += 1; @@ -180,9 +180,9 @@ static void *Copy_RegularExpression_Type(const void * argp) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static void Free_RegularExpression_Type(void * argp) -| +| | Description : Free structure for regex type argument. | | Return Values : - @@ -215,11 +215,11 @@ static void Free_RegularExpression_Type(void * argp) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : static bool Check_RegularExpression_Field( | FIELD * field, | const void * argp) -| +| | Description : Validate buffer content to be a valid regular expression | | Return Values : TRUE - field is valid |