diff --git a/src/cmd.cpp b/src/cmd.cpp index 0eb9db4..1823b8d 100644 --- a/src/cmd.cpp +++ b/src/cmd.cpp @@ -233,7 +233,7 @@ static constexpr size_t strlen_pre_eq(const char* str){ #define CHECK_VALID_LONG_ARG(opt, off, arg, type) \ { \ if(arg[off] != '=' || !is_##type(arg+off+1)){ \ - fprintf(stderr, L"'--%.*s' requires an argument of type " #type "\n", off, opt); \ + fprintf(stderr, "'--%.*s' requires an argument of type " #type "\n", off, opt); \ ret.error = 1; \ break; \ } \ @@ -244,7 +244,7 @@ static constexpr size_t strlen_pre_eq(const char* str){ #define CHECK_VALID_SHORT_ARG(opt, arg, type) \ { \ if(next_arg == argc || !is_##type(arg)){ \ - fprintf(stderr, L"'-%s' requires an argument of type " #type "\n", opt); \ + fprintf(stderr, "'-%s' requires an argument of type " #type "\n", opt); \ ret.error = 1; \ break; \ } \ @@ -354,7 +354,7 @@ cmd_args process_cmd_args(int argc, char** argv){ default: //keep parsing after error so we can still properly output requested color style ret.error = 1; - fprintf(stderr, L"Unrecognized option '-%c'\n", argv[i][j]); + fprintf(stderr, "Unrecognized option '-%c'\n", argv[i][j]); }; } i = next_arg-1; @@ -407,7 +407,7 @@ cmd_args process_cmd_args(int argc, char** argv){ ; }else{ ret.error = 1; - fprintf(stderr, L"Unrecognized option '%s'\n", argv[i]); + fprintf(stderr, "Unrecognized option '%s'\n", argv[i]); } }else{ ret.filenames.push_back(argv[i]); diff --git a/src/roflcat.cpp b/src/roflcat.cpp index 4072a32..e1bbe1e 100644 --- a/src/roflcat.cpp +++ b/src/roflcat.cpp @@ -50,7 +50,7 @@ static constexpr size_t constexpr_strlen(const char* str){ static int detect_term_colors(void){ int term_colors = 16; if(setupterm(NULL, fileno(stdout), NULL) == ERR){ - fprintf(stderr, L"could not set up term\n"); + fprintf(stderr, "could not set up term\n"); }else{ term_colors = tigetnum("colors"); if(term_colors < 0){ @@ -154,7 +154,7 @@ int print_normal_files(const cmd_args& args){ FILE* fp = fopen(args.filenames[i], "r"); if(!fp){ fflush(stdout); //force color update before error - fprintf(stderr, L"Unable to open file %s\n", args.filenames[i]); + fprintf(stderr, "Unable to open file %s\n", args.filenames[i]); ret = 2; continue; } @@ -242,7 +242,7 @@ int main(int argc, char** argv){ int avail_colors = detect_term_colors(); if(args.error){ - fprintf(stderr, L"Try '%s --help' for more information.\n", argv[0]); + fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]); return 1; }