OSDN Git Service

Redefine paragraph_key with project global scope.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Sun, 2 Sep 2012 20:39:58 +0000 (21:39 +0100)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Sun, 2 Sep 2012 20:39:58 +0000 (21:39 +0100)
ChangeLog
src/pkgkeys.c
src/pkgkeys.h
src/pkgshow.cpp

index 38ace31..06868b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2012-09-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
+       Redefine paragraph_key with project global scope.
+
+       * src/pkgkeys.h (paragraph_key): Declare it.
+       * src/pkgkeys.c (paragraph_key): Define it.
+
+       * src/pkgshow.cpp (pkgDirectoryViewer::EmitDescription): Delete
+       function local definition; use global definition instead.
+
+2012-09-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
        Correct defect introduced by 2012-08-03 commit.
 
        * src/approot.c (AppPathNameW): Add omitted 'else', so that tail
index 45029b5..9a35a29 100644 (file)
@@ -51,6 +51,7 @@ const char *name_key              =   "name";
 const char *package_key            =   "package";
 const char *package_collection_key  =  "package-collection";
 const char *package_list_key       =   "package-list";
+const char *paragraph_key          =   "paragraph";
 const char *pathname_key           =   "path";
 const char *profile_key            =   "profile";
 const char *reference_key          =   "references";
index d7fca4f..09738e4 100644 (file)
@@ -62,6 +62,7 @@ EXTERN_C_DECL const char *name_key;
 EXTERN_C_DECL const char *package_key;
 EXTERN_C_DECL const char *package_collection_key;
 EXTERN_C_DECL const char *package_list_key;
+EXTERN_C_DECL const char *paragraph_key;
 EXTERN_C_DECL const char *pathname_key;
 EXTERN_C_DECL const char *profile_key;
 EXTERN_C_DECL const char *reference_key;
index 022dacf..9c5c28f 100644 (file)
@@ -733,12 +733,6 @@ void pkgDirectoryViewer::EmitDescription( pkgXmlNode *pkg, const char *title )
    */
   int offset = 0;
 
-  /* This XML element and attribute identification key should
-   * perhaps be defined in the pkgkeys.h header; once more, for
-   * the time being we simply define it locally.
-   */
-  const char *paragraph_key = "paragraph";
-
   /* The procedure is recursive, selecting description elements
    * from inner levels of the XML document, progressing outward to
    * the document root, then printing them in outer to inner order;