lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx2.8.3dev.4


From: pg
Subject: Re: lynx-dev lynx2.8.3dev.4
Date: Fri, 16 Jul 1999 15:59:07 -0600 (MDT)

In a recent note, T.E.Dickey said:

> Date: Thu, 15 Jul 1999 22:08:00 -0400 (EDT)
> > Why was this change made?  Can it be undone, or must I insert casts at 
> 
> I'll recheck, perhaps undo it.  (Either way there'll be some casts,
> unfortunately).
> 
> > all places where the (char)<->(unsigned char) happens.  I get ERRORs 
> > on strlen() and the second argument to strcpy(); WARNINGs on the 
> > first argument to strcpy(), etc. 
> 
Out of curiosity, I added casts at all applied occurences that generated
warnings or errors.  I felt this was safer than trying to change the
declarations.  This is probably not the right way to do it -- some of
the declarations should be changed back.  But, FYI, patch attached.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL
======================================================================
%%% Created Fri Jul 16 15:26:50 MDT 1999 by target lynx.patch. %%%
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/HTAAUtil.c 
lynx2-8-3/WWW/Library/Implementation/HTAAUtil.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTAAUtil.c        Wed Jul 14 
10:25:26 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTAAUtil.c     Fri Jul 16 11:15:52 1999
@@ -71,7 +71,7 @@
        return HTAA_UNKNOWN;
 
     StrAllocCopy(upcased, name);
-    LYUpperCase(upcased);
+    LYUpperCase((unsigned char *) upcased);
 
     if (!strncmp(upcased, "NONE", 4)) {
        FREE(upcased);
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/HTFTP.c 
lynx2-8-3/WWW/Library/Implementation/HTFTP.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTFTP.c   Fri Jul 16 15:24:09 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTFTP.c        Fri Jul 16 11:09:55 1999
@@ -1589,7 +1589,7 @@
 
     /** Cast VMS non-README file and directory names to lowercase. **/
     if (strstr(entry_info->filename, "READ") == NULL) {
-       LYLowerCase(entry_info->filename);
+       LYLowerCase((unsigned char *) (entry_info->filename));
        i = strlen(entry_info->filename);
     } else {
        i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4);
@@ -1603,7 +1603,7 @@
        } else {
            i = 0;
        }
-       LYLowerCase(entry_info->filename + i);
+       LYLowerCase((unsigned char *) (entry_info->filename + i));
     }
 
     /** Uppercase terminal .z's or _z's. **/
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/HTFile.c 
lynx2-8-3/WWW/Library/Implementation/HTFile.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTFile.c  Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTFile.c       Fri Jul 16 12:43:32 1999
@@ -932,7 +932,7 @@
 
     FREE(anchor->charset);
     StrAllocCopy(cp, format->name);
