changeset 83:866d074448f6

- Added more statics in dpi, const in pixmaps, and removed redundant includes.
author jcid
date Mon, 31 Dec 2007 22:29:20 +0100
parents ac9dd0d4c7b0
children 03f9a7877a2e
files ChangeLog dpi/bookmarks.c dpi/ftp.c
diffstat 3 files changed, 30 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Dec 28 17:47:33 2007 +0100
+++ b/ChangeLog	Mon Dec 31 22:29:20 2007 +0100
@@ -65,6 +65,7 @@
  - Added line numbers and enabled wrapping in the "View Source" window.
  - Added HTTP-1.1's chunked transfer support!
  - Made the stop button sensitive when loading an image.
+ - Added more statics in dpi, const in pixmaps, and removed redundant includes.
    Patches: place
 +- Fixed a problem with locally-installed dpis.
  - Added code for optional image loading (nice interface) very advanced!
--- a/dpi/bookmarks.c	Fri Dec 28 17:47:33 2007 +0100
+++ b/dpi/bookmarks.c	Mon Dec 31 22:29:20 2007 +0100
@@ -95,7 +95,7 @@
 
 /* -- HTML templates ------------------------------------------------------- */
 
-char *mainpage_header =
+static const char *mainpage_header =
 DOCTYPE
 "<html>\n"
 "<head>\n"
@@ -114,7 +114,7 @@
 "</table>\n"
 "<br>\n";
 
-char *modifypage_header =
+static const char *modifypage_header =
 DOCTYPE
 "<html>\n"
 "<head>\n"
@@ -150,7 +150,7 @@
 "  </table></td></tr>\n"
 "</table>\n";
 
-char *mainpage_sections_header =
+static const char *mainpage_sections_header =
 "<table border='1' cellpadding='0' cellspacing='20' width='100%'>\n"
 " <tr valign='top'>\n"
 "  <td>\n"
@@ -159,7 +159,7 @@
 "     <table width='100%' bgcolor='#b4b4b4'>\n"
 "      <tr><td><small>Sections:</small></td></tr></table></td></tr>\n";
 
-char *modifypage_sections_header =
+static const char *modifypage_sections_header =
 "<table border='1' cellpadding='0' cellspacing='20' width='100%'>\n"
 " <tr valign='top'>\n"
 "  <td>\n"
@@ -168,32 +168,32 @@
 "     <table width='100%' bgcolor='#b4b4b4'>\n"
 "      <tr><td><small>Sections:</small></td></tr></table></td></tr>\n";
 
-char *mainpage_sections_item =
+static const char *mainpage_sections_item =
 "    <tr><td align='center'>\n"
 "      <a href='#s%d'>%s</a></td></tr>\n";
 
-char *modifypage_sections_item =
+static const char *modifypage_sections_item =
 "    <tr><td>\n"
 "     <table width='100%%'>\n"
 "      <tr align='center'>"
 "       <td><input type='checkbox' name='s%d'></td>\n"
 "       <td width='100%%'><a href='#s%d'>%s</a></td></tr></table></td></tr>\n";
 
-char *mainpage_sections_footer =
+static const char *mainpage_sections_footer =
 "   </table>\n";
 
-char *modifypage_sections_footer =
+static const char *modifypage_sections_footer =
 "   </table>\n";
 
-char *mainpage_middle1 =
+static const char *mainpage_middle1 =
 "  </td>\n"
 "  <td width='100%'>\n";
 
-char *modifypage_middle1 =
+static const char *modifypage_middle1 =
 "  </td>\n"
 "  <td width='100%'>\n";
 
-char *mainpage_section_card_header =
+static const char *mainpage_section_card_header =
 "   <a name='s%d'></a>\n"
 "   <table bgcolor='#bfbfbf' width='100%%' cellspacing='2'>\n"
 "    <tr>\n"
@@ -201,7 +201,7 @@
 "      &nbsp;&nbsp;&nbsp;%s&nbsp;&nbsp;&nbsp;</b></font></td>\n"
 "     <td bgcolor='white' width='100%%'>&nbsp;</td></tr>\n";
 
-char *modifypage_section_card_header =
+static const char *modifypage_section_card_header =
 "   <a name='s%d'></a>\n"
 "   <table bgcolor='#bfbfbf' width='100%%' cellspacing='2'>\n"
 "    <tr>\n"
