summaryrefslogtreecommitdiff
path: root/src/pch.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-10-09 11:40:42 +0200
committerJim Meyering <meyering@redhat.com>2011-12-14 16:34:45 +0100
commit5cb38ce3903b5c33750cd52f983a8f68f945c7dd (patch)
tree8860b967c0cb2ee11834cbb5c01988c44f9e1141 /src/pch.h
parent5ca55b84143a840218bcdc78120b44b02d8ef561 (diff)
downloadpatch-5cb38ce3903b5c33750cd52f983a8f68f945c7dd.tar.gz
build: update to latest gnulib and adapt
Mark functions as pure of const, per recommendations enabled by new gcc -W options. Apply _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST. * src/common.h: Apply new function attributes. * src/pch.c: Likewise. * src/pch.h: Likewise. * src/util.c: Likewise. * src/util.h: Likewise. * configure.ac: Use -Wno-format-nonliteral. * m4/.gitignore: Update. * gnulib: Update to latest. * cfg.mk: Exempt src/util.c from two tests, to avoid new "make syntax-check" failures.
Diffstat (limited to 'src/pch.h')
-rw-r--r--src/pch.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/pch.h b/src/pch.h
index 6383d85..5e2498b 100644
--- a/src/pch.h
+++ b/src/pch.h
@@ -19,28 +19,28 @@
enum nametype { OLD, NEW, INDEX, NONE };
-lin pch_end (void);
-lin pch_first (void);
-lin pch_hunk_beg (void);
-char const *pch_c_function (void);
-char const * pch_timestr (bool which);
-mode_t pch_mode (bool which);
-lin pch_newfirst (void);
-lin pch_prefix_context (void);
-lin pch_ptrn_lines (void);
-lin pch_repl_lines (void);
-lin pch_suffix_context (void);
+lin pch_end (void) _GL_ATTRIBUTE_PURE;
+lin pch_first (void) _GL_ATTRIBUTE_PURE;
+lin pch_hunk_beg (void) _GL_ATTRIBUTE_PURE;
+char const *pch_c_function (void) _GL_ATTRIBUTE_PURE;
+char const * pch_timestr (bool which) _GL_ATTRIBUTE_PURE;
+mode_t pch_mode (bool which) _GL_ATTRIBUTE_PURE;
+lin pch_newfirst (void) _GL_ATTRIBUTE_PURE;
+lin pch_prefix_context (void) _GL_ATTRIBUTE_PURE;
+lin pch_ptrn_lines (void) _GL_ATTRIBUTE_PURE;
+lin pch_repl_lines (void) _GL_ATTRIBUTE_PURE;
+lin pch_suffix_context (void) _GL_ATTRIBUTE_PURE;
bool pch_swap (void);
bool pch_write_line (lin, FILE *);
bool there_is_another_patch (bool, mode_t *);
-char *pfetch (lin);
-char pch_char (lin);
+char *pfetch (lin) _GL_ATTRIBUTE_PURE;
+char pch_char (lin) _GL_ATTRIBUTE_PURE;
int another_hunk (enum diff, bool);
-int pch_says_nonexistent (bool);
-size_t pch_line_len (lin);
-const char *pch_name(enum nametype);
-bool pch_copy (void);
-bool pch_rename (void);
+int pch_says_nonexistent (bool) _GL_ATTRIBUTE_PURE;
+size_t pch_line_len (lin) _GL_ATTRIBUTE_PURE;
+const char *pch_name(enum nametype) _GL_ATTRIBUTE_PURE;
+bool pch_copy (void) _GL_ATTRIBUTE_PURE;
+bool pch_rename (void) _GL_ATTRIBUTE_PURE;
void do_ed_script (char const *, char const *, int *, FILE *);
void open_patch_file (char const *);
void re_patch (void);