lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev [PATCH][dev22] Various nits


From: John Bley
Subject: lynx-dev [PATCH][dev22] Various nits
Date: Tue, 13 Apr 1999 08:15:59 -0400 (EDT)

* Change all PUTS() with a string of length 1 to PUTC(), fix a uid_t/int 
  assumption in LYLocal.c, remove some unneeded #includes, remove some 
  spurious semicolons. (John Bley)

-- 
John Bley - address@hidden
Duke '99 - English/Computer Science
  Since English is a mess, it maps well onto the problem space,
  which is also a mess, which we call reality.     - Larry Wall

diff -Burp lynx2-8-2/WWW/Library/Implementation/HTAAUtil.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTAAUtil.c
--- lynx2-8-2/WWW/Library/Implementation/HTAAUtil.c     Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTAAUtil.c     Tue Apr 13 
07:58:27 1999
@@ -48,7 +48,6 @@
 #include <HTAAUtil.h>  /* Implemented here     */
 #include <HTAssoc.h>   /* Assoc list           */
 #include <HTTCP.h>
-#include <HTAlert.h>
 
 #include <LYStrings.h>
 #include <LYLeaks.h>
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTFTP.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTFTP.c
--- lynx2-8-2/WWW/Library/Implementation/HTFTP.c        Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTFTP.c        Tue Apr 13 
07:44:31 1999
@@ -2365,7 +2365,7 @@ PRIVATE int read_directory ARGS4(
        int BytesReceived = 0;
        int BytesReported = 0;
        char NumBytes[64];
-       PUTS("\n");  /* prettier LJM */
+       PUTC('\n');  /* prettier LJM */
        for (ic = 0; ic != EOF;) {      /* For each entry in the directory */
            HTChunkClear(chunk);
 
@@ -2467,14 +2467,14 @@ unload_btree:
        if (help_message_cache_non_empty()) {
            START(HTML_PRE);
            START(HTML_HR);
-           PUTS("\n");
+           PUTC('\n');
            PUTS(help_message_cache_contents());
            init_help_message_cache();  /* to free memory */
            START(HTML_HR);
-           PUTS("\n");
+           PUTC('\n');
        } else {
            START(HTML_PRE);
-           PUTS("\n");
+           PUTC('\n');
        }
 
        /* Put up header
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTFile.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTFile.c
--- lynx2-8-2/WWW/Library/Implementation/HTFile.c       Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTFile.c       Tue Apr 13 
07:49:31 1999
@@ -1460,7 +1460,7 @@ PUBLIC BOOL HTDirTitles ARGS3(
                FREE(printable);
            }
        } else {
-           PUTS("/");
+           PUTC('/');
        }
        END(HTML_A);
        PUTC('\n');
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTFinger.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTFinger.c
--- lynx2-8-2/WWW/Library/Implementation/HTFinger.c     Wed Mar 17 22:17:11 1999
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTFinger.c     Tue Apr 13 
07:44:30 1999
@@ -146,18 +146,18 @@ PRIVATE int response ARGS5(
     */
     CTRACE(tfp,"HTFinger: Reading finger information\n");
     START(HTML_HTML);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_TITLE);
     PUTS("Finger server on ");
     PUTS(sitename);
     END(HTML_TITLE);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_BODY);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_H1);
     PUTS("Finger server on ");
     START(HTML_EM);
@@ -179,7 +179,7 @@ PRIVATE int response ARGS5(
     PUTS(cmd);
     FREE(cmd);
     END(HTML_H1);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_PRE);
 
     while ((ch=NEXT_CHAR) != EOF) {
@@ -237,11 +237,11 @@ PRIVATE int response ARGS5(
 
 end_html:
     END(HTML_PRE);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_BODY);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HTML);
-    PUTS("\n");
+    PUTC('\n');
     FREE_TARGET;
     return(0);
 }
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTGopher.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTGopher.c
--- lynx2-8-2/WWW/Library/Implementation/HTGopher.c     Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTGopher.c     Tue Apr 13 
07:44:30 1999
@@ -225,28 +225,28 @@ PRIVATE void parse_menu ARGS2(
 
 
     START(HTML_HTML);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_TITLE);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
     else
        PUTS(GOPHER_MENU_TITLE);
     END(HTML_TITLE);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
 
     START(HTML_BODY);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_H1);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
     else
        PUTS(GOPHER_MENU_TITLE);
     END(HTML_H1);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_PRE);
     while ((ich=NEXT_CHAR) != EOF) {
 
@@ -426,7 +426,7 @@ PRIVATE void parse_menu ARGS2(
 
            } /* parse error */
 
-           PUTS("\n");
+           PUTC('\n');
            p = line;   /* Start again at beginning of line */
 
        } /* if end of line */
