[w3m-dev 01274] Re: SCM_NNTP

From: Fumitoshi UKAI (ukai@debian.or.jp)
Date: Thu Oct 26 2000 - 08:58:25 CDT

  • Next message: Fumitoshi UKAI: "[w3m-dev 01275] Re: squeeze multiple blank lines option ( http://bugs.debian.org/75527 )"

    At Thu, 26 Oct 2000 20:55:50 +0900,
    Tsutomu Okada <okada@furuno.co.jp> wrote:

    > > $B;d$N$H$3$m$G$OMn$A$O$7$J$$$N$G$9$,!"(BCtrl-C $B$r2!$9$^$G5"$C$F$-$^$;$s!#(B
    > > $B$G!"(BCtrl-C $B$r2!$7$?;~$K=PNO$5$l$kFbMF$r8+$k$H!":G8e$N(B ".\r\n" $B$^$GI=<((B
    > > $B$5$l$k$N$G!"$3$NJU$N=*C<$rG'<1$7$F$$$J$$$N$+$J$!!"$H$$$&$h$&$J5$$,$7$F(B
    > > $B$^$9!#(B
    >
    > $B$3$l$G$9$,!"(Bconfig.h $B$G(B #undef USE_NNTP $B$H$J$C$F$$$k$H$3$&$J$k$h$&$G$9!#(B

    $B$"$l(B? deb$B%Q%C%1!<%8(B #undef USE_NNTP $B$K$J$C$F$?$_$?$$$G$9$M!#(B

    $B$;$C$+$/$J$N$G(B nntp: $B$r%5%]!<%H$7$F$_$^$7$?(B
    # $B$3$l$G$"$C$F$k$N$+$J(B?

    --- url.c.orig Thu Oct 26 22:33:49 2000
    +++ url.c Thu Oct 26 22:55:51 2000
    @@ -1372,8 +1372,14 @@
             break;
     #endif /* USE_GOPHER */
     #ifdef USE_NNTP
    + case SCM_NNTP:
    + /* nntp://>:<port>/<newsgroup-name>/<article-number> */
         case SCM_NEWS:
    - p = getenv("NNTPSERVER");
    + if (pu->scheme == SCM_NNTP) {
    + p = pu->host;
    + } else {
    + p = getenv("NNTPSERVER");
    + }
             r = getenv("NNTPMODE");
             if (p == NULL)
                 return uf;
    @@ -1400,7 +1406,29 @@
                 if (i != 200 && i != 201)
                     goto nntp_error;
             }
    - fprintf(fw, "ARTICLE <%s>\r\n", pu->file);
    + if (pu->scheme == SCM_NNTP) {
    + char *group;
    + if (pu->file == NULL || *pu->file == '\0')
    + goto nntp_error;
    + /* first char of pu->file is '/' */
    + group = Strnew_charp(pu->file + 1)->ptr;
    + p = strchr(group, '/');
    + if (p == NULL)
    + goto nntp_error;
    + *p++ = '\0';
    + fprintf(fw, "GROUP %s\r\n", group);
    + fflush(fw);
    + tmp = Strfgets(f);
    + if (tmp->length == 0) {
    + goto nntp_error;
    + }
    + sscanf(tmp->ptr, "%d", &i);
    + if (i != 211)
    + goto nntp_error;
    + fprintf(fw, "ARTICLE %s\r\n", p);
    + } else {
    + fprintf(fw, "ARTICLE <%s>\r\n", pu->file);
    + }
             fflush(fw);
             tmp = Strfgets(f);
             if (tmp->length == 0)
    @@ -1408,6 +1436,7 @@
             sscanf(tmp->ptr, "%d", &i);
             if (i != 220)
                 goto nntp_error;
    + uf.scheme = SCM_NEWS; /* XXX */
             uf.stream.f = f;
             uf.close = (void (*)()) fclose;
             return uf;

    -- 
    $B1-;tJ8IR(B
    



    This archive was generated by hypermail 2b29 : Thu Oct 26 2000 - 09:10:45 CDT