From 08d55b7bf293b48fe9324a50dcb4eecc67e027f3 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 1 May 2007 15:59:39 +0000 Subject: [PATCH] STR #1644: documenting return values for loading and saving text from the Fl_Text_Buffer. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5790 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 +- documentation/Fl_Text_Buffer.html | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 76043c479..166db5da2 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,7 @@ CHANGES IN FLTK 1.1.8 - Documentation fixes (STR #1454, STR #1455, STR #1456, STR #1457, STR #1458, STR #1460, STR #1481, STR #1578, - STR #1639, STR #1645) + STR #1639, STR #1645, STR #1644) - Fixed Makefile "make clean" (STR #1642, STR #1643) - The sample RPM spec file now enables large file support and threading support (STR #1603) diff --git a/documentation/Fl_Text_Buffer.html b/documentation/Fl_Text_Buffer.html index 6bbc68099..2b9712004 100644 --- a/documentation/Fl_Text_Buffer.html +++ b/documentation/Fl_Text_Buffer.html @@ -142,7 +142,10 @@ typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted,

int appendfile(const char *file, int buflen = 128*1024);

-

Appends the named file to the end of the buffer. +

Appends the named file to the end of the buffer. Returns 0 on +success, non-zero on error (strerror() contains reason). 1 indicates +open for read failed (no data loaded). 2 indicates error occurred +while reading data (data was partially loaded).

void call_modify_callbacks();

@@ -239,7 +242,10 @@ int* charsInserted, int* charsDeleted);

int insertfile(const char *file, int pos, int buflen = 128*1024);

-

Inserts a file at the specified position. +

Inserts a file at the specified position. Returns 0 on success, +non-zero on error (strerror() contains reason). 1 indicates open +for read failed (no data loaded). 2 indicates error occurred +while reading data (data was partially loaded).

void insert(int pos, const char* text);

@@ -265,7 +271,10 @@ using the free() function.

int loadfile(const char *file, int buflen = 128*1024);

-

Replaces the current buffer with the contents of a file. +

Replaces the current buffer with the contents of a file. Returns 0 +on success, non-zero on error (strerror() contains reason). 1 indicates +open for read failed (no data loaded). 2 indicates error occurred +while reading data (data was partially loaded).

char null_substitution_character();

@@ -273,7 +282,10 @@ using the free() function.

int outputfile(const char *file, int start, int end, int buflen = 128*1024);

-

Writes the specified portions of the file to a file. +

Writes the specified portions of the file to a file. Returns 0 on success, non-zero +on error (strerror() contains reason). 1 indicates open for write failed +(no data saved). 2 indicates error occurred while writing data +(data was partially saved).

void overlay_rectangular(int startPos, int rectStart, int rectEnd, const char* text, int* charsInserted, int* charsDeleted);

@@ -327,7 +339,10 @@ const char* text);

int savefile(const char *file, int buflen = 128*1024);

-

Saves the entire buffer to a file. +

Saves the entire buffer to a file. Returns 0 on success, non-zero +on error (strerror() contains reason). 1 indicates open for write failed +(no data saved). 2 indicates error occurred while writing data +(data was partially saved).

int search_backward(int startPos, const char* searchString, int* foundPos, int matchCase = 0);