diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-09-07 10:43:21 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-09-07 10:43:21 +0300 |
commit | f0d8b816af00186c108f6cdc538ec18d8b4dddba (patch) | |
tree | a009a02bfefb30ab68471ed482cfe6ae9e301aab | |
parent | 4cf259c113a5a47a4a46a6875ac08fd09b0bca09 (diff) | |
download | egawk-f0d8b816af00186c108f6cdc538ec18d8b4dddba.tar.gz egawk-f0d8b816af00186c108f6cdc538ec18d8b4dddba.tar.bz2 egawk-f0d8b816af00186c108f6cdc538ec18d8b4dddba.zip |
Remove \n from calls to lintwarn, warning, and fatal.
-rwxr-xr-x | ChangeLog | 6 | ||||
-rw-r--r-- | awkgram.y | 2 | ||||
-rw-r--r-- | debug.c | 2 | ||||
-rw-r--r-- | ext.c | 8 | ||||
-rw-r--r-- | gawkapi.c | 4 | ||||
-rw-r--r-- | gawkapi.h | 10 | ||||
-rw-r--r-- | io.c | 6 |
7 files changed, 22 insertions, 16 deletions
@@ -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. @@ -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; } @@ -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 @@ -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); } @@ -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)); } } @@ -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++; \ } \ } \ @@ -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); |