* selector is a simple command line utility for selection of strings
* with a dynamic pattern-matching.
*
- * Copyright (c) 2009, 2010, 2011, 2012 Francois Fleuret
+ * Copyright (c) 2009-2013 Francois Fleuret
* Written by Francois Fleuret <francois@fleuret.org>
*
* This file is part of selector.
void *p = malloc(n);
if(!p && n != 0) {
fprintf(stderr,
- "selector: can not allocate memory: %s\n", strerror(errno));
+ "selector: cannot allocate memory: %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
return p;
while(g < n && switches[g] <= end) { g++; }
if(f == n) {
- /* switches[n-1] start end */
+ /* switches[f-1] start end */
/* XXXXXXXXXXXX| */
switches[f] = start;
switches[f+1] = end;
file = fopen(input_filename, "r");
if(!file) {
- fprintf(stderr, "selector: Can not open `%s'.\n", input_filename);
+ fprintf(stderr, "selector: Cannot open `%s'.\n", input_filename);
exit(EXIT_FAILURE);
}
fprintf(out, "\n");
} else {
fprintf(stderr,
- "selector: Can not open %s for writing.\n",
+ "selector: Cannot open %s for writing.\n",
output_filename);
exit(EXIT_FAILURE);
}