]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cgi-bin/makedocset.c
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / cgi-bin / makedocset.c
index 807c1f60f7373d9a811eecc7425664a3f6182d92..97e130fc67f4b6498000cc23ef9d22ca07243e96 100644 (file)
@@ -1,37 +1,25 @@
 /*
- * "$Id$"
+ * Xcode documentation set generator.
  *
- *   Xcode documentation set generator.
+ * Copyright 2007-2012 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products.
  *
- *   Copyright 2007-2009 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products.
- *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Usage:
  *
  *   makedocset directory *.tokens
- *
- * Contents:
- *
- *   main()                   - Test the help index code.
- *   compare_html()           - Compare the titles of two HTML files.
- *   compare_sections()       - Compare the names of two help sections.
- *   compare_sections_files() - Compare the number of files and section names.
- *   write_index()            - Write an index file for the CUPS help.
- *   write_info()             - Write the Info.plist file.
- *   write_nodes()            - Write the Nodes.xml file.
  */
 
 /*
  * Include necessary headers...
  */
 
-#include "cgi.h"
+#include "cgi-private.h"
 #include <errno.h>
 
 
@@ -171,7 +159,7 @@ static int                          /* O - Result of comparison */
 compare_html(_cups_html_t *a,          /* I - First file */
              _cups_html_t *b)          /* I - Second file */
 {
-  return (strcasecmp(a->title, b->title));
+  return (_cups_strcasecmp(a->title, b->title));
 }
 
 
@@ -183,7 +171,7 @@ static int                          /* O - Result of comparison */
 compare_sections(_cups_section_t *a,   /* I - First section */
                  _cups_section_t *b)   /* I - Second section */
 {
-  return (strcasecmp(a->name, b->name));
+  return (_cups_strcasecmp(a->name, b->name));
 }
 
 
@@ -201,7 +189,7 @@ compare_sections_files(
   if (ret)
     return (ret);
   else
-    return (strcasecmp(a->name, b->name));
+    return (_cups_strcasecmp(a->name, b->name));
 }
 
 
@@ -317,10 +305,10 @@ write_index(const char   *path,           /* I - File to write */
                   "<head>\n"
                   "<title>CUPS Documentation</title>\n"
                   "<link rel='stylesheet' type='text/css' "
-                  "src='cups-printable.css'>\n"
+                  "href='cups-printable.css'>\n"
                   "</head>\n"
                   "<body>\n"
-                  "<h1>CUPS Documentation</h1>\n"
+                  "<h1 class='title'>CUPS Documentation</h1>\n"
                   "<table width='100%' summary=''>\n"
                   "<tr>\n");
 
@@ -357,7 +345,7 @@ write_index(const char   *path,             /* I - File to write */
 
 static void
 write_info(const char *path,           /* I - File to write */
-           const char *revision)       /* I - Version number */
+           const char *revision)       /* I - Subversion revision number */
 {
   cups_file_t  *fp;                    /* File */
 
@@ -379,14 +367,22 @@ write_info(const char *path,              /* I - File to write */
                     "\t<key>CFBundleName</key>\n"
                     "\t<string>CUPS Documentation</string>\n"
                     "\t<key>CFBundleVersion</key>\n"
-                    "\t<string>1.4.%s</string>\n"
+                    "\t<string>%d.%d.%s</string>\n"
+                    "\t<key>CFBundleShortVersionString</key>\n"
+                    "\t<string>%d.%d.%d</string>\n"
                     "\t<key>DocSetFeedName</key>\n"
                     "\t<string>cups.org</string>\n"
                     "\t<key>DocSetFeedURL</key>\n"
-                    "\t<string>http://www.cups.org/org.cups.docset.xar"
+                    "\t<string>http://www.cups.org/org.cups.docset.atom"
                     "</string>\n"
+                    "\t<key>DocSetPublisherIdentifier</key>\n"
+                    "\t<string>org.cups</string>\n"
+                    "\t<key>DocSetPublisherName</key>\n"
+                    "\t<string>CUPS</string>\n"
                     "</dict>\n"
-                    "</plist>\n", revision);
+                    "</plist>\n",
+                    CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, revision,
+                    CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH);
 
   cupsFileClose(fp);
 }
@@ -434,7 +430,7 @@ write_nodes(const char   *path,             /* I - File to write */
         cupsFilePuts(fp, "<Subnodes>\n");
        subnodes = 1;
       }
-       
+
       cupsFilePrintf(fp, "<Node id=\"%d\">\n"
                          "<Path>Documentation/%s</Path>\n"
                         "<Anchor>%s</Anchor>\n"
@@ -471,8 +467,3 @@ write_nodes(const char   *path,             /* I - File to write */
 
   cupsFileClose(fp);
 }
-
-
-/*
- * End of "$Id$".
- */