Print program version on stdout

All the other information is still printed on stderr. The idea to print
them on separate streams was to make it easier from wrappers to get the
version discarding all the other information, however this was never the
case until now.
This commit is contained in:
wiire-a 2017-11-15 13:09:25 +01:00
parent c47b51baf0
commit 4109810199

View File

@ -351,10 +351,12 @@ memory_err:
r_time = t_current.tv_sec;
ts = *gmtime(&r_time);
strftime(buffer, 30, "%c", &ts);
fprintf(stderr, "\n Pixiewps %s\n\n"
fprintf(stderr, "\n ");
printf("Pixiewps %s", LONG_VERSION); fflush(stdout);
fprintf(stderr, "\n\n"
" [*] System time: %lu (%s UTC)\n"
" [*] Number of cores available: %u\n\n",
LONG_VERSION, (unsigned long) t_current.tv_sec, buffer, cores == 0 ? 1 : cores);
(unsigned long) t_current.tv_sec, buffer, cores == 0 ? 1 : cores);
free(wps->error);
free(wps);
return ARG_ERROR;