@@ -209,31 +209,31 @@
 "      &nbsp;&nbsp;&nbsp;%s&nbsp;&nbsp;&nbsp;</b></font></td>\n"
 "     <td bgcolor='white' width='100%%'>&nbsp;</td></tr>\n";
 
-char *mainpage_section_card_item =
+static const char *mainpage_section_card_item =
 "    <tr><td colspan='2'>\n"
 "      <a href='%s'>%s</a> </td></tr>\n";
 
-char *modifypage_section_card_item =
+static const char *modifypage_section_card_item =
 "    <tr>\n"
 "     <td colspan='2'><input type='checkbox' name='url%d'>\n"
 "      <a href='%s'>%s</a></td></tr>\n";
 
-char *mainpage_section_card_footer =
+static const char *mainpage_section_card_footer =
 "   </table>\n"
 "   <hr>\n";
 
-char *modifypage_section_card_footer =
+static const char *modifypage_section_card_footer =
 "   </table>\n"
 "   <hr>\n";
 
-char *mainpage_footer =
+static const char *mainpage_footer =
 "  </td>\n"
 " </tr>\n"
 "</table>\n"
 "</body>\n"
 "</html>\n";
 
-char *modifypage_footer =
+static const char *modifypage_footer =
 "  </td>\n"
 " </tr>\n"
 "</table>\n"
@@ -242,7 +242,7 @@
 "</html>\n";
 
 /* ------------------------------------------------------------------------- */
-char *modifypage_add_section_page =
+static const char *modifypage_add_section_page =
 DOCTYPE
 "<html>\n"
 "<head>\n"
@@ -282,7 +282,7 @@
 "\n";
 
 /* ------------------------------------------------------------------------- */
-char *modifypage_update_header =
+static const char *modifypage_update_header =
 DOCTYPE
 "<html>\n"
 "<head>\n"
@@ -299,17 +299,17 @@
 "<form>\n"
 "<input type='hidden' name='operation' value='modify2'>\n";
 
-char *modifypage_update_title =
+static const char *modifypage_update_title =
 "<table border='1' width='100%%'>\n"
 " <tr>\n"
 "  <td bgcolor='olive'><b>%s</b></td>\n"
 "  <td bgcolor='white' width='100%%'></td></tr>\n"
 "</table>\n";
 
-char *modifypage_update_item_header =
+static const char *modifypage_update_item_header =
 "<table width='100%' cellpadding='10'>\n";
 
-char *modifypage_update_item =
+static const char *modifypage_update_item =
 "<tr><td>\n"
 " <table width='100%%' bgcolor='teal'>\n"
 "  <tr>\n"
@@ -322,7 +322,7 @@
 " </table>\n"
 " </td></tr>\n";
 
-char *modifypage_update_item2 =
+static const char *modifypage_update_item2 =
 "<tr><td>\n"
 " <table width='100%%' bgcolor='teal'>\n"
 "  <tr>\n"
@@ -332,10 +332,10 @@
 " </table>\n"
 " </td></tr>\n";
 
-char *modifypage_update_item_footer =
+static const char *modifypage_update_item_footer =
 "</table>\n";
 
-char *modifypage_update_footer =
+static const char *modifypage_update_footer =
 "<table width='100%' cellpadding='4' border='0'>\n"
 "<tr><td bgcolor='#a0a0a0'>\n"
 " <input type='submit' name='submit' value='submit.'></td></tr>\n"
@@ -345,7 +345,7 @@
 "</html>\n";
 
 /* ------------------------------------------------------------------------- */
-char *modifypage_add_url =
+static const char *modifypage_add_url =
 DOCTYPE
 "<html>\n"
 "<head>\n"
--- a/dpi/ftp.c	Fri Dec 28 17:47:33 2007 +0100
+++ b/dpi/ftp.c	Mon Dec 31 22:29:20 2007 +0100
@@ -55,7 +55,7 @@
  * Global variables
  */
 static SockHandler *sh = NULL;
-char **dl_argv = NULL;
+static char **dl_argv = NULL;
 
 /*---------------------------------------------------------------------------*/
 
@@ -85,7 +85,7 @@
  *
  * Return value: (0 on success, 1 on doubt, 2 on lack of data).
  */
-int a_Misc_get_content_type_from_data(void *Data, size_t Size,
+static int a_Misc_get_content_type_from_data(void *Data, size_t Size,
                                       const char **PT)
 {
    int st = 1;      /* default to "doubt' */