@@ -435,11 +435,11 @@ PRIVATE void parse_menu ARGS2(
 
 end_html:
     END(HTML_PRE);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_BODY);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HTML);
-    PUTS("\n");
+    PUTC('\n');
     FREE_TARGET;
 
     return;
@@ -469,16 +469,16 @@ PRIVATE void parse_cso ARGS2(
     CONST char *title;
 
     START(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_TITLE);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
     else
        PUTS(GOPHER_CSO_SEARCH_RESULTS);
     END(HTML_TITLE);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_H1);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
@@ -487,7 +487,7 @@ PRIVATE void parse_cso ARGS2(
        PUTS(GOPHER_SEARCH_RESULTS);
     }
     END(HTML_H1);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_PRE);
 
     /*
@@ -572,7 +572,7 @@ PRIVATE void parse_cso ARGS2(
                            **  Print data.
                            */
                            PUTS(second_colon+1);
-                           PUTS("\n");
+                           PUTC('\n');
 
                            if (*(second_colon-1) != last_char)
                                /* end seperator */
@@ -594,9 +594,9 @@ PRIVATE void parse_cso ARGS2(
        } /* Loop over characters */
 
     /* end the text block */
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_PRE);
-    PUTS("\n");
+    PUTC('\n');
     FREE_TARGET;
 
     return;  /* all done */
@@ -612,18 +612,18 @@ PRIVATE void display_cso ARGS2(
     CONST char * title;
 
     START(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_TITLE);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
     else
        PUTS(GOPHER_CSO_INDEX);
     END(HTML_TITLE);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_ISINDEX);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_H1);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
@@ -656,19 +656,19 @@ PRIVATE void display_index ARGS2(
     CONST char * title;
 
     START(HTML_HEAD);
-    PUTS("\n");
-    PUTS("\n");
+    PUTC('\n');
+    PUTC('\n');
     START(HTML_TITLE);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
     else
        PUTS(GOPHER_INDEX_TITLE);
     END(HTML_TITLE);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_ISINDEX);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_H1);
     if ((title = HTAnchor_title(anAnchor)))
        PUTS(title);
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTVMSUtils.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTVMSUtils.c
--- lynx2-8-2/WWW/Library/Implementation/HTVMSUtils.c   Sat Dec 26 15:50:01 1998
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTVMSUtils.c   Tue Apr 13 
07:44:31 1999
@@ -954,25 +954,25 @@ PUBLIC int HTVMSBrowseDir ARGS4(
      *  Output the title and header.
      */
     START(HTML_HTML);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     HTUnEscape(title);
     START(HTML_TITLE);
     PUTS(title);
     PUTS(" directory");
     END(HTML_TITLE);
-    PUTS("\n");
+    PUTC('\n');
     FREE(title);
     END(HTML_HEAD);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_BODY);
-    PUTS("\n");
+    PUTC('\n');
     HTUnEscape(header);
     START(HTML_H1);
     PUTS(header);
     END(HTML_H1);
-    PUTS("\n");
+    PUTC('\n');
     if (HTDirReadme == HT_DIR_README_TOP) {
         FILE * fp;
        if (header[strlen(header)-1] != '/')
@@ -1018,7 +1018,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
        PUTS(parent);
        END(HTML_A);
        START(HTML_P);
-       PUTS("\n");
+       PUTC('\n');
        FREE(relative);
        FREE(parent);
     }
@@ -1233,11 +1233,11 @@ PUBLIC int HTVMSBrowseDir ARGS4(
      *  Complete the output stream.
      */
     END(HTML_PRE);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_BODY);
-    PUTS("\n");
+    PUTC('\n');
     END(HTML_HTML);
-    PUTS("\n");
+    PUTC('\n');
     FREE(tail);
     FREE_TARGET;
 
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTWAIS.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTWAIS.c
--- lynx2-8-2/WWW/Library/Implementation/HTWAIS.c       Thu Dec 24 06:27:23 1998
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTWAIS.c       Tue Apr 13 
07:47:03 1999
@@ -198,7 +198,7 @@ PRIVATE void showDiags ARGS2(
            PUTS(d[i]->DIAG);
            PUTC(' ');
            PUTS(d[i]->ADDINFO);
-           PUTC('\n'); ;
+           PUTC('\n');
        }
     }
 }
