aboutsummaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2025-11-23 20:05:59 -0700
committerRandy Palamar <randy@rnpnr.xyz>2025-11-24 05:25:54 -0700
commit5df02c199959b9da42baff0c876bf87125178ca0 (patch)
treea9f3be8b405006d3a92292bc1db3722c7279ec3e /text.h
parent1953c287ace801a6606abd6c3ead0ff345645bec (diff)
downloadvis-5df02c199959b9da42baff0c876bf87125178ca0.tar.gz
vis-5df02c199959b9da42baff0c876bf87125178ca0.tar.xz
text: remove a bunch of unused save functions
These functions were only used for testing the text system. One of them was moved to text-test.c to continue to facilitate this. Otherwise these functions are just cluttering up the code and making it hard to modify.
Diffstat (limited to 'text.h')
-rw-r--r--text.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/text.h b/text.h
index 08b1643..33666ff 100644
--- a/text.h
+++ b/text.h
@@ -94,7 +94,6 @@ enum TextLoadMethod {
* @endrst
*/
Text *text_load(const char *filename);
-Text *text_loadat(int dirfd, const char *filename);
/**
* Create a text instance populated with the given file content.
*
@@ -362,19 +361,9 @@ typedef struct {
#define text_save_default(...) (TextSave){.dirfd = AT_FDCWD, .fd = -1, __VA_ARGS__}
/**
- * Save the whole text to the given file name.
- *
- * @rst
- * .. note:: Equivalent to ``text_save_method(filename, TEXT_SAVE_AUTO)``.
- * @endrst
- */
-bool text_save(Text*, const char *filename);
-bool text_saveat(Text*, int dirfd, const char *filename);
-/**
- * Save the whole text to the given file name, using the specified method.
+ * Marks the current text revision as saved.
*/
-bool text_save_method(Text*, const char *filename, enum TextSaveMethod);
-bool text_saveat_method(Text*, int dirfd, const char *filename, enum TextSaveMethod);
+void text_mark_current_revision(Text*);
/**
* Setup a sequence of write operations.
@@ -412,11 +401,6 @@ bool text_save_commit(TextSave*);
*/
void text_save_cancel(TextSave*);
/**
- * Write whole text content to file descriptor.
- * @return The number of bytes written or ``-1`` in case of an error.
- */
-ssize_t text_write(const Text*, int fd);
-/**
* Write file range to file descriptor.
* @return The number of bytes written or ``-1`` in case of an error.
*/