Browse Source

- standardize fopen error message a bit

Bernhard Reutner-Fischer 15 years ago
parent
commit
35e4e865b5

+ 1 - 1
extra/locale/gen_collate.c

@@ -1253,7 +1253,7 @@ static int old_main(int argc, char **argv)
 		FILE *fp = fopen("locale_collate.h", "w");
 
 		if (!fp) {
-			error_msg("couldn't open output file!");
+			error_msg("cannot open output file!");
 		}
 		dump_collate(fp);
 		if (ferror(fp) || fclose(fp)) {

+ 1 - 1
extra/locale/gen_ldc.c

@@ -162,7 +162,7 @@ int main(int argc, char **argv)
 	if (argc == 2)
 		output_file = argv[1];
 	if (!(lso = fopen(output_file, "w"))) {
-		printf("can't open output file '%s'!\n", output_file);
+		printf("cannot open output file '%s'!\n", output_file);
 		return EXIT_FAILURE;
 	}
 

+ 1 - 1
extra/locale/gen_locale.c

@@ -584,7 +584,7 @@ int main(int argc, char **argv)
 	if (argc == 3)
 		output_file = *++argv;
 	if (output_file == NULL || !(ofp = fopen(output_file, "w"))) {
-		printf("error: can not open outputfile '%s' for writing!\n",
+		printf("cannot open output file '%s'!\n",
 			output_file);
 		return EXIT_FAILURE;
 	}

+ 1 - 1
extra/locale/gen_mmap.c

@@ -127,7 +127,7 @@ int main(void)
 	unsigned char *p;
 
 	if (!(fp = fopen("locale.mmap", "w"))) {
-		printf("error - can't open locale.mmap for writing!");
+		printf("cannot open locale.mmap for writing!");
 		return EXIT_FAILURE;
 	}
 

+ 2 - 2
extra/locale/gen_wc8bit.c

@@ -103,7 +103,7 @@ int main(int argc, char **argv)
 	}
 
 	if (!(out = fopen("c8tables.h","w"))) {
-		printf("error: couldn't open file \"c8tables.h\"\n");
+		printf("cannot open output file 'c8tables.h'!\n");
 		return EXIT_FAILURE;
 	}
 
@@ -173,7 +173,7 @@ int main(int argc, char **argv)
 	codeset_index[0] = 0;
 	while (--argc) {
 		if (!(fp = fopen(*++argv,"r"))) {
-			printf("error: couldn't open file \"%s\"\n", *argv);
+			printf("cannot open file \"%s\"\n", *argv);
 			return EXIT_FAILURE;
 		}
 		printf("processing %s... ", *argv);

+ 1 - 1
extra/locale/gen_wctype.c

@@ -740,7 +740,7 @@ int main(int argc, char **argv)
 		FILE *fp;
 
 		if (!(fp = fopen("wctables.h", "w"))) {
-			printf("couldn't open wctables.h!\n");
+			printf("cannot open output file 'wctables.h'!\n");
 			return EXIT_FAILURE;
 		}
 

+ 3 - 3
extra/locale/lmmtolso.c

@@ -14,18 +14,18 @@ int main(void)
 	size_t i;
 
 	if (!(lmm = fopen("locale.mmap", "r"))) {
-		printf("can't open locale.mmap!\n");
+		printf("cannot open locale.mmap!\n");
 		return EXIT_FAILURE;
 	}
 
 	if (fstat(fileno(lmm), &fd_stat)) {
-		printf("can't stat locale.mmap!\n");
+		printf("cannot stat locale.mmap!\n");
 		fclose(lmm);
 		return EXIT_FAILURE;
 	}
 
 	if (!(lso = fopen("locale_data.c", "w"))) {
-		printf("can't open locale_data.c!\n");
+		printf("cannot open locale_data.c!\n");
 		fclose(lmm);
 		return EXIT_FAILURE;
 	}