-    LYLowerCase(cp);
+    LYLowerCase((unsigned char *) cp);
     if (((cp1 = strchr(cp, ';')) != NULL) &&
        (cp2 = strstr(cp1, "charset")) != NULL) {
        CTRACE(tfp, "HTCharsetFormat: Extended MIME Content-Type is %s\n",
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/HTGopher.c 
lynx2-8-3/WWW/Library/Implementation/HTGopher.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTGopher.c        Fri Apr 23 
08:56:35 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTGopher.c     Fri Jul 16 11:13:57 1999
@@ -894,7 +894,7 @@
     ** are converted to all lower-case for comparison.
     */
     info = blk->attributes;
-    LYLowerCase(info);
+    LYLowerCase((unsigned char *) info);
     if (strstr(info, "indexed "))
        blk->indexed = 1;
     if (strstr(info, "default "))
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/HTMIME.c 
lynx2-8-3/WWW/Library/Implementation/HTMIME.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTMIME.c  Fri Jun 11 03:34:08 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTMIME.c       Fri Jul 16 11:13:02 1999
@@ -333,7 +333,7 @@
                    **  we'll make sure they're still gone from any
                    **  charset parameter we check. - FM
                    */
-                   LYLowerCase(cp);
+                   LYLowerCase((unsigned char *) cp);
                    if ((cp1 = strchr(cp, ';')) != NULL) {
                        BOOL chartrans_ok = NO;
                        if ((cp2 = strstr(cp1, "charset")) != NULL) {
@@ -1224,7 +1224,7 @@
                /*
                **  Convert to lowercase and indicate in anchor. - FM
                */
-               LYLowerCase(me->value);
+               LYLowerCase((unsigned char *) (me->value));
                StrAllocCopy(me->anchor->cache_control, me->value);
                /*
                **  Check whether to set no_cache for the anchor. - FM
@@ -1348,7 +1348,7 @@
                /*
                **  Convert to lowercase and indicate in anchor. - FM
                */
-               LYLowerCase(me->value);
+               LYLowerCase((unsigned char *) (me->value));
                StrAllocCopy(me->anchor->content_encoding, me->value);
                FREE(me->compression_encoding);
                if (!strcmp(me->value, "8bit") ||
@@ -1381,7 +1381,7 @@
                /*
                **  Convert to lowercase and indicate in anchor. - FM
                */
-               LYLowerCase(me->value);
+               LYLowerCase((unsigned char *) (me->value));
                StrAllocCopy(me->anchor->content_language, me->value);
                break;
            case miCONTENT_LENGTH:
@@ -1436,7 +1436,7 @@
                **  Force the Content-Transfer-Encoding value
                **  to all lower case. - FM
                */
-               LYLowerCase(me->value);
+               LYLowerCase((unsigned char *) (me->value));
                me->encoding = HTAtom_for(me->value);
                break;
            case miCONTENT_TYPE:
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/HTTP.c 
lynx2-8-3/WWW/Library/Implementation/HTTP.c
--- orig/lynx2-8-3/WWW/Library/Implementation/HTTP.c    Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/WWW/Library/Implementation/HTTP.c Fri Jul 16 11:52:07 1999
@@ -484,7 +484,7 @@
          strcpy(line, pref_charset);
          if (line[strlen(line)-1] == ',')
              line[strlen(line)-1] = '\0';
-         LYLowerCase(line);
+         LYLowerCase((unsigned char *) line);
          if (strstr(line, "iso-8859-1") == NULL)
              strcat(line, ", iso-8859-1;q=0.01");
          if (strstr(line, "us-ascii") == NULL)
diff -bru orig/lynx2-8-3/WWW/Library/Implementation/SGML.c 
lynx2-8-3/WWW/Library/Implementation/SGML.c
--- orig/lynx2-8-3/WWW/Library/Implementation/SGML.c    Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/WWW/Library/Implementation/SGML.c Thu Jul 15 18:00:32 1999
@@ -4628,7 +4628,7 @@
 {
     unsigned char *euc;
 
-    euc = malloc(strlen(any) + 1);
+    euc = malloc(strlen((const char *) any) + 1);
 #ifdef CJK_EX
     if (!euc)
        outofmem(__FILE__, "TO_SJIS");
@@ -4637,7 +4637,7 @@
     if (is_EUC_JP(euc))
        EUC_TO_SJIS(euc, sjis);
     else
-       strcpy(sjis, any);
+       strcpy((char *) sjis, (const char *) any);
     free(euc);
 }
 
@@ -4651,7 +4651,7 @@
        jis[0] = 0;
        return;
     }
-    euc = malloc(strlen(any) + 1);
+    euc = malloc(strlen((const char *) any) + 1);
 #ifdef CJK_EX
     if (!euc)
        outofmem(__FILE__, "TO_JIS");
diff -bru orig/lynx2-8-3/src/GridText.c lynx2-8-3/src/GridText.c
--- orig/lynx2-8-3/src/GridText.c       Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/GridText.c    Fri Jul 16 12:52:00 1999
@@ -7399,7 +7399,7 @@
     if (accept_cs != NULL) {
        StrAllocCopy(HTFormAcceptCharset, accept_cs);
        LYRemoveBlanks(HTFormAcceptCharset);
-       LYLowerCase(HTFormAcceptCharset);
+       LYLowerCase((unsigned char *) HTFormAcceptCharset);
     }
 
     /*
@@ -8238,7 +8238,7 @@
     if (I->accept_cs) {
        StrAllocCopy(f->accept_cs, I->accept_cs);
        LYRemoveBlanks(f->accept_cs);
-       LYLowerCase(f->accept_cs);
+       LYLowerCase((unsigned char *) (f->accept_cs));
     }
 
     /*
diff -bru orig/lynx2-8-3/src/HTInit.c lynx2-8-3/src/HTInit.c
--- orig/lynx2-8-3/src/HTInit.c Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/HTInit.c      Fri Jul 16 12:53:48 1999
@@ -263,7 +263,7 @@
 {
     LYTrimLeading(s);
     LYTrimTrailing(s);
-    LYLowerCase(s);
+    LYLowerCase((unsigned char *) s);
     return(s);
 }
 
@@ -327,7 +327,7 @@
        return(0);
     }
     LYRemoveBlanks(rawentry);
-    LYLowerCase(rawentry);
+    LYLowerCase((unsigned char *) rawentry);
 
     mc->needsterminal = 0;
     mc->copiousoutput = 0;
@@ -1012,7 +1012,7 @@
        if (!ct)
            outofmem(__FILE__, "HTLoadExtensionsConfigFile");
        strcpy(ct,word);
-       LYLowerCase(ct);
+       LYLowerCase((unsigned char *) ct);
 
        while(line[0]) {
            HTGetWord(word, line, ' ', '\t');
@@ -1022,7 +1022,7 @@
                    outofmem(__FILE__, "HTLoadExtensionsConfigFile");
 
                sprintf(ext, ".%s", word);
-               LYLowerCase(ext);
+               LYLowerCase((unsigned char *) ext);
 
                CTRACE (tfp, "SETTING SUFFIX '%s' to '%s'.\n", ext, ct);
 
diff -bru orig/lynx2-8-3/src/HTML.c lynx2-8-3/src/HTML.c
--- orig/lynx2-8-3/src/HTML.c   Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/HTML.c        Fri Jul 16 13:28:46 1999
@@ -2294,14 +2294,14 @@
                (!strcasecomp(value[HTML_NOTE_CLASS], "CAUTION") ||
                 !strcasecomp(value[HTML_NOTE_CLASS], "WARNING"))) {
                StrAllocCopy(note, value[HTML_NOTE_CLASS]);
-               LYUpperCase(note);
+               LYUpperCase((unsigned char *) note);
                StrAllocCat(note, ":");
            } else if (present && present[HTML_NOTE_ROLE] &&
                       value[HTML_NOTE_ROLE] &&
                       (!strcasecomp(value[HTML_NOTE_ROLE], "CAUTION") ||
                        !strcasecomp(value[HTML_NOTE_ROLE], "WARNING"))) {
-               StrAllocCopy(note, value[HTML_NOTE_ROLE]);
-               LYUpperCase(note);
+               StrAllocCopy(note,(CONST char *) value[HTML_NOTE_ROLE]);
+               LYUpperCase((unsigned char *) note);
                StrAllocCat(note, ":");
            } else {
                StrAllocCopy(note, "NOTE:");
@@ -4393,7 +4393,7 @@
            if (present && present[HTML_FORM_ENCTYPE] &&
                value[HTML_FORM_ENCTYPE] && *value[HTML_FORM_ENCTYPE]) {
                StrAllocCopy(enctype, value[HTML_FORM_ENCTYPE]);
-               LYLowerCase(enctype);
+               LYLowerCase((unsigned char *) enctype);
            }
 
            if (present) {
diff -bru orig/lynx2-8-3/src/LYBookmark.c lynx2-8-3/src/LYBookmark.c
--- orig/lynx2-8-3/src/LYBookmark.c     Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/LYBookmark.c  Fri Jul 16 12:35:28 1999
@@ -281,10 +281,10 @@
        if (HTCJK == JAPANESE) {
            switch(kanji_code) {
            case EUC:
-               TO_EUC(title, tmp_buffer);
+               TO_EUC((CONST unsigned char *) title, (unsigned char *) 
tmp_buffer);
                break;
            case SJIS:
-               TO_SJIS(title, tmp_buffer);
+               TO_SJIS((CONST unsigned char *) title, (unsigned char *) 
tmp_buffer);
                break;
            default:
                break;
@@ -316,13 +316,13 @@
     if (HTCJK == JAPANESE) {
        switch(kanji_code) {    /* 1997/11/22 (Sat) 09:28:00 */
        case EUC:
-           TO_EUC(string_buffer, tmp_buffer);
+           TO_EUC((CONST unsigned char *) string_buffer, (unsigned char *) 
tmp_buffer);
            break;
        case SJIS:
-           TO_SJIS(string_buffer, tmp_buffer);
+           TO_SJIS((CONST unsigned char *) string_buffer, (unsigned char *) 
tmp_buffer);
            break;
        default:
-           TO_JIS(string_buffer, tmp_buffer);
+           TO_JIS((CONST unsigned char *) string_buffer, (unsigned char *) 
tmp_buffer);
            break;
        }
        StrAllocCopy(Title, tmp_buffer);
diff -bru orig/lynx2-8-3/src/LYCharUtils.c lynx2-8-3/src/LYCharUtils.c
--- orig/lynx2-8-3/src/LYCharUtils.c    Fri Jul 16 15:24:05 1999
+++ lynx2-8-3/src/LYCharUtils.c Fri Jul 16 13:06:49 1999
@@ -2723,7 +2723,7 @@
         */
        if ((!me->node_anchor->cache_control) &&
            !strcasecomp((http_equiv ? http_equiv : ""), "Cache-Control")) {
-           LYLowerCase(content);
+           LYLowerCase((unsigned char *) content);
            StrAllocCopy(me->node_anchor->cache_control, content);
            if (me->node_anchor->no_cache == FALSE) {
                cp0 = content;
@@ -2826,7 +2826,7 @@
                                 NO, NO, YES, st_other);
        LYTrimHead(content);
        LYTrimTail(content);
-       LYLowerCase(content);
+       LYLowerCase((unsigned char *) content);
 
        if ((cp = strstr(content, "text/html;")) != NULL &&
            (cp1 = strstr(content, "charset")) != NULL &&
diff -bru orig/lynx2-8-3/src/LYReadCFG.c lynx2-8-3/src/LYReadCFG.c
--- orig/lynx2-8-3/src/LYReadCFG.c      Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/LYReadCFG.c   Fri Jul 16 13:10:27 1999
@@ -831,7 +831,7 @@
     *mime_type++ = '\0';
 
     LYRemoveBlanks(mime_type);
-    LYLowerCase(mime_type);
+    LYLowerCase((unsigned char *) mime_type);
 
     if (strstr(mime_type, "tex") != NULL ||
        strstr(mime_type, "postscript") != NULL ||
@@ -869,7 +869,7 @@
     *viewer++ = '\0';
 
     LYRemoveBlanks(mime_type);
-    LYLowerCase(mime_type);
+    LYLowerCase((unsigned char *) mime_type);
 
     environment = strrchr(viewer, ':');
     if ((environment != NULL) &&
@@ -1503,9 +1503,9 @@
        case CONF_ENV2:
 
            if (tbl->type == CONF_ENV)
-               LYLowerCase(name);
+               LYLowerCase((unsigned char *) name);
            else
-               LYUpperCase(name);
+               LYUpperCase((unsigned char *) name);
 
            if (getenv (name) == 0) {
 #ifdef VMS
@@ -1610,7 +1610,7 @@
                    if ((*resultant_set)[i])
                        continue;
                    StrAllocCopy(buf, Config_Table[i].name);
-                   LYUpperCase(buf);
+                   LYUpperCase((unsigned char *) buf);
                    fprintf(fp0,"         * %s\n", buf);
                }
                FREE(buf);
diff -bru orig/lynx2-8-3/src/LYStrings.c lynx2-8-3/src/LYStrings.c
--- orig/lynx2-8-3/src/LYStrings.c      Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/LYStrings.c   Fri Jul 16 12:49:58 1999
@@ -2751,11 +2751,11 @@
 #endif /* ENHANCED_LINEEDIT */
 
     case LYE_UPPER:
-       LYUpperCase(Buf);
+       LYUpperCase((unsigned char *) Buf);
        break;
 
     case LYE_LOWER:
-       LYLowerCase(Buf);
+       LYLowerCase((unsigned char *) Buf);
        break;
 
     default:
diff -bru orig/lynx2-8-3/src/LYUtils.c lynx2-8-3/src/LYUtils.c
--- orig/lynx2-8-3/src/LYUtils.c        Wed Jul 14 10:25:26 1999
+++ lynx2-8-3/src/LYUtils.c     Fri Jul 16 13:12:04 1999
@@ -1914,7 +1914,7 @@
            else
                TO_SJIS((CONST unsigned char *)text_buff, temp);
 #else
-           strcpy(temp, text_buff);
+           strcpy((char *) temp, text_buff);
 #endif
        } else {
            for (i = 0, j = 0; text_buff[i]; i++) {

reply via email to

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