aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-23 23:47:53 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-23 23:47:53 +0200
commit871fe1b311145129f42dc1a4b97f70e9f6d2dbf9 (patch)
treecf44f524f8d5100484a693b014b1c8353510c098
parent059f5b13acf3774b279125b3b568b55e13680ac6 (diff)
downloadre-name-master.tar.gz
Remove superfluous commentsHEADmaster
-rw-r--r--name.c12
-rw-r--r--re.c1
2 files changed, 3 insertions, 10 deletions
diff --git a/name.c b/name.c
index d2a4f61..fce3fba 100644
--- a/name.c
+++ b/name.c
@@ -6,9 +6,9 @@
#include <sys/select.h>
#include <sys/wait.h>
-#define MAXFILES 100 /* Maximum number of files. */
-#define MAXFILE 255 /* Maximum file name length. */
-#define MAXLINE MAXFILE+1 /* MAXFILE plus newline. */
+#define MAXFILES 100
+#define MAXFILE 255
+#define MAXLINE MAXFILE+1
extern char *optarg;
extern int optind;
@@ -23,7 +23,6 @@ main(int argc, char *argv[])
FILE *fp;
int c, i, j, s, xflag;
- /* Allocate memory. */
for(i = 0; i < MAXFILES; i++)
if(!(froms[i] = malloc(MAXFILE)) || !(tos[i] = malloc(MAXFILE)))
err(1, "malloc");
@@ -42,7 +41,6 @@ main(int argc, char *argv[])
return 1;
}
- /* Read command-line options. */
name = argv[0];
xflag = 0;
while((c = getopt(argc, argv, "x")) != -1)
@@ -81,10 +79,6 @@ usage: fprintf(stderr, "usage: %s [-x]\n", name);
return 1;
}
- /*
- * The corresponding mv invocations are printed on standard out.
- * If the -x flag is given, they are executed too.
- */
for(i = 0; i < j; i++){
escape(froms[i], &tmp); printf("mv -- '%s'", tmp);
escape(tos[i], &tmp); printf(" '%s'\n", tmp);
diff --git a/re.c b/re.c
index f4aeca8..f42f16b 100644
--- a/re.c
+++ b/re.c
@@ -14,7 +14,6 @@ main(int argc, char *argv[])
return 1;
}
- /* Ensure arguments do not contain newlines. */
for(i = 1; i < argc; i++)
for(a = argv[i]; *a; a++)
if(*a == '\n'){