@@ -482,7 +482,7 @@ PRIVATE void display_search_response ARG
     PUTS(gettext("the second is the number of lines in the item."));
     START(HTML_BR);
     START(HTML_BR);
-    PUTS("\n");
+    PUTC('\n');
     START(HTML_OL);
 
     if (response->DatabaseDiagnosticRecords != 0) {
@@ -595,7 +595,7 @@ PRIVATE void display_search_response ARG
        }
     }  /* Loop: display user info */
     END(HTML_OL);
-    PUTC('\n'); ;
+    PUTC('\n');
 }
 
 /*             Load by name                                    HTLoadWAIS
@@ -758,18 +758,18 @@ PUBLIC int HTLoadWAIS ARGS4(
        HTStructured * target = HTML_new(anAnchor, format_out, sink);
 
        START(HTML_HEAD);
-       PUTS("\n");
+       PUTC('\n');
        HTStartIsIndex(target, HTWAIS_SOLICIT_QUERY , NULL);
-       PUTS("\n");
+       PUTC('\n');
 
        {
            START(HTML_TITLE);
            PUTS(wais_database);
            PUTS(gettext(" (WAIS Index)"));
            END(HTML_TITLE);
-           PUTS("\n");
+           PUTC('\n');
            END(HTML_HEAD);
-           PUTS("\n");
+           PUTC('\n');
 
            START(HTML_H1);
            PUTS(gettext("WAIS Index: "));
@@ -777,7 +777,7 @@ PUBLIC int HTLoadWAIS ARGS4(
            PUTS(wais_database);
            END(HTML_EM);
            END(HTML_H1);
-           PUTS("\n");
+           PUTC('\n');
            PUTS(gettext("This is a link for searching the "));
            START(HTML_EM);
            PUTS(wais_database);
@@ -801,7 +801,7 @@ PUBLIC int HTLoadWAIS ARGS4(
        if (fp) {
            char c;
            START(HTML_PRE);            /* Preformatted description */
-           PUTS("\n");
+           PUTC('\n');
            while((c=getc(fp))!=EOF) PUTC(c);   /* Transfer file */
            END(HTML_PRE);
            fclose(fp);
