From e9625c5bc6c046a7fbd90149ee48ecfd7e1c8564 Mon Sep 17 00:00:00 2001
From: Steve Holme <steve_holme@hotmail.com>
Date: Tue, 31 Dec 2013 15:45:15 +0000
Subject: [PATCH] examples: Rename before adding additional email examples

---
 docs/examples/Makefile.inc                  | 4 ++--
 docs/examples/{imap.c => imap-fetch.c}      | 0
 docs/examples/{simplesmtp.c => smtp-send.c} | 7 +++++++
 docs/examples/smtp-tls.c                    | 4 ++--
 4 files changed, 11 insertions(+), 4 deletions(-)
 rename docs/examples/{imap.c => imap-fetch.c} (100%)
 rename docs/examples/{simplesmtp.c => smtp-send.c} (95%)

diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc
index 11b508c260..69f2994ecf 100644
--- a/docs/examples/Makefile.inc
+++ b/docs/examples/Makefile.inc
@@ -4,8 +4,8 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
   https multi-app multi-debugcallback multi-double multi-post multi-single \
   persistant post-callback postit2 sepheaders simple simplepost simplessl  \
   sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
-  smtp-multi simplesmtp smtp-tls smtp-vrfy smtp-expn rtsp externalsocket \
-  resolve progressfunc pop3s pop3slist imap url2file sftpget ftpsget \
+  smtp-multi smtp-send smtp-tls smtp-vrfy smtp-expn rtsp externalsocket \
+  resolve progressfunc pop3s pop3slist imap-fetch url2file sftpget ftpsget \
   postinmemory
 
 # These examples require external dependencies that may not be commonly
diff --git a/docs/examples/imap.c b/docs/examples/imap-fetch.c
similarity index 100%
rename from docs/examples/imap.c
rename to docs/examples/imap-fetch.c
diff --git a/docs/examples/simplesmtp.c b/docs/examples/smtp-send.c
similarity index 95%
rename from docs/examples/simplesmtp.c
rename to docs/examples/smtp-send.c
index b10fdc003e..f343238d4d 100644
--- a/docs/examples/simplesmtp.c
+++ b/docs/examples/smtp-send.c
@@ -23,6 +23,11 @@
 #include <string.h>
 #include <curl/curl.h>
 
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. For an exmaple of using the multi interface please see
+ * smtp-multi.c.
+ */
+
 int main(void)
 {
   CURL *curl;
@@ -66,6 +71,7 @@ int main(void)
 
     /* send the message (including headers) */
     res = curl_easy_perform(curl);
+
     /* Check for errors */
     if(res != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
@@ -84,5 +90,6 @@ int main(void)
      */
     curl_easy_cleanup(curl);
   }
+
   return 0;
 }
diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c
index 0356500ef4..072d6b0f53 100644
--- a/docs/examples/smtp-tls.c
+++ b/docs/examples/smtp-tls.c
@@ -24,7 +24,7 @@
 #include <curl/curl.h>
 
 /* This is a simple example showing how to send mail using libcurl's SMTP
- * capabilities. It builds on the simplesmtp.c example, adding some
+ * capabilities. It builds on the smtp-send.c example, adding some
  * authentication and transport security.
  */
 
@@ -71,7 +71,6 @@ static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
   return 0;
 }
 
-
 int main(void)
 {
   CURL *curl;
@@ -150,5 +149,6 @@ int main(void)
     curl_slist_free_all(recipients);
     curl_easy_cleanup(curl);
   }
+
   return 0;
 }
-- 
GitLab