home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / JOE_SOUR.LHA / Sources.lha / s!x / lastcaller / lastcallers.c next >
Encoding:
C/C++ Source or Header  |  1996-07-24  |  15.0 KB  |  566 lines

  1. #define PROGNAME "Last10Callers"
  2.  
  3.  
  4. #include "bbs:bgcheck/bgcheck.h"
  5. #include "bbs:bgcheck/express.h"
  6. #include "env:timedate.h"
  7.  
  8.  
  9. static const char VersionTag[] = "\0$VER: "PROGNAME" "REVISION" ("REVDATE")";
  10.  
  11. struct Callers
  12. {
  13.     int        Node;
  14.     char    logintime[10],
  15.             logindate[10],
  16.             logofftime[10],
  17.             logoffdate[10],
  18.             datetoday[10],
  19.             Handle[32],
  20.             Location[32];
  21.     long    days,
  22.             hours,
  23.             minutes,
  24.             connect;
  25.     ULONG    upbytes,
  26.             downbytes,
  27.             upfiles,
  28.             downfiles,
  29.             todaybytes,
  30.             todayfiles;
  31.     BOOL    losscarrier,
  32.             upfailed,
  33.             downfailed,
  34.             hack,
  35.             paged,
  36.             newuser,
  37.             locallogin;
  38.     char    space[48];
  39. };
  40.  
  41. struct Top
  42. {
  43.     char    day[10];
  44.     ULONG    upbytestoday,
  45.             upfilestoday,
  46.             downbytestoday,
  47.             downfilestoday,
  48.             upbytesyest,
  49.             upfilesyest,
  50.             downbytesyest,
  51.             downfilesyest,
  52.             topupfiles,
  53.             topupbytes,
  54.             topdownfiles,
  55.             topdownbytes,
  56.             callers,
  57.             callersyest,
  58.             callerstop,
  59.             minstoday,
  60.             hourstoday,
  61.             minsyest,
  62.             hoursyest,
  63.             topmins,
  64.             tophours;
  65. };
  66.  
  67. void main( int argc, char *argv[] )
  68. {
  69.     BOOL    losscarrier=FALSE,
  70.             hack=FALSE,paged=FALSE,newuser=FALSE,locallogin=FALSE,
  71.             nolocal=FALSE,nosysop=FALSE,nodefound=FALSE,out=FALSE,notadding=FALSE,
  72.             logofft=FALSE,notop=FALSE;
  73.     char    buffer[255],buffer2[255],*p=NULL,**filenames=NULL,logintime[15]="",
  74.             logindate[15]="",logofftime[15]="",logoffdate[15]="",
  75.             lc='-',uf='-',df='-',ha='-',pa='-',new='-',
  76.             connectstr[10]="",outfile[100]="",programdir[100]="",
  77.             downstring[20]="",upstring[20]="";
  78.     BPTR    fh=NULL,lock=0,writefh=NULL;
  79.     long    position=0,upfiles=0,downfiles=0,connect=0,pos=0,
  80.             downfailed=0,upfailed=0,usernumber=0,size=0,days=0,hours=0,minutes=0;
  81.     ULONG    upbytes=0,downbytes=0;
  82.     struct    User    *user=NULL;
  83.     struct DateTime *time=NULL,*time2=NULL;
  84.     struct DateStamp *loginstmp=NULL,*logoffstmp=NULL;
  85.     int        nodenr=0,listnumber=10;
  86.     struct Callers    *caller=NULL,*caller2=NULL;
  87.     struct Top *top=NULL;
  88.  
  89.     if (argc==1 || strcmp(argv[1],"?")==0 )
  90.     {
  91.         printf("LastCallers ©1996 by Joe Cool\n");
  92.         printf("`-> Usage: LastCallers <Nodenumber> [options]\n");
  93.         printf("Options:\n");
  94.         printf("NOLOCAL               Don`t add Local Calls to LastCallers\n");
  95.         printf("NOSYSOP               Don`t add Sysop Calls to Lastcallers\n");
  96.         printf("Node <nr>             Nodenumber\n");
  97.         printf("Number <nr>           Number of LastCallers\n");
  98.         printf("Bull <path+filename>  Output the Data to file\n");
  99.         exit(0);
  100.     }    
  101.  
  102.     top=(struct Top *)AllocMem(sizeof(struct Top),MEMF_PUBLIC|MEMF_CLEAR);                        
  103.     user=(struct User *) AllocMem(sizeof (struct User),MEMF_PUBLIC|MEMF_CLEAR);                        
  104.     caller=(struct Callers *) AllocMem(sizeof (struct Callers),MEMF_PUBLIC|MEMF_CLEAR);                        
  105.     caller2=(struct Callers *) AllocMem(sizeof (struct Callers),MEMF_PUBLIC|MEMF_CLEAR);                        
  106. exit(0);
  107.     for(pos=1;pos<argc;pos++)
  108.     {
  109.         strcpy(buffer,argv[pos]);
  110.         upperstring(buffer);
  111.         if (strcmp(buffer,"NOLOCAL")==0) nolocal=TRUE;
  112.         if (strcmp(buffer,"NOSYSOP")==0) nosysop=TRUE;
  113.         if (strcmp(buffer,"NODE")==0)
  114.         {
  115.             if (argc>pos+1)
  116.             {
  117.                 nodenr=atoi(argv[pos+1]);
  118.                 nodefound=TRUE;
  119.             }
  120.         }
  121.         if (strcmp(buffer,"NUMBER")==0)
  122.         {
  123.             if (argc>pos+1)
  124.             {
  125.                 listnumber=atoi(argv[pos+1]);
  126.                 if (!listnumber) listnumber=10;
  127.             }
  128.         }
  129.         if (strcmp(buffer,"BULL")==0)
  130.         {
  131.             if (argc>pos+1)
  132.             {
  133.                     strcpy(outfile,argv[pos+1]);
  134.                 out=TRUE;
  135.             }
  136.         }
  137.     }
  138.  
  139.     if (!nodefound) exit(0);
  140.  
  141.  
  142.     lock=GetProgramDir();
  143.     if (lock)
  144.     {
  145.         NameFromLock(lock,programdir,100);
  146.         UnLock(lock);
  147.     }
  148.  
  149.     sprintf(buffer,"bbs:node%d/Callerslog",nodenr);
  150.     fh=Open(buffer,MODE_OLDFILE);
  151.     if (!fh) exit(0);
  152.     
  153.     position=Seek(fh,-15000,OFFSET_END);
  154.  
  155.     while(FGets(fh,buffer,254))
  156.     {    
  157.         if (strncmp(buffer,"**********",10)==0)
  158.         {
  159.             position=Seek(fh,0,OFFSET_CURRENT);
  160.         }
  161.     }    
  162.  
  163.     Seek(fh,position,OFFSET_BEGINNING);
  164.     while(FGets(fh,buffer,254))
  165.     {
  166.         if (buffer[2]=='-' && buffer[5]=='-' && buffer[8]==' ' && buffer[9]=='(' && buffer[12]==':' && buffer[15]==':' && buffer[18]==')')
  167.         {
  168.             if (logintime[0]=='\0')
  169.             {
  170.                 strncpy(logintime,buffer+10,8);
  171.                 logintime[8]='\0';
  172.                 strncpy(logindate,buffer,8);
  173.                 logindate[8]='\0';
  174.             }
  175.             else
  176.             {
  177.                 logofft=TRUE;
  178.                 strncpy(logofftime,buffer+10,8);
  179.                 logofftime[8]='\0';
  180.                 strncpy(logoffdate,buffer,8);
  181.                 logoffdate[8]='\0';
  182.             }
  183.         }
  184.     
  185.         if (!connect)
  186.         {
  187.             strcpy(buffer2,buffer);
  188.             upperstring(buffer2);
  189.             p=strstr(buffer2,"CONNECT");
  190.             if (p)
  191.             {
  192.                 p+=8;
  193.                 connect=atoi(p);
  194.                 locallogin=FALSE;
  195.             }
  196.             p=strstr(buffer2,"(SYSOP_LO");
  197.             if (p)
  198.             {
  199.                 connect=1;
  200.                 locallogin=TRUE;
  201.             }
  202.             p=strstr(buffer2,"(F2_LOCAL");
  203.             if (p)
  204.             {
  205.                 connect=1;
  206.                 locallogin=TRUE;
  207.             }
  208.         }    
  209.         if (!usernumber)
  210.         {
  211.             if (strlen(buffer) >23)
  212.             {
  213.                 if (buffer[2]=='-' & buffer[5]=='-' && buffer[9]=='(' && buffer[12]==':' && buffer[15]==':' && buffer[18]==')') 
  214.                 {
  215.                     if (buffer[20]=='[')
  216.                     {
  217.                         usernumber=atoi(buffer+21);
  218.                     }
  219.                     if (buffer[20]=='N' && buffer[21]=='E' && buffer[22]=='W')
  220.                     {
  221.                         usernumber=atoi(buffer+25);
  222.                         newuser=TRUE;
  223.                     }
  224.                 }
  225.             }
  226.         }
  227.             
  228.     
  229.  
  230.         if (strstr(buffer,"Uploading") && strstr(buffer,"bytes"))
  231.         {
  232.             p=strstr(buffer,"Uploading");
  233.             for (pos=10;p[pos]!=' ';pos++);
  234.             upbytes+=atoi(p+pos+1);
  235.             upfiles++;    
  236.             upfailed=FALSE;                
  237.         }
  238.         if (strstr(buffer,"Downloading") && strstr(buffer,"bytes"))
  239.         {
  240.             p=strstr(buffer,"Downloading");
  241.             for (pos=12;p[pos]!=' ';pos++);
  242.             downbytes+=atoi(p+pos+1);
  243.             downfiles++;
  244.             downfailed=FALSE;
  245.         }
  246.         if (strstr(buffer,"Download Failed")) downfailed=TRUE;
  247.         if (strstr(buffer,"Upload Failed"))    upfailed=TRUE;
  248.         if (strstr(buffer,"Off Loss Carrier")) losscarrier=TRUE;
  249.         if (strstr(buffer,"Password Failure")) hack=TRUE;
  250.         if (strstr(buffer,"Operator Paged")) paged=TRUE;
  251.     }
  252.                     
  253.     if (fh) Close(fh);
  254.     if (nolocal && locallogin) notadding=TRUE;
  255.     if (nosysop && usernumber==1) notadding=TRUE;
  256.  
  257.     if (!notadding)
  258.     {
  259.  
  260.         fh=Open("bbs:user.data",MODE_OLDFILE);
  261.         Seek(fh,(usernumber-1)*sizeof(struct User),OFFSET_BEGINNING);
  262.         Read(fh,user,sizeof(struct User));
  263.         Close(fh);
  264.         
  265.         if (logofft &&logofftime[0]!=0 && logoffdate[0]!=0 && logintime[0]!=0 && logindate[0]!=0)
  266.         {    
  267.             time=(struct DateTime *) malloc (sizeof(struct DateTime));
  268.             time2=(struct DateTime *) malloc (sizeof(struct DateTime));
  269.  
  270.             time->dat_Format=FORMAT_USA;
  271.             time->dat_Flags=DTF_SUBST;
  272.             time->dat_StrDay=NULL;
  273.             time->dat_StrDate=logindate;
  274.             time->dat_StrTime=logintime;
  275.     
  276.             StrToDate(time);    
  277.  
  278.             time2->dat_Format=FORMAT_USA;
  279.             time2->dat_Flags=DTF_SUBST;
  280.             time2->dat_StrDay=NULL;
  281.             time2->dat_StrDate=logoffdate;
  282.             time2->dat_StrTime=logofftime;
  283.     
  284.             StrToDate(time2);
  285.  
  286.             loginstmp=&time->dat_Stamp;
  287.             logoffstmp=&time2->dat_Stamp;
  288.  
  289.             days=logoffstmp->ds_Days-loginstmp->ds_Days;
  290.             minutes=logoffstmp->ds_Minute-loginstmp->ds_Minute;
  291.             if (!minutes) minutes=1;
  292.             if (minutes<0) 
  293.             {
  294.                 minutes+=(24*60);
  295.                 days--;
  296.             }
  297.             
  298.         
  299.             if (minutes>60) 
  300.             {
  301.                 hours=minutes/60;
  302.                 minutes=minutes%60;
  303.             }
  304.  
  305.             free(time);
  306.             free(time2);
  307.         }    
  308.         else 
  309.         {    
  310.             days=0;
  311.             hours=0;
  312.             minutes=0;
  313.         }
  314.  
  315.         caller->Node=nodenr;
  316.         caller->connect=connect;
  317.         strcpy(caller->Handle,user->Name);
  318.         strcpy(caller->Location,user->Location);
  319.         caller->upfiles=upfiles;
  320.         caller->upbytes=upbytes;
  321.         caller->downfiles=downfiles;
  322.         caller->downbytes=downbytes;
  323.         caller->losscarrier=losscarrier;
  324.         caller->upfailed=upfailed;
  325.         caller->downfailed=downfailed;
  326.         caller->hack=hack;
  327.         caller->paged=paged;
  328.         caller->newuser=newuser;
  329.         strcpy(caller->logintime,logintime);
  330.         strcpy(caller->logindate,logindate);
  331.         strcpy(caller->logofftime,logofftime);
  332.         strcpy(caller->logoffdate,logoffdate);
  333.         caller->days=days;
  334.         caller->hours=hours;
  335.         caller->minutes=minutes;
  336.         caller->locallogin=locallogin;
  337.  
  338.  
  339.         sprintf(buffer,"%s/lastcallers.data",programdir);
  340.         fh=Open(buffer,MODE_READWRITE);
  341.         if (!fh) fh=Open(buffer,MODE_NEWFILE);
  342.         if (!fh) exit(0);
  343.         if (fh)
  344.         {    
  345.             Seek(fh,0,OFFSET_END);
  346.             size=Seek(fh,0,OFFSET_CURRENT);
  347.         
  348.             if ((size/sizeof(struct Callers))<listnumber)
  349.             {
  350.                 if ((size/sizeof(struct Callers))<1)
  351.                 {
  352.                     Write(fh,caller,sizeof(struct Callers));
  353.                 }
  354.                 else
  355.                 {
  356.                     Seek(fh,0,OFFSET_END);
  357.                     Write(fh,caller,sizeof(struct Callers));
  358.                     for (pos=0;pos<(size/sizeof(struct Callers));pos++)
  359.                     {
  360.                         Seek(fh,(-1)*(pos+2)*sizeof(struct Callers),OFFSET_END);
  361.                         Read(fh,caller2,sizeof(struct Callers));
  362.                         Seek(fh,(-1)*(pos+1)*sizeof(struct Callers),OFFSET_END);
  363.                            Write(fh,caller2,sizeof(struct Callers));
  364.                     }
  365.                     Seek(fh,0,OFFSET_BEGINNING);
  366.                     Write(fh,caller,sizeof(struct Callers));
  367.                 }
  368.             }
  369.             else
  370.             {
  371.                 for (pos=0;pos<(size/sizeof(struct Callers));pos++)
  372.                 {
  373.                     Seek(fh,(-1)*(pos+2)*sizeof(struct Callers),OFFSET_END);
  374.                     Read(fh,caller2,sizeof(struct Callers));
  375.                     Seek(fh,(-1)*(pos+1)*sizeof(struct Callers),OFFSET_END);
  376.                            Write(fh,caller2,sizeof(struct Callers));
  377.                 }
  378.                 Seek(fh,0,OFFSET_BEGINNING);
  379.                 Write(fh,caller,sizeof(struct Callers));
  380.             }            
  381.             if (fh) Close(fh);
  382.         }    
  383.     }
  384.  
  385.     sprintf(buffer,"%s/lastcallers.top",programdir);
  386.     fh=Open(buffer,MODE_READWRITE);
  387.     pos=0;
  388.     while (!fh && pos<60)
  389.     {
  390.         pos++;
  391.         fh=Open(buffer,MODE_READWRITE);
  392.         if (!fh) Delay(30);
  393.     }
  394.     if (!Read(fh,top,sizeof(struct Top))) notop=TRUE;
  395.  
  396.     if (notop)
  397.     {
  398.         strcpy(top->day,logoffdate);
  399.         top->upbytestoday=0;
  400.         top->upfilestoday=0;
  401.         top->downbytestoday=0;
  402.         top->downfilestoday=0;
  403.         top->upbytesyest=0;
  404.         top->upfilesyest=0;
  405.         top->downbytesyest=0;
  406.         top->downfilesyest=0;
  407.         top->topupfiles=0;
  408.         top->topupbytes=0;
  409.         top->topdownfiles=0;
  410.         top->topdownbytes=0;
  411.         top->callers=0;
  412.         top->callersyest=0;
  413.         top->callerstop=0;
  414.         top->minstoday=0;
  415.         top->hourstoday=0;
  416.         top->minsyest=0;
  417.         top->hoursyest=0;
  418.         top->topmins=0;
  419.         top->tophours=0;
  420.     }
  421.     if (0==strcmp(top->day,logoffdate))
  422.     {
  423.         if (!notadding)
  424.         {
  425.             top->upbytestoday+=upbytes;
  426.             top->upfilestoday+=upfiles;
  427.             top->downbytestoday+=downbytes;
  428.             top->downfilestoday+=downfiles;
  429.             top->callers++;
  430.             top->minstoday+=(top->hourstoday)*60;
  431.             top->minstoday+=minutes+(60*hours);
  432.             top->hourstoday=top->minstoday/60;
  433.             top->minstoday=top->minstoday%60;
  434.         }
  435.  
  436.         if (top->upbytestoday>top->topupbytes) top->topupbytes=top->upbytestoday;
  437.         if (top->upfilestoday>top->topupfiles) top->topupfiles=top->upfilestoday;
  438.         if (top->downbytestoday>top->topdownbytes) top->topdownbytes=top->downbytestoday;
  439.         if (top->downfilestoday>top->topdownfiles) top->topdownfiles=top->downfilestoday;
  440.         if (top->callerstop<top->callers) top->callerstop=top->callers;
  441.         if ((((top->tophours)*60)+top->topmins)<((top->hourstoday*60)+top->minstoday))
  442.         {
  443.             top->tophours=top->hourstoday;
  444.             top->topmins=top->minstoday;
  445.         }
  446.     }
  447.     else
  448.     {
  449.         top->upbytesyest=top->upbytestoday;
  450.         top->upfilesyest=top->upfilestoday;
  451.         top->downbytesyest=top->downbytestoday;
  452.         top->downfilesyest=top->downfilestoday;    
  453.         top->callersyest=top->callers;
  454.         top->minsyest=top->minstoday;
  455.         top->hoursyest=top->hourstoday;
  456.  
  457.         top->upbytestoday=upbytes;
  458.         top->upfilestoday=upfiles;
  459.         top->downbytestoday=downbytes;
  460.         top->downfilestoday=downfiles;
  461.         top->minstoday=minutes;
  462.         top->hourstoday=hours;
  463.  
  464.         strcpy(top->day,caller->logoffdate);
  465.         top->callers=1;
  466.     }
  467.     Seek(fh,0,OFFSET_BEGINNING);
  468.     Write(fh,top,sizeof(struct Top));
  469.     Close(fh);
  470.  
  471.     if (out)
  472.     {
  473.         writefh=NULL;
  474.         fh=NULL;
  475.     
  476.         sprintf(buffer,"%s/lastcallers.data",programdir);
  477.         fh=Open(buffer,MODE_READWRITE);
  478.         if (fh)
  479.         {
  480.             writefh=Open(outfile,MODE_NEWFILE);
  481.             if (!writefh) 
  482.             {
  483.                 Close(fh);
  484.                 exit(0);
  485.             }
  486.             FPuts(writefh,"c\n");
  487.             FPuts(writefh,"================.=====.========================.============.================\n");
  488.             FPuts(writefh,"___ _j\\_________|\\   /|______ ____   _________/| ___ _______)\\ ______  .___\n");
  489.             FPuts(writefh,"7 7 7 . 7  _(__ __) (__ __)__)   7  :  __) . 7 : 7 7 7 __)  _ )  ___7  |  7\n");
  490.             FPuts(writefh,": l_j ` :._ 7 7 7     7 7| _)j l |  | (__l ` : l_l l_| _)j    \\____ |  l__:\n");
  491.             FPuts(writefh,"l___)_;_j___j l_j     l_jl___)_j_j  l___ )_!_j___)___)___)__\\__) ___j  l__j\n");
  492.             FPuts(writefh,".----------------------------Y---------|/--------Y-------------\\(------------.\n");
  493.             FPuts(writefh,"[BD][N][USERNAME]         [LOCATION]   `    [LOGON][OT][FLAGS] [UL-KB][DL-KB]\n");
  494.  
  495.             while(Read(fh,caller,sizeof(struct Callers)))
  496.             {
  497.                 lc='-';uf='-';df='-';ha='-';pa='-';new=' ';
  498.                 if (caller->losscarrier)    lc='C';
  499.                 if (caller->upfailed)        uf='u';
  500.                 if (caller->downfailed)        df='d';
  501.                 if (caller->hack)            ha='H';
  502.                 if (caller->paged)            pa='O';
  503.                 if (caller->newuser)        new='*';
  504.                 if ((!caller->upfailed) && (caller->upfiles))        uf='U';
  505.                 if ((!caller->downfailed)&&(caller->downfiles))    df='D';
  506.                 if (caller->locallogin)    strcpy(connectstr,"locl");
  507.                 else            sprintf(connectstr,"%4.1f",(float)(caller->connect/1000.0));
  508.             
  509.                 if (caller->upbytes) sprintf(upstring,"%db",caller->upbytes);
  510.                 else strcpy(upstring,"");
  511.  
  512.                 if (caller->upbytes>1024) 
  513.                 {    
  514.                     sprintf(upstring,"%3dk",caller->upbytes/1024);
  515.                     caller->upbytes/=1024;
  516.                 }
  517.                 if (caller->upbytes>1024) 
  518.                 {    
  519.                     sprintf(upstring,"%-3.1fm",caller->upbytes/1024.0);
  520.                     caller->upbytes/=1024;
  521.                 }
  522.  
  523.                 if (caller->downbytes) sprintf(downstring,"%db",caller->downbytes);
  524.                 else strcpy(downstring,"");
  525.  
  526.                 if (caller->downbytes>1024) 
  527.                 {    
  528.                     sprintf(downstring,"%3dk",caller->downbytes/1024);
  529.                     caller->downbytes/=1024;
  530.                 }
  531.                 if (caller->downbytes>1024) 
  532.                 {    
  533.                     sprintf(downstring,"%-3.1fm",caller->downbytes/1024.0);
  534.                     caller->downbytes/=1024;
  535.                 }
  536.  
  537.  
  538.                 sprintf(buffer,"%4.4s %d%c%-18.18s %-18.18s %5.5s%2d:%2.2d[%c%c%c%c%c%6.6s %6.6s\n",connectstr,caller->Node,new,caller->Handle,caller->Location,caller->logintime,caller->hours,caller->minutes,lc,uf,df,ha,pa,upstring,downstring);
  539.                 FPuts(writefh,buffer);    
  540.                         
  541.  
  542.             }
  543.             if (writefh)
  544.             {
  545.                 FPuts(writefh,"------------------------------------------------CALLERS-O-RADO by jOE cOOL---'\n");
  546.                 sprintf(buffer,"  today       Call: %4d   up: %4d/%4dmB   down: %4d/%4dmb   time:%3d:%2.2d\n",top->callers,top->upfilestoday,top->upbytestoday/1024/1024,top->downfilestoday,top->downbytestoday/1024/1024,top->hourstoday,top->minstoday);
  547.                 FPuts(writefh,buffer);    
  548.                 sprintf(buffer,"  yesterday   Call: %4d   up: %4d/%4dmB   down: %4d/%4dmb   time:%3d:%2.2d\n",top->callersyest,top->upfilesyest,top->upbytesyest/1024/1024,top->downfilesyest,top->downbytesyest/1024/1024,top->hoursyest,top->minsyest);
  549.                 FPuts(writefh,buffer);    
  550.                 sprintf(buffer,"  top         Call: %4d   up: %4d/%4dmB   down: %4d/%4dmb   time:%3d:%2.2d\n",top->callerstop,top->topupfiles,top->topupbytes/1024/1024,top->topdownfiles,top->topdownbytes/1024/1024,top->tophours,top->topmins);
  551.                 FPuts(writefh,buffer);    
  552.                 FPuts(writefh,"`----------------------------------------------------------------------------'\n\n");
  553.                 Close(writefh);
  554.  
  555.             }
  556.             printf("Close\n");
  557.             Close(fh);
  558.         }
  559.  
  560.     }
  561.  
  562.     FreeMem(user,sizeof(struct User));
  563.     FreeMem(caller,sizeof(struct Callers));
  564.     FreeMem(caller2,sizeof(struct Callers));
  565.     FreeMem(top,sizeof(struct Top));
  566. }