From fd283b2a8ad28f25054c86fa8cadba4f1b982a12 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: Fri, 4 Apr 2025 11:45:54 +0900
Subject: [PATCH 4/4] Quote file names in developer tool messages

Add missing quotes around file names in some messages in developer tools.
---
 src/interfaces/ecpg/test/pg_regress_ecpg.c | 10 +++++-----
 src/tools/pg_bsd_indent/args.c             |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/interfaces/ecpg/test/pg_regress_ecpg.c b/src/interfaces/ecpg/test/pg_regress_ecpg.c
index ba3477f9dd8..88ccb58433d 100644
--- a/src/interfaces/ecpg/test/pg_regress_ecpg.c
+++ b/src/interfaces/ecpg/test/pg_regress_ecpg.c
@@ -40,13 +40,13 @@ ecpg_filter_source(const char *sourcefile, const char *outfile)
 	s = fopen(sourcefile, "r");
 	if (!s)
 	{
-		fprintf(stderr, "Could not open file %s for reading\n", sourcefile);
+		fprintf(stderr, "Could not open file \"%s\" for reading\n", sourcefile);
 		exit(2);
 	}
 	t = fopen(outfile, "w");
 	if (!t)
 	{
-		fprintf(stderr, "Could not open file %s for writing\n", outfile);
+		fprintf(stderr, "Could not open file \"%s\” for writing\n", outfile);
 		exit(2);
 	}
 
@@ -99,13 +99,13 @@ ecpg_filter_stderr(const char *resultfile, const char *tmpfile)
 	s = fopen(resultfile, "r");
 	if (!s)
 	{
-		fprintf(stderr, "Could not open file %s for reading\n", resultfile);
+		fprintf(stderr, "Could not open file \"%s\" for reading\n", resultfile);
 		exit(2);
 	}
 	t = fopen(tmpfile, "w");
 	if (!t)
 	{
-		fprintf(stderr, "Could not open file %s for writing\n", tmpfile);
+		fprintf(stderr, "Could not open file \"%s\" for writing\n", tmpfile);
 		exit(2);
 	}
 
@@ -133,7 +133,7 @@ ecpg_filter_stderr(const char *resultfile, const char *tmpfile)
 	fclose(t);
 	if (rename(tmpfile, resultfile) != 0)
 	{
-		fprintf(stderr, "Could not overwrite file %s with %s\n",
+		fprintf(stderr, "Could not overwrite file \"%s\" with \"%s\"\n",
 				resultfile, tmpfile);
 		exit(2);
 	}
diff --git a/src/tools/pg_bsd_indent/args.c b/src/tools/pg_bsd_indent/args.c
index 5fa7e6b038c..c76cfd7b686 100644
--- a/src/tools/pg_bsd_indent/args.c
+++ b/src/tools/pg_bsd_indent/args.c
@@ -338,7 +338,7 @@ add_typedefs_from_file(const char *str)
     char line[BUFSIZ];
 
     if ((file = fopen(str, "r")) == NULL) {
-	fprintf(stderr, "indent: cannot open file %s\n", str);
+	fprintf(stderr, "indent: cannot open file \"%s\"\n", str);
 	exit(1);
     }
     while ((fgets(line, BUFSIZ, file)) != NULL) {
-- 
2.43.5

