/*check for interruption*/
if (g_interrupted)
{
- FPRINTF(stderr, T("\nInterrupted!\n\n"));
+ FPUTS(T("\nInterrupted!\n\n"), stderr);
return SIGINT;
}
if (ferror(source))
{
print_logo();
- FPRINTF(stderr, T("File read error has occurred!\n"));
+ FPUTS(T("File read error has occurred!\n"), stderr);
fclose(source);
return 0;
}
if (param->show_progress)
{
print_progress(file_size, bytes_processed);
- FPRINTF(stderr, T(" done\n"));
+ FPUTS(T(" done\n"), stderr);
fflush(stderr);
}
{
if (fwrite(result, sizeof(uint8_t), MHASH_384_LEN, stdout) != MHASH_384_LEN)
{
- FPRINTF(stderr, T("File write error has occurred!\n"));
+ FPUTS(T("File write error has occurred!\n"), stderr);
if (source != stdin)
{
fclose(source);
return 0;
case OPMODE_TEST:
#ifdef NO_SELFTEST
- FPRINTF(stderr, "Not compiled with self-test code!\n");
+ FPUTS("Not compiled with self-test code!\n", stderr);
return 1;
#else
return self_test();
#ifdef _WIN32
if (param.raw_output)
{
- fflush(stdout);
_setmode(_fileno(stdout), _O_BINARY);
}
#endif
{
print_logo();
FPRINTF(stderr, T("Built with %s v%u.%u.%u on %s [%s]\n\n"), T(COMPILER_TYPE), COMPILER_VERS_MAJOR, COMPILER_VERS_MINOR, COMPILER_VERS_PATCH, T(SYSTEM_TYPE), T(COMPILER_ARCH));
- FPRINTF(stderr, T("Usage:\n"));
- FPRINTF(stderr, T(" mhash384") T(EXE_SUFFIX) T(" [options] [input_file]...\n\n"));
- FPRINTF(stderr, T("Options:\n"));
- FPRINTF(stderr, T(" -p, --progress show progress while processing\n"));
- FPRINTF(stderr, T(" -u, --upper print digest in upper case letters\n"));
- FPRINTF(stderr, T(" -c, --curly print digest using C-style curly brackets\n"));
- FPRINTF(stderr, T(" -r, --raw output \"raw\" bytes (no \"hex\" encoding)\n"));
- FPRINTF(stderr, T(" -b, --bench compute and print throughput\n"));
- FPRINTF(stderr, T(" -v, --version print the version string and exit\n"));
- FPRINTF(stderr, T(" -t, --test execute self-test and exit\n"));
- FPRINTF(stderr, T(" -h, --help print this help screen and exit\n\n"));
- FPRINTF(stderr, T("If no input file is specified, input will be read from STDIN.\n\n"));
+ FPUTS(T("Usage:\n"), stderr);
+ FPRINTF(stderr, T(" mhash384%s [options] [input_file]...\n\n"), T(EXE_SUFFIX));
+ FPUTS(T("Options:\n"), stderr);
+ FPUTS(T(" -p, --progress show progress while processing\n"), stderr);
+ FPUTS(T(" -u, --upper print digest in upper case letters\n"), stderr);
+ FPUTS(T(" -c, --curly print digest using C-style curly brackets\n"), stderr);
+ FPUTS(T(" -r, --raw output \"raw\" bytes (no \"hex\" encoding)\n"), stderr);
+ FPUTS(T(" -b, --bench compute and print throughput\n"), stderr);
+ FPUTS(T(" -v, --version print the version string and exit\n"), stderr);
+ FPUTS(T(" -t, --test execute self-test and exit\n"), stderr);
+ FPUTS(T(" -h, --help print this help screen and exit\n\n"), stderr);
+ FPUTS(T("If no input file is specified, input will be read from STDIN.\n\n"), stderr);
}
/*Check specific option*/