* SUCH DAMAGE.
*/
+#include <err.h>
+#include <errno.h>
#include <getopt.h>
+#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
-#include <errno.h>
-#include <libgen.h>
-#include <err.h>
#include "common.h"
-void usage(const char*);
+void usage(const char *);
#define MAXKEYLEN 21
{ "bourne-shell", no_argument, NULL, 'b' }, /**/
{ "sh", no_argument, NULL, 'b' }, /**/
{ "csh", no_argument, NULL, 'c' }, /**/
+ { "c-shell", no_argument, NULL, 'c' }, /**/
{ NULL, no_argument, NULL, 0 }
};
int ch;
FILE *fd;
char *prefix = "LS_COLORS='";
- char *suffix = "';\nexport LS_COLORS";
+ char *suffix = "';\nexport LS_COLORS;";
char *lsprefix = "LSCOLORS='";
- char *lssuffix = "';\nexport LSCOLORS";
+ char *lssuffix = "';\nexport LSCOLORS;";
while (
(ch = getopt_long(argc, argv, "hbc", long_options, NULL)) != -1) {
switch (ch) {
case 'b':
prefix = "LS_COLORS='";
- suffix = "';\nexport LS_COLORS";
+ suffix = "';\nexport LS_COLORS;";
lsprefix = "LSCOLORS='";
- lssuffix = "';\nexport LSCOLORS";
+ lssuffix = "';\nexport LSCOLORS;";
break;
case 'c':
prefix = "setenv LS_COLORS '";
fd = stdin;
else if ((fd = fopen(path, "r")) == NULL) {
warnx("%s: %s\n", path, strerror(errno));
- return(errno);
+ return (errno);
}
char *line = NULL;