Make sure the regcomp's work. http://bugs.gentoo.org/91977 --- eject.c +++ eject.c @@ -706,2 +706,11 @@ +int xregcomp(regex_t *preg, const char *regex, int cflags) +{ + if (regcomp(preg, regex, cflags) != 0) { + fprintf(stderr, _("%s: regcomp failed: %s\n"), programName, strerror(errno)); + exit(1); + } + return 0; +} + @@ -720,3 +729,3 @@ - regcomp(&preg, pattern, REG_EXTENDED); + xregcomp(&preg, pattern, REG_EXTENDED); @@ -799,3 +808,3 @@ strcat(pattern, "[a-z]([0-9]?[0-9])?$"); - regcomp(&preg, pattern, REG_EXTENDED|REG_NOSUB); + xregcomp(&preg, pattern, REG_EXTENDED|REG_NOSUB); status = regexec(&preg, name, 1, 0, 0);