lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV patch to make "=" page "live" (revised "patch 11")


From: Bela Lubkin
Subject: LYNX-DEV patch to make "=" page "live" (revised "patch 11")
Date: Sat, 2 Nov 1996 05:40:02 -0800

This is a patch to make the Information Page (normally reached by
hitting "=") have active links instead of just passively showing the
URLs of the current page and link.

This version is more careful about not presenting a POST URL in an
unusable form.  It should only display POST URLs without making them
"live".

The same patch works against 2.6 and Rob's current developmental code
(LYShowInfo.c hasn't been changed).

Subir, please update this on your patches page.

Foteos, please comment whether this version is still misguided...

Rob, please incorporate.  ;-}

>Bela<

=============================================================================

*** LYShowInfo.c.orig   Sat Nov  2 04:55:12 1996
--- LYShowInfo.c        Sat Nov  2 05:08:57 1996
***************
*** 110,116 ****
        HTUnEscape(temp);
  
        fprintf(fp0,"   Name:  %s\n", temp);
!       fprintf(fp0,"    URL:  %s\n", doc->address);
  
        cp = links[doc->link].lname;
        if (!strncmp(cp, "file://localhost", 16)) 
--- 110,116 ----
        HTUnEscape(temp);
  
        fprintf(fp0,"   Name:  %s\n", temp);
!       fprintf(fp0,"    URL:  <a href=\"%s\">%s</a>\n", doc->address, 
doc->address);
  
        cp = links[doc->link].lname;
        if (!strncmp(cp, "file://localhost", 16)) 
***************
*** 240,261 ****
  
      StrAllocCopy(Address, doc->address);
      LYEntify(&Address, FALSE);
-     fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL: %s\n", Address);
  
      if (doc->post_data) {
          StrAllocCopy(Address, doc->post_data);
        LYEntify(&Address, FALSE);
        fprintf(fp0, "<dt>Post Data: %s\n", Address);
        fprintf(fp0, "<dt>Post Content Type: %s\n", doc->post_content_type);
      }
  
      if (owner_address) {
          StrAllocCopy(Address, owner_address);
        LYEntify(&Address, FALSE);
      } else {
!         StrAllocCopy(Address, "None");
      }
-     fprintf(fp0, "<dt>Owner(s): %s\n", Address);
  
      fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;size: %d lines\n", 
size_of_file);
  
--- 240,264 ----
  
      StrAllocCopy(Address, doc->address);
      LYEntify(&Address, FALSE);
  
      if (doc->post_data) {
+       fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL: %s\n", Address);
          StrAllocCopy(Address, doc->post_data);
        LYEntify(&Address, FALSE);
        fprintf(fp0, "<dt>Post Data: %s\n", Address);
        fprintf(fp0, "<dt>Post Content Type: %s\n", doc->post_content_type);
      }
+     else
+       fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL: <a 
href=\"%s\">%s</a>\n", Address, Address);
  
+     fprintf(fp0, "<dt>Owner(s): ");
      if (owner_address) {
          StrAllocCopy(Address, owner_address);
        LYEntify(&Address, FALSE);
+         fprintf(fp0, "<a href=\"%s\">%s</a>\n", Address, Address);
      } else {
!         fprintf(fp0, "None\n");
      }
  
      fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;size: %d lines\n", 
size_of_file);
  
***************
*** 289,301 ****
                fprintf(fp0,"<dt>&nbsp;(Form field)\n");
            }
        } else {
            if (links[doc->link].lname) {
                StrAllocCopy(Title, links[doc->link].lname);
                LYEntify(&Title, TRUE);
!           } else {
!               StrAllocCopy(Title, "");
            }
!           fprintf(fp0, "<dt>Filename: %s\n", Title);
        }
        fprintf(fp0, "</dl>\n");  /* end of list */
  
--- 292,305 ----
                fprintf(fp0,"<dt>&nbsp;(Form field)\n");
            }
        } else {
+           fprintf(fp0, "<dt>Filename: ");
            if (links[doc->link].lname) {
                StrAllocCopy(Title, links[doc->link].lname);
                LYEntify(&Title, TRUE);
!               fprintf(fp0, "<a href=\"%s\">%s</a>", Title, Title);
            }
!           fprintf(fp0, "\n");
! 
        }
        fprintf(fp0, "</dl>\n");  /* end of list */
  
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;



reply via email to

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