scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit b4da40396c2e3ff08eb19e52055cf220a4dfdcdb
parent c5655a0a401ede745de6547c5f1db733612205ce
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 22 Feb 2018 20:20:33 +0000

[ar] Fix update

Diffstat:
Mar/main.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ar/main.c b/ar/main.c @@ -232,8 +232,10 @@ static void insert(int argc, char *argv[]) { for (; argc-- > 0; ++argv) { - archive(*argv, tmps[INDOT].fp, 'r'); - *argv = NULL; + if (*argv) { + archive(*argv, tmps[INDOT].fp, 'a'); + *argv = NULL; + } } } @@ -244,8 +246,6 @@ update(struct member *m, int argc, char *argv[]) FILE *fp = tmps[BEFORE].fp; if (inlist(m->fname, argc, argv)) { - if (vflag) - printf("r - %s\n", m->fname); archive(m->fname, tmps[m->cur].fp, 'r'); return; } else if (posname && !strcmp(posname, m->fname)) {