mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-06 16:56:40 +08:00
Use perror for error report
This commit is contained in:
parent
1c89a2f8ff
commit
07af96b3a7
@ -40,6 +40,7 @@
|
||||
#include <cstdlib>
|
||||
#include <getopt.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION "Unknown"
|
||||
@ -135,7 +136,7 @@ int main(int argc, char ** argv)
|
||||
f = fopen(filename, "r");
|
||||
if (f == NULL)
|
||||
{
|
||||
fprintf(stderr, "Cannot open file '%s'\n", filename);
|
||||
perror(filename);
|
||||
error_seen = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user