aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2024-07-21 18:33:01 -0400
committerSimon Tatham <anakin@pobox.com>2024-07-31 23:29:00 +0100
commita2f7f962ced158dbceebbfc0c3dfbbc58b119e55 (patch)
treeb7e532d5060639f8090e0557ea46cbbe7acfcf5a /puzzles.h
parent5de69c22b0ff037f648a740a7c01869e78587df2 (diff)
downloadpuzzles-a2f7f962ced158dbceebbfc0c3dfbbc58b119e55.zip
puzzles-a2f7f962ced158dbceebbfc0c3dfbbc58b119e55.tar.gz
puzzles-a2f7f962ced158dbceebbfc0c3dfbbc58b119e55.tar.bz2
puzzles-a2f7f962ced158dbceebbfc0c3dfbbc58b119e55.tar.xz
Rename memswap() to swap_regions(). Consolidate duplicate implementations.
C99 reserves the mem* namespace for future expansion. Some Rockbox targets had issues with memswap() conflicting with another definition, so fix that.
Diffstat (limited to 'puzzles.h')
-rw-r--r--puzzles.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/puzzles.h b/puzzles.h
index b560b78..2c52bc6 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -448,6 +448,12 @@ void copy_left_justified(char *buf, size_t sz, const char *str);
function is NULL. Dynamically allocated, to be freed by caller. */
char *button2label(int button);
+/* Swap two regions of memory. The two regions must not
+ * overlap. (Note: the natural name for this might be "memswap", but
+ * the mem* namespace is reserved for future expansion by the C99
+ * standard per clause 7.26.11.1.) */
+void swap_regions(void *av, void *bv, size_t size);
+
/*
* dsf.c
*/