sandy

text editor
git clone git://git.suckless.org/sandy
Log | Files | Refs | README | LICENSE

commit a4f152513716d65b64b88cfac3bfb14f06c1d07d
parent 05efa94d5e8d60704d8f323e5f0616a36a34ceb2
Author: Rafael Garcia <rafael.garcia.gallego@gmail.com>
Date:   Sat, 28 May 2011 20:25:07 +0200

Temporarily comment out the effects of some regcomp until we manage to get a universal subset of regular expressions or find a suitable regex lib.

IMPORTANT: lots of segfaults in faulty regexes right now!
Diffstat:
sandy.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sandy.c b/sandy.c @@ -441,7 +441,7 @@ f_syntax(const Arg *arg) { : !regexec(syntaxes[i].file_re, filename, 1, NULL, 0)) { for(j=0; j<SYN_COLORS; j++) { if(syntx && syntx->re[j]) regfree(syntx->re[j]); - if(regcomp(syntaxes[i].re[j], syntaxes[i].re_text[j], REG_EXTENDED|REG_NEWLINE)) i_die("Faulty regex.\n"); + if(regcomp(syntaxes[i].re[j], syntaxes[i].re_text[j], REG_EXTENDED|REG_NEWLINE)) ; /* i_die("Faulty regex.\n"); */ /* Until regexes are universal */ } syntx=&syntaxes[i]; setenv(envs[EnvSyntax], syntx->name, 1); @@ -1093,12 +1093,12 @@ i_setup(void){ for(i=0; i<LENGTH(cmds); i++) { if((cmds[i].re=(regex_t*)calloc(1, sizeof (regex_t))) == NULL) i_die("Can't malloc.\n"); - if(regcomp(cmds[i].re, cmds[i].re_text, REG_EXTENDED|REG_ICASE|REG_NEWLINE)) i_die("Faulty regex.\n"); + if(regcomp(cmds[i].re, cmds[i].re_text, REG_EXTENDED|REG_ICASE|REG_NEWLINE)) ; /* i_die("Faulty regex.\n"); */ /* Comment out until regexes are universal */ } for(i=0; i<LENGTH(syntaxes); i++) { if((syntaxes[i].file_re=(regex_t*)calloc(1, sizeof (regex_t))) == NULL) i_die("Can't malloc.\n"); - if(regcomp(syntaxes[i].file_re, syntaxes[i].file_re_text, REG_EXTENDED|REG_NOSUB|REG_ICASE|REG_NEWLINE)) i_die("Faulty regex.\n"); + if(regcomp(syntaxes[i].file_re, syntaxes[i].file_re_text, REG_EXTENDED|REG_NOSUB|REG_ICASE|REG_NEWLINE)) ; /* i_die("Faulty regex.\n"); */ /* Comment out until regexes are universal */ for(j=0; j<SYN_COLORS; j++) if((syntaxes[i].re[j]=(regex_t*)calloc(1, sizeof (regex_t))) == NULL) i_die("Can't malloc.\n"); } @@ -1107,8 +1107,8 @@ i_setup(void){ if(mkfifo(fifopath, (S_IRUSR|S_IWUSR)) !=0) i_die("FIFO already exists.\n"); if((fifofd = open(fifopath, O_RDONLY | O_NONBLOCK)) == -1) i_die("Can't open FIFO for reading.\n");; setenv(envs[EnvFifo], fifopath, 1); - regcomp(find_res[0], "", 0); - regcomp(find_res[1], "", 0); + /*regcomp(find_res[0], "", 0); + regcomp(find_res[1], "", 0); */ /* Comment out until regexes are universal */ initscr(); if(has_colors()) {