projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Work on docs
[pspp]
/
src
/
libpspp
/
str.c
diff --git
a/src/libpspp/str.c
b/src/libpspp/str.c
index 99602fba681e699146f2ddb4922b2e90ac1caadc..86e7fd9199a5b9e22fba9fa2ac2eec4e9e7ff1c7 100644
(file)
--- a/
src/libpspp/str.c
+++ b/
src/libpspp/str.c
@@
-425,6
+425,15
@@
ss_dealloc (struct substring *ss)
free (ss->string);
}
free (ss->string);
}
+/* Exchanges the contents of A and B. */
+void
+ss_swap (struct substring *a, struct substring *b)
+{
+ struct substring tmp = *a;
+ *a = *b;
+ *b = tmp;
+}
+
/* Truncates SS to at most CNT bytes in length. */
void
ss_truncate (struct substring *ss, size_t cnt)
/* Truncates SS to at most CNT bytes in length. */
void
ss_truncate (struct substring *ss, size_t cnt)