Just a sample of the Echomail archive
Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.
|    JAMNNTPD    |    Support for the JAMNNTPD software client    |    2,630 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,406 of 2,630    |
|    mark lewis to Anton Shepelev    |
|    Response to the LIST command    |
|    10 Jul 16 11:23:28    |
   
   10 Jul 16 15:44, you wrote to me:   
      
    AS>>>> Could anybody confirm that JamNNTPd correctly handles the LIST   
    AS>>>> command? According to RFC977 the newsgroups should be reported as   
    AS>>>> group last first p   
    TK>>> I believe you're right. Should be fixed here now.   
    ML>> i've made likely the same fix here...   
      
    AS> Thank you very much. Tommi's instance works correctly now, and I hope   
    AS> yours does as well.   
      
   i hope so, too :)   
      
    news://news.wpusa.dynip.com   
      
    AM>> if(matchgroup(var->postgroups,g-group))   
    AM>> - sockprintf(var,"%s %lu %lu y" CRLF,g->tagname,min,max);   
    AM>> + sockprintf(var,"%s %lu %lu y" CRLF,g->tagname,max,min);   
    AM>> else   
    AM>> - sockprintf(var,"%s %lu %lu n" CRLF,g->tagname,min,max);   
    AM>> + sockprintf(var,"%s %lu %lu n" CRLF,g->tagname,max,min);   
      
    AS> May I make so bold as to ask why you have these al-   
    AS> most identical lines of code   
      
   because they are what was there... the one with the '-' is the old removed   
   line and the one with the '+' is the new fixed line... i did it kinda like a   
   diff but manually...   
      
    AS> instad of:   
      
    AS> matchFlag = matchgroup(var->postgroups,g-group)) ? 'y' : 'n';   
    AS> sockprintf(var,"%s %lu %lu %c" CRLF,g->tagname,max,min,matchFlag);   
      
   because that's not the way it is written in the JAMNNTPD v1.2 code, i guess...   
   is that faster or otherwise "better" in some way? i like the current way   
   (above) for its readability... it is easy to understand what is being done...   
   this new way, maybe not so easy to read and understand...   
      
   besides, i'm just working with what i have... i'm not even a C coder at all...   
   i much prefer pascal, asm, perl, bash, 4DOS scripting, and others ;)   
      
      
   FWIW: there's two typos, too... s/g-group/g->group/ and s/))/)/   
      
   what type would matchFlag be? char, uchar, something else? i see a lot of   
   uchar definitions... i finally settled on the following code purely from   
   guesswork and checking/fixing EMX compiler errors ;)   
      
      
   void command_list(struct var *var)   
   {   
    struct group *g;   
    ulong min,max,num;   
    uchar *arg;   
    uchar matchFlag;   
    bool listnewsgroups;   
   [...]   
    for(g=var->firstgroup;g && !var->disconnect && !get_server_quit();g=g->next)   
    {   
    if(matchgroup(var->readgroups,g->group))   
    {   
    if(listnewsgroups)   
    {   
    sockprintf(var,"%s\t" CRLF,g->tagname);   
    }   
    else   
    {   
    if(!jamgetminmaxnum(var,g,&min,&max,&num))   
    {   
    min=0;   
    max=0;   
    num=0;   
    }   
      
    matchFlag = matchgroup(var->postgroups,g->group) ? 'y' : 'n';   
    sockprintf(var,"%s %lu %lu %c" CRLF,g->tagname,max,min,matchFlag);   
    }   
    }   
    }   
      
    socksendtext(var,"." CRLF);   
   }   
      
      
   )\/(ark   
      
   Always Mount a Scratch Monkey   
      
   ... The human race has managed to improve everything but the human race.   
   ---   
    * Origin: (1:3634/12.73)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca