Thu Oct 9 19:22:31 2014 UTC ()
Kill more unused indent code in emitfiles().


(uebayasi)
diff -r1.21 -r1.22 src/usr.bin/config/mkmakefile.c

cvs diff -r1.21 -r1.22 src/usr.bin/config/mkmakefile.c (expand / switch to unified diff)

--- src/usr.bin/config/mkmakefile.c 2014/10/09 19:20:56 1.21
+++ src/usr.bin/config/mkmakefile.c 2014/10/09 19:22:31 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mkmakefile.c,v 1.21 2014/10/09 19:20:56 uebayasi Exp $ */ 1/* $NetBSD: mkmakefile.c,v 1.22 2014/10/09 19:22:31 uebayasi Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This software was developed by the Computer Systems Engineering group 7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
9 * contributed to Berkeley. 9 * contributed to Berkeley.
10 * 10 *
11 * All advertising materials mentioning features or use of this software 11 * All advertising materials mentioning features or use of this software
12 * must display the following acknowledgement: 12 * must display the following acknowledgement:
13 * This product includes software developed by the University of 13 * This product includes software developed by the University of
14 * California, Lawrence Berkeley Laboratories. 14 * California, Lawrence Berkeley Laboratories.
@@ -432,34 +432,26 @@ emitfiles(FILE *fp, int suffix, int uppe @@ -432,34 +432,26 @@ emitfiles(FILE *fp, int suffix, int uppe
432 int len; 432 int len;
433 const char *fpath; 433 const char *fpath;
434 struct config *cf; 434 struct config *cf;
435 char swapname[100]; 435 char swapname[100];
436 436
437 fprintf(fp, "%cFILES= \\\n", toupper(suffix)); 437 fprintf(fp, "%cFILES= \\\n", toupper(suffix));
438 TAILQ_FOREACH(fi, &allfiles, fi_next) { 438 TAILQ_FOREACH(fi, &allfiles, fi_next) {
439 if ((fi->fi_flags & FI_SEL) == 0) 439 if ((fi->fi_flags & FI_SEL) == 0)
440 continue; 440 continue;
441 fpath = srcpath(fi); 441 fpath = srcpath(fi);
442 len = strlen(fpath); 442 len = strlen(fpath);
443 if (fpath[len - 1] != suffix && fpath[len - 1] != upper_suffix) 443 if (fpath[len - 1] != suffix && fpath[len - 1] != upper_suffix)
444 continue; 444 continue;
445 if (*fpath != '/') { 
446 /* "$S/" */ 
447 if (fi->fi_prefix != NULL) 
448 len += strlen(prefix_prologue(fi->fi_prefix)) + 
449 strlen(fi->fi_prefix) + 1; 
450 else 
451 len += strlen(filetype_prologue(&fi->fi_fit)); 
452 } 
453 if (*fi->fi_path == '/') { 445 if (*fi->fi_path == '/') {
454 fprintf(fp, "\t%s \\\n", fpath); 446 fprintf(fp, "\t%s \\\n", fpath);
455 } else { 447 } else {
456 if (fi->fi_prefix != NULL) { 448 if (fi->fi_prefix != NULL) {
457 fprintf(fp, "\t%s%s/%s \\\n", 449 fprintf(fp, "\t%s%s/%s \\\n",
458 prefix_prologue(fi->fi_prefix), 450 prefix_prologue(fi->fi_prefix),
459 fi->fi_prefix, fpath); 451 fi->fi_prefix, fpath);
460 } else { 452 } else {
461 fprintf(fp, "\t%s%s \\\n", 453 fprintf(fp, "\t%s%s \\\n",
462 filetype_prologue(&fi->fi_fit), 454 filetype_prologue(&fi->fi_fit),
463 fpath); 455 fpath);
464 } 456 }
465 } 457 }