aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-09-07 10:43:21 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-09-07 10:43:21 +0300
commitf0d8b816af00186c108f6cdc538ec18d8b4dddba (patch)
treea009a02bfefb30ab68471ed482cfe6ae9e301aab
parent4cf259c113a5a47a4a46a6875ac08fd09b0bca09 (diff)
downloadegawk-f0d8b816af00186c108f6cdc538ec18d8b4dddba.tar.gz
egawk-f0d8b816af00186c108f6cdc538ec18d8b4dddba.tar.bz2
egawk-f0d8b816af00186c108f6cdc538ec18d8b4dddba.zip
Remove \n from calls to lintwarn, warning, and fatal.
-rwxr-xr-xChangeLog6
-rw-r--r--awkgram.y2
-rw-r--r--debug.c2
-rw-r--r--ext.c8
-rw-r--r--gawkapi.c4
-rw-r--r--gawkapi.h10
-rw-r--r--io.c6
7 files changed, 22 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 630b5b6c..47c62fdc 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-09-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y, debug.c, ext.c, gawkapi.c, gawkapi.h,
+ io.c: Remove unneeded \n in calls to warning(), fatal(),
+ and lintwarn().
+
2018-08-24 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated w.r.t. GNULIB regex routines.
diff --git a/awkgram.y b/awkgram.y
index 995b8bda..13b2bb92 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -4263,7 +4263,7 @@ out:
if (SMART_ALECK && do_lint
&& ! goto_warned && strcasecmp(tokkey, "goto") == 0) {
goto_warned = true;
- lintwarn(_("`goto' considered harmful!\n"));
+ lintwarn(_("`goto' considered harmful!"));
}
return lasttok = NAME;
}
diff --git a/debug.c b/debug.c
index 2e68cde7..1ca93cc4 100644
--- a/debug.c
+++ b/debug.c
@@ -4782,7 +4782,7 @@ unserialize_list(int type)
field_cnt++;
if (field_cnt == MAX_FIELD)
#ifdef GAWKDEBUG
- fatal("Increase MAX_FIELD and recompile.\n");
+ fatal("Increase MAX_FIELD and recompile.");
#else
return;
#endif
diff --git a/ext.c b/ext.c
index 027df697..7ed045c5 100644
--- a/ext.c
+++ b/ext.c
@@ -57,23 +57,23 @@ load_ext(const char *lib_name)
fatal(_("load_ext: received NULL lib_name"));
if ((dl = dlopen(lib_name, flags)) == NULL)
- fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name,
+ fatal(_("load_ext: cannot open library `%s' (%s)"), lib_name,
dlerror());
/* Per the GNU Coding standards */
gpl_compat = (int *) dlsym(dl, "plugin_is_GPL_compatible");
if (gpl_compat == NULL)
- fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"),
+ fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)"),
lib_name, dlerror());
install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t))
dlsym(dl, INIT_FUNC);
if (install_func == NULL)
- fatal(_("load_ext: library `%s': cannot call function `%s' (%s)\n"),
+ fatal(_("load_ext: library `%s': cannot call function `%s' (%s)"),
lib_name, INIT_FUNC, dlerror());
if (install_func(& api_impl, NULL /* ext_id */) == 0)
- warning(_("load_ext: library `%s' initialization routine `%s' failed\n"),
+ warning(_("load_ext: library `%s' initialization routine `%s' failed"),
lib_name, INIT_FUNC);
}
diff --git a/gawkapi.c b/gawkapi.c
index 80d3ebca..7b1445c4 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -1204,12 +1204,12 @@ api_flatten_array_typed(awk_ext_id_t id,
/* Convert index and value to API types. */
if (! node_to_awk_value(index,
& (*data)->elements[j].index, index_type)) {
- fatal(_("api_flatten_array_typed: could not convert index %d to %s\n"),
+ fatal(_("api_flatten_array_typed: could not convert index %d to %s"),
(int) i, valtype2str(index_type));
}
if (! node_to_awk_value(value,
& (*data)->elements[j].value, value_type)) {
- fatal(_("api_flatten_array_typed: could not convert value %d to %s\n"),
+ fatal(_("api_flatten_array_typed: could not convert value %d to %s"),
(int) i, valtype2str(value_type));
}
}
diff --git a/gawkapi.h b/gawkapi.h
index bee9e9d0..478c43da 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -926,19 +926,19 @@ typedef struct gawk_api {
#define emalloc(pointer, type, size, message) \
do { \
if ((pointer = (type) gawk_malloc(size)) == 0) \
- fatal(ext_id, "%s: malloc of %d bytes failed\n", message, size); \
+ fatal(ext_id, "%s: malloc of %d bytes failed", message, size); \
} while(0)
#define ezalloc(pointer, type, size, message) \
do { \
if ((pointer = (type) gawk_calloc(1, size)) == 0) \
- fatal(ext_id, "%s: calloc of %d bytes failed\n", message, size); \
+ fatal(ext_id, "%s: calloc of %d bytes failed", message, size); \
} while(0)
#define erealloc(pointer, type, size, message) \
do { \
if ((pointer = (type) gawk_realloc(pointer, size)) == 0) \
- fatal(ext_id, "%s: realloc of %d bytes failed\n", message, size); \
+ fatal(ext_id, "%s: realloc of %d bytes failed", message, size); \
} while(0)
/* Constructor functions */
@@ -1124,7 +1124,7 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \
if (func_table[i].name == NULL) \
break; \
if (! add_ext_func(name_space, & func_table[i])) { \
- warning(ext_id, #extension ": could not add %s\n", \
+ warning(ext_id, #extension ": could not add %s", \
func_table[i].name); \
errors++; \
} \
@@ -1132,7 +1132,7 @@ int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id) \
\
if (init_func != NULL) { \
if (! init_func()) { \
- warning(ext_id, #extension ": initialization function failed\n"); \
+ warning(ext_id, #extension ": initialization function failed"); \
errors++; \
} \
} \
diff --git a/io.c b/io.c
index a3d68ce0..18c2adb9 100644
--- a/io.c
+++ b/io.c
@@ -2383,7 +2383,7 @@ use_pipes:
if (dup(save_stdout) != 1) {
close(save_stdin); close(save_stdout);
close(ptoc[1]); close(ctop[0]);
- fatal(_("restoring stdout in parent process failed\n"));
+ fatal(_("restoring stdout in parent process failed"));
}
close(save_stdout);
@@ -2391,7 +2391,7 @@ use_pipes:
if (dup(save_stdin) != 0) {
close(save_stdin);
close(ptoc[1]); close(ctop[0]);
- fatal(_("restoring stdin in parent process failed\n"));
+ fatal(_("restoring stdin in parent process failed"));
}
close(save_stdin);
@@ -2652,7 +2652,7 @@ gawk_popen(const char *cmd, struct redirect *rp)
close(1);
if (dup(save_stdout) != 1) {
close(p[0]);
- fatal(_("restoring stdout in parent process failed\n"));
+ fatal(_("restoring stdout in parent process failed"));
}
close(save_stdout);