@@ -824,18 +824,18 @@ PUBLIC int HTLoadWAIS ARGS4(
        target = HTML_new(anAnchor, format_out, sink);
 
        START(HTML_HEAD);
-       PUTS("\n");
+       PUTC('\n');
        HTStartIsIndex(target, HTWAIS_SOLICIT_QUERY, NULL);
-       PUTS("\n");
+       PUTC('\n');
        START(HTML_TITLE);
        PUTS(keywords);
        PUTS(gettext(" (in "));
        PUTS(wais_database);
-       PUTS(")");
+       PUTC(')');
        END(HTML_TITLE);
-       PUTS("\n");
+       PUTC('\n');
        END(HTML_HEAD);
-       PUTS("\n");
+       PUTC('\n');
 
        START(HTML_H1);
        PUTS(gettext("WAIS Search of \""));
@@ -847,7 +847,7 @@ PUBLIC int HTLoadWAIS ARGS4(
        PUTS(wais_database);
        END(HTML_EM);
        END(HTML_H1);
-       PUTS("\n");
+       PUTC('\n');
 
        request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */
        CTRACE(tfp, "HTWAIS: Search for `%s' in `%s'\n",
diff -Burp lynx2-8-2/WWW/Library/Implementation/HTWSRC.c 
lynx2-8-2-patched/WWW/Library/Implementation/HTWSRC.c
--- lynx2-8-2/WWW/Library/Implementation/HTWSRC.c       Thu Dec 24 06:27:23 1998
+++ lynx2-8-2-patched/WWW/Library/Implementation/HTWSRC.c       Tue Apr 13 
07:44:31 1999
@@ -303,19 +303,19 @@ PRIVATE void WSRC_gen_html ARGS2(HTStrea
        }
 
        START(HTML_HEAD);
-       PUTS("\n");
+       PUTC('\n');
        START(HTML_TITLE);
        PUTS(shortname);
        PUTS(source_file ? gettext(" WAIS source file") : INDEX_SEGMENT);
        END(HTML_TITLE);
-       PUTS("\n");
+       PUTC('\n');
        END(HTML_HEAD);
 
        START(HTML_H1);
        PUTS(shortname);
        PUTS(source_file ? gettext(" description") : INDEX_SEGMENT);
        END(HTML_H1);
-       PUTS("\n");
+       PUTC('\n');
        FREE(shortname);
     }
 
diff -Burp lynx2-8-2/src/GridText.c lynx2-8-2-patched/src/GridText.c
--- lynx2-8-2/src/GridText.c    Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/src/GridText.c    Tue Apr 13 07:48:58 1999
@@ -1951,7 +1951,7 @@ PRIVATE void split_line ARGS2(
            linedata[line->size++] = LY_BOLD_START_CHAR;
            linedata[line->size] = '\0';
            ctrl_chars_on_this_line++;
-           SpecialAttrChars++;;
+           SpecialAttrChars++;
        }
        if (plen) {
            for (i = (plen - 1); i >= 0; i--) {
diff -Burp lynx2-8-2/src/LYCharSets.c lynx2-8-2-patched/src/LYCharSets.c
--- lynx2-8-2/src/LYCharSets.c  Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/src/LYCharSets.c  Tue Apr 13 07:48:34 1999
@@ -6,7 +6,6 @@
 #include <UCMap.h>
 #include <UCDefs.h>
 #include <LYCharSets.h>
-#include <LYCharUtils.h>
 #include <HTFont.h>
 #include <GridText.h>
 #include <LYCurses.h>
diff -Burp lynx2-8-2/src/LYDownload.c lynx2-8-2-patched/src/LYDownload.c
--- lynx2-8-2/src/LYDownload.c  Tue Apr 13 05:39:16 1999
+++ lynx2-8-2-patched/src/LYDownload.c  Tue Apr 13 08:05:19 1999
@@ -6,7 +6,6 @@
 #include <LYUtils.h>
 #include <LYGlobalDefs.h>
 #include <LYStrings.h>
-#include <LYGetFile.h>
 #include <LYDownload.h>
 
 #include <LYLeaks.h>
diff -Burp lynx2-8-2/src/LYLocal.c lynx2-8-2-patched/src/LYLocal.c
--- lynx2-8-2/src/LYLocal.c     Tue Mar 30 12:10:37 1999
+++ lynx2-8-2-patched/src/LYLocal.c     Tue Apr 13 08:04:54 1999
@@ -39,7 +39,6 @@
 #include <LYStrings.h>
 #include <LYCharUtils.h>
 #include <LYStructs.h>
-#include <LYGetFile.h>
 #include <LYHistory.h>
 #include <LYUpload.h>
 #include <LYLocal.h>
@@ -329,7 +328,7 @@ PRIVATE BOOLEAN not_already_exists ARGS1
     return FALSE;
 }
 
-PRIVATE BOOLEAN dir_has_same_owner ARGS2(struct stat *, info, int, owner)
+PRIVATE BOOLEAN dir_has_same_owner ARGS2(struct stat *, info, uid_t, owner)
 {
     if (S_ISDIR(info->st_mode)) {
        if (info->st_uid == owner) {
diff -Burp lynx2-8-2/src/LYNews.c lynx2-8-2-patched/src/LYNews.c
--- lynx2-8-2/src/LYNews.c      Wed Mar 17 22:17:11 1999
+++ lynx2-8-2-patched/src/LYNews.c      Tue Apr 13 08:04:58 1999
@@ -10,7 +10,6 @@
 #include <LYUtils.h>
 #include <LYClean.h>
 #include <LYStrings.h>
-#include <LYGetFile.h>
 #include <LYHistory.h>
 #include <GridText.h>
 #include <LYCharSets.h>
diff -Burp lynx2-8-2/src/LYOptions.c lynx2-8-2-patched/src/LYOptions.c
--- lynx2-8-2/src/LYOptions.c   Tue Mar 30 12:10:37 1999
+++ lynx2-8-2-patched/src/LYOptions.c   Tue Apr 13 07:48:27 1999
@@ -11,7 +11,6 @@
 #include <LYSignal.h>
 #include <LYClean.h>
 #include <LYCharSets.h>
-#include <LYCharUtils.h>
 #include <UCMap.h>
 #include <UCAux.h>
 #include <LYKeymap.h>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]