mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-29 05:39:55 +03:00
Renaming a struct element for aptness and contrast.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5689 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
2134212fa9
commit
3522751c6b
@ -8,6 +8,7 @@
|
||||
* src/color.c (found_in_list): Factor out this triple repetition.
|
||||
* src/color.c (color_update): Rename a variable for conciseness.
|
||||
* src/color.c (nfreeregex): Elide this function, now used just once.
|
||||
* src/nano.h: Rename a struct element for aptness and contrast.
|
||||
|
||||
GNU nano 2.5.3 - 2016.02.25
|
||||
|
||||
|
@ -151,7 +151,7 @@ bool found_in_list(regexlisttype *head, const char *shibboleth)
|
||||
|
||||
if (not_compiled) {
|
||||
item->ext = (regex_t *)nmalloc(sizeof(regex_t));
|
||||
regcomp(item->ext, fixbounds(item->ext_regex), REG_EXTENDED);
|
||||
regcomp(item->ext, fixbounds(item->full_regex), REG_EXTENDED);
|
||||
}
|
||||
|
||||
if (regexec(item->ext, shibboleth, 0, NULL, 0) == 0)
|
||||
|
@ -1626,7 +1626,7 @@ int strtomenu(const char *input)
|
||||
#ifndef DISABLE_COLOR
|
||||
void free_list_item(regexlisttype *dropit)
|
||||
{
|
||||
free(dropit->ext_regex);
|
||||
free(dropit->full_regex);
|
||||
if (dropit->ext != NULL)
|
||||
regfree(dropit->ext);
|
||||
free(dropit->ext);
|
||||
|
@ -229,8 +229,8 @@ typedef struct colortype {
|
||||
} colortype;
|
||||
|
||||
typedef struct regexlisttype {
|
||||
char *ext_regex;
|
||||
/* The regexstrings for the things that match this syntax. */
|
||||
char *full_regex;
|
||||
/* A regex string to match things that imply a certain syntax. */
|
||||
regex_t *ext;
|
||||
/* The compiled regexes. */
|
||||
struct regexlisttype *next;
|
||||
|
@ -374,7 +374,7 @@ void parse_syntax(char *ptr)
|
||||
|
||||
/* Save the extension regex if it's valid. */
|
||||
if (nregcomp(fileregptr, REG_NOSUB)) {
|
||||
newext->ext_regex = mallocstrcpy(NULL, fileregptr);
|
||||
newext->full_regex = mallocstrcpy(NULL, fileregptr);
|
||||
newext->ext = NULL;
|
||||
|
||||
if (endext == NULL)
|
||||
@ -895,7 +895,7 @@ void parse_header_exp(char *ptr)
|
||||
|
||||
/* Save the regex string if it's valid. */
|
||||
if (nregcomp(regexstring, 0)) {
|
||||
newheader->ext_regex = mallocstrcpy(NULL, regexstring);
|
||||
newheader->full_regex = mallocstrcpy(NULL, regexstring);
|
||||
newheader->ext = NULL;
|
||||
|
||||
if (endheader == NULL)
|
||||
@ -960,7 +960,7 @@ void parse_magic_exp(char *ptr)
|
||||
|
||||
/* Save the regex string if it's valid. */
|
||||
if (nregcomp(regexstring, REG_NOSUB)) {
|
||||
newmagic->ext_regex = mallocstrcpy(NULL, regexstring);
|
||||
newmagic->full_regex = mallocstrcpy(NULL, regexstring);
|
||||
newmagic->ext = NULL;
|
||||
|
||||
if (endmagic == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user