libtiff: Merge branch 'manpage_506_TIFFClose_check_with_TIFFFlush' into 'master'

From 85a286648d2b726369dbca090dcc7540e70bbc10 Mon Sep 17 00:00:00 2001
From: Su_Laus <[EMAIL REDACTED]>
Date: Thu, 16 Nov 2023 20:54:00 +0100
Subject: [PATCH] manpage: Note on using TIFFFlush() before TIFFClose() to
 check that the data has been successfully written to the file.

Closes #506
 doc/functions/TIFFClose.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/functions/TIFFClose.rst b/doc/functions/TIFFClose.rst
index cc9f8886..3056e06c 100644
--- a/doc/functions/TIFFClose.rst
+++ b/doc/functions/TIFFClose.rst
@@ -27,6 +27,15 @@ the associated function to close the file handle.
 The given structure will be completely freed, so you should save opened file
 handle and pointer to the close procedure in external variables before
 calling :c:func:`TIFFCleanup`, if you will need these ones to close the file.
+:c:func:`TIFFCleanup` calls :c:func:`TIFFFlush`, which stores all pending data
+in the file.
+.. note::
+    Both functions have no return value. 
+    If you want to check whether the data has been successfully written
+    to the file, you can call :c:func:`TIFFFlush`, which has a return value,
+    before :c:func:`TIFFClose`.