main: add a trailing space at the end of the output if --cflags or --libs is requested (closes #40)

feature/tap-sh
William Pitcock 2012-09-05 07:03:37 -05:00
parent 7c13f22a9b
commit 150d91d07f
1 changed files with 6 additions and 5 deletions

11
main.c
View File

@ -883,7 +883,7 @@ main(int argc, char *argv[])
if (!pkg_queue_apply(pkgq_head, apply_cflags, maximum_traverse_depth, global_traverse_flags, &frag_list))
{
ret = EXIT_FAILURE;
goto out;
goto out_println;
}
}
@ -894,15 +894,16 @@ main(int argc, char *argv[])
if (!pkg_queue_apply(pkgq_head, apply_libs, maximum_traverse_depth, global_traverse_flags, &frag_list))
{
ret = EXIT_FAILURE;
goto out;
goto out_println;
}
}
if (want_flags & (PKG_CFLAGS|PKG_LIBS))
printf("\n");
pkg_queue_free(pkgq_head);
out_println:
if (want_flags & (PKG_CFLAGS|PKG_LIBS))
printf(" \n");
out:
pkg_tuple_free_global();
return ret;