Go to the FreeLists Home Page Home Signup Help Login
 



[arachne] || [Date Prev] [12-2003 Date Index] [Date Next] || [Thread Prev] [12-2003 Thread Index] [Thread Next]

[arachne]

  • From: "Ray Andrews" <randrews@xxxxxx>
  • To: arachne@xxxxxxxxxxxxx
  • Date: Sat, 06 Dec 2003 16:26:48 -0800
Arachne at FreeLists---The Arachne Fan Club!

Hi All,
    
I found this jewel in the code recently:
(Note Michael's comments translated by Christof ... ;-)
    
    
    //hehehe.... jestli nasledujicim radku nerozumite, nejste sami :-))))
    //autor programu pro vas ma plne pochopeni...
    
>>>>    //tr.: if you do not understand the following row/s, you are not alone,
>>>>    //     be assured of the author's full empathy 
    
    if(!param && in!=' ' && taglen<sizeof(tagname))
    {
     tagname[taglen++]=in;
     if(taglen==3 && !strncmp(tagname,"!--",3))//||(tag=script)
//        insidetag!=TAG_TEXTAREA && insidetag!=TAG_STYLE && 
insidetag!=TAG_SCRIPT)
     {
      comment=1;
      nolt=1;
     }
    }
    else if(in==' ' && vallen && !uvozovky && argument)
    {
     if(param)
     {
      putvarvalue(tagargptr,vallen);
      argument=0;
     }
     vallen=0;
    }
    else if((in=='\"' || in=='\'' && (!uvozovky || apostrof)) && (!vallen || 
uvozovky))
    {
     if(argument && uvozovky)      //kvuli ' XXX="" ' (tr.: because of)
      tagargptr[vallen++]='\0';

     uvozovky=1-uvozovky;
     if(uvozovky && in=='\'')
      apostrof=1;
     else
      apostrof=0;
    }
    else if(in=='=' && !uvozovky && !argument)
    {
     putvarname(tagargptr,vallen);
     vallen=0;
     argument=1;
    }
    else if(vallen<BUF/2)
    {
     if(in!=' ' || uvozovky)
     {
      if(!argument && argspc && vallen)
      {
       putvarname(tagargptr,vallen);
       putvarvalue(tagargptr,0);
       vallen=0;
      }
      tagargptr[vallen++]=in;
      argspc=0;
     }
     else
     {
      if(param)
       argspc=1;
      else
       param=1;
     }
    }
   }


And then there was this, the most impossible piece of code that
has ever been writen:  
  
  
  // Do not try to understand this, I don't understand it neither ;--)
  // But it works, and it should prevent users from seeing distorted
  // tables
  
  
  if(!GLOBAL.norefresh
     &&
     !p->rendering_target
     &&
     (
      p->htmlframe[p->currentframe].next==-1 || p->html_source==HTTP_HTML
     )
     &&
     (
      user_interface.quickanddirty || !RENDER.willadjusttables || 
GLOBAL.validtables!=TABLES_UNKNOWN
     )
     &&
     (
      notrefreshed
      ||
      (
       user_interface.virtualysize && GLOBAL.validtables==TABLES_FINISHED
      )
      ||
      (
       y>=frame->posY
       &&
       !noresize
       &&
       lastredraw!=fpos
       &&
       (
        y<=frame->posY+frame->scroll.ysize
        ||
        lastredrawy<=frame->posY+frame->scroll.ysize
        ||
        p->prevHTMLtable!=IE_NULL
       )
      )
     )
    )
  {
   if(RENDER.willadjusttables && !user_interface.quickanddirty)
    redrawHTML(REDRAW_NO_MESSAGE,REDRAW_SCREEN);
   else
    redrawHTML(REDRAW_NO_MESSAGE,REDRAW_CREATE_VIRTUAL);



Wish me luck.
-- This mail was written by a user of the Arachne Browser - http://arachne.cz/


Arachne at FreeLists
-- Arachne, The Web Browser/Suite for DOS and Linux --





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.