lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev About mailto: addresses


From: Vlad Harchev
Subject: Re: lynx-dev About mailto: addresses
Date: Mon, 22 Nov 1999 14:54:40 +0400

>Hello,
>
>  We have seen several times people asking for opening a better mailer
>than lynx upon pressing return on a "mailto:"; link (not using EXTERNAL).
>The following is not a patch but you are welcome to use it in your own
>version to open your mailer. In my case it is pine. The format for pine is
>
>pine -url mailto:address@hidden
>
>and that is what is coded down below, the obvious modifications can be
>done for other mailers.
>
>All you have to do is replace the function reply_by_mail by the following
>new function (for unix users):
>
>PUBLIC void reply_by_mail ARGS4(
>        char *,         mail_address,
>        char *,         filename,
>        CONST char *,   title,
>        CONST char *,   refid)
>{
>    char *command = "";
>    CTRACE(tfp, "reply_by_mail(\"%s\", \"%s\", \"%s\", \"%s\")\n",
>        mail_address?mail_address:"<nil>",
>        filename?filename:"<nil>",
>        title?title:"<nil>",
>        refid?refid:"<nil>");
>
>    if (!(mail_address && *mail_address)) {
>        HTAlert(NO_ADDRESS_IN_MAILTO_URL);
>        return;
>    }
>    sprintf(command,"/path/to/pine -url mailto:%s",mail_address);

  This will probably cause core dump - you use sprintf to print to non-allocated
  buffer, and then are trying to free that string.
  
>    stop_curses();
>    LYSystem(command);
>    start_curses();
>    FREE(command);
>    return;
>}
>
>Have a good day,
>
>Eduardo
>http://www.math.washington.edu/~chappa/pine/

reply via email to

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