]> granicus.if.org Git - curl/commitdiff
alphabetically sort the list of supported protocols
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Jan 2010 13:06:50 +0000 (13:06 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 22 Jan 2010 13:06:50 +0000 (13:06 +0000)
lib/version.c

index 2b9ebf8938c7ed70a2589179e9c6067272ff8fe8..03131e9885fe865a4d64cd3141bcb8749a8e83a7 100644 (file)
@@ -116,70 +116,69 @@ char *curl_version(void)
   return version;
 }
 
-/* data for curl_version_info */
+/* data for curl_version_info
+
+   Keep the list sorted alphabetically. It is also written so that each
+   protocol line has its own #if line to make things easier on the eye.
+ */
 
 static const char * const protocols[] = {
-#ifndef CURL_DISABLE_TFTP
-  "tftp",
-#endif
-#ifndef CURL_DISABLE_FTP
-  "ftp",
-#endif
-#ifndef CURL_DISABLE_TELNET
-  "telnet",
-#endif
 #ifndef CURL_DISABLE_DICT
   "dict",
 #endif
-#ifndef CURL_DISABLE_LDAP
-  "ldap",
-#ifdef HAVE_LDAP_SSL
-  "ldaps",
-#endif
-#endif
-#ifndef CURL_DISABLE_HTTP
-  "http",
-#endif
 #ifndef CURL_DISABLE_FILE
   "file",
 #endif
-#ifndef CURL_DISABLE_RTSP
-  "rtsp",
-#endif
-
-#ifdef USE_SSL
-#ifndef CURL_DISABLE_HTTP
-  "https",
-#endif
 #ifndef CURL_DISABLE_FTP
+  "ftp",
+#endif
+#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)
   "ftps",
 #endif
+#ifndef CURL_DISABLE_HTTP
+  "http",
 #endif
-
-#ifdef USE_LIBSSH2
-  "scp",
-  "sftp",
+#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)
+  "https",
 #endif
-
 #ifndef CURL_DISABLE_IMAP
   "imap",
-#ifdef USE_SSL
+#endif
+#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)
   "imaps",
 #endif
+#ifndef CURL_DISABLE_LDAP
+  "ldap",
+#endif
+#if defined(HAVE_LDAP_SSL) && !defined(CURL_DISABLE_LDAP)
+  "ldaps",
 #endif
-
 #ifndef CURL_DISABLE_POP3
   "pop3",
-#ifdef USE_SSL
+#endif
+#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)
   "pop3s",
 #endif
+#ifndef CURL_DISABLE_RTSP
+  "rtsp",
+#endif
+#ifdef USE_LIBSSH2
+  "scp",
+#endif
+#ifdef USE_LIBSSH2
+  "sftp",
 #endif
-
 #ifndef CURL_DISABLE_SMTP
   "smtp",
-#ifdef USE_SSL
+#endif
+#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)
   "smtps",
 #endif
+#ifndef CURL_DISABLE_TELNET
+  "telnet",
+#endif
+#ifndef CURL_DISABLE_TFTP
+  "tftp",
 #endif
 
   NULL