Subversion Repositories Kolibri OS

Rev

Rev 4565 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. //HTML Viewer in C--
  2. //Copyright 2007-2013 by Veliant & Leency
  3. //Asper, lev, Lrz, Barsuk, Nable...
  4. //home icon - rachel fu, GPL licence
  5.  
  6. #ifndef AUTOBUILD
  7.         #include "lang.h--"
  8. #endif
  9.  
  10. //libraries
  11. #define MEMSIZE 0x100000
  12. #include "..\lib\kolibri.h"
  13. #include "..\lib\strings.h"
  14. #include "..\lib\figures.h"
  15. #include "..\lib\encoding.h"
  16. #include "..\lib\file_system.h"
  17. #include "..\lib\mem.h"
  18. #include "..\lib\dll.h"
  19. #include "..\lib\draw_buf.h"
  20. #include "..\lib\list_box.h"
  21. #include "..\lib\cursor.h"
  22.  
  23. //*.obj libraries
  24. #include "..\lib\lib.obj\box_lib.h"
  25. #include "..\lib\lib.obj\libio_lib.h"
  26. #include "..\lib\lib.obj\libimg_lib.h"
  27. #include "..\lib\lib.obj\http.h"
  28. //images
  29. #include "img\toolbar_icons.c"
  30. #include "img\URLgoto.txt";
  31.  
  32. #ifdef LANG_RUS
  33.         char version[]=" ’¥ªáâ®¢ë© ¡à ã§¥à 0.99.67";
  34.         ?define IMAGES_CACHE_CLEARED "Šíè ª à⨭®ª ®ç¨é¥­"
  35.         ?define T_LAST_SLIDE "â® ¯®á«¥¤­¨© á« ©¤"
  36.         char loading[] = "‡ £à㧪  áâà ­¨æë...<br>";
  37.         unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm";
  38.         char accept_language[]= "Accept-Language: ru\n\0";
  39. #else
  40.         char version[]=" Text-based Browser 0.99.67";
  41.         ?define IMAGES_CACHE_CLEARED "Images cache cleared"
  42.         ?define T_LAST_SLIDE "This slide is the last"
  43.         char loading[] = "Loading...<br>";
  44.         unsigned char page_not_found[] = FROM "html\page_not_found_en.htm";
  45.         char accept_language[]= "Accept-Language: en\n\0";     
  46. #endif
  47.  
  48. byte native_http=1;
  49.  
  50. proc_info Form;
  51. #define WIN_W 640
  52. #define WIN_H 480
  53.  
  54. char search_path[]="http://nigma.ru/index.php?s=";
  55. char str_location[]="location\0";
  56. int redirected = 0;
  57.  
  58. char stak[4096];
  59. mouse m;
  60. int action_buf;
  61.  
  62. dword http_transfer = 0;
  63. dword http_buffer;
  64.  
  65. int     downloader_id;
  66.  
  67. #include "..\TWB\TWB.c"
  68. #include "menu_rmb.h"
  69.  
  70. char editURL[sizeof(URL)];
  71. int     mouse_twb;
  72. edit_box address_box= {250,207,16,0xffffff,0x94AECE,0xffffff,0xffffff,0,sizeof(URL),#editURL,#mouse_twb,2,19,19};
  73.  
  74. #define URL_HISTORY "WebView://history"
  75.  
  76. enum { BACK=300, FORWARD, REFRESH, HOME, NEWTAB, GOTOURL, SEARCHWEB, INPUT_CH, INPUT_BT, BTN_UP, BTN_DOWN };
  77.  
  78.  
  79. void main()
  80. {
  81.         int key, btn;
  82.         int half_scroll_size;
  83.         int scroll_used=0, show_menu;
  84.        
  85.         mem_Init();
  86.         CursorPointer.Load(#CursorFile);
  87.         if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
  88.         if (load_dll2(libio, #libio_init,1)!=0) notify("Error: library doesn't exists - libio");
  89.         if (load_dll2(libimg, #libimg_init,1)!=0) notify("Error: library doesn't exists - libimg");
  90.         if (load_dll2(libHTTP, #http_lib_init,1)!=0) notify("Error: library doesn't exists - http");
  91.        
  92.         if (!URL) strcpy(#URL, "/sys/index.htm");
  93.         Form.width=WIN_W;
  94.         Form.height=WIN_H;
  95.         SetElementSizes();
  96.         OpenPage();
  97.  
  98.         SetEventMask(0xa7);
  99.         loop()
  100.         {
  101.                 WaitEventTimeout(2);
  102.                 switch(EAX & 0xFF)
  103.                 {
  104.                         CASE evMouse:
  105.                                 if (!CheckActiveProcess(Form.ID)) break;
  106.  
  107.                                 edit_box_mouse stdcall (#address_box);
  108.  
  109.                                 m.get();
  110.                                 if (m.y>WB1.list.y) PageLinks.Hover(m.x, m.y, link_color_inactive, link_color_active, bg_color);
  111.                                
  112.                                 if (m.y>WB1.list.y) && (m.y<Form.height) && (bufsize)
  113.                                 {
  114.                                         if (m.pkm)
  115.                                         {
  116.                                                 show_menu = 1;
  117.                                         }
  118.                                         if (!m.pkm) && (show_menu)
  119.                                         {
  120.                                                 show_menu = 0;
  121.                                                 SwitchToAnotherThread();
  122.                                                 CreateThread(#menu_rmb,#stak+4092);
  123.                                                 break;
  124.                                         }
  125.                                 }
  126.  
  127.                                 if (m.vert)
  128.                                 {
  129.                                         if (WB1.list.MouseScroll(m.vert)) WB1.Parse(bufpointer, bufsize);
  130.                                 }
  131.                                
  132.                                 if (!m.lkm) scroll_used=0;
  133.                                 if (m.x>=scroll_wv.start_x) && (m.x<=scroll_wv.start_x+scroll_wv.size_x)
  134.                                 && (m.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>m.y)
  135.                                 && (WB1.list.count>WB1.list.visible) && (m.lkm)
  136.                                 {
  137.                                         scroll_used=1;
  138.                                 }
  139.                                
  140.                                 if (scroll_used)
  141.                                 {
  142.                                         half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2;
  143.                                         if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y;
  144.                                         btn=WB1.list.first;
  145.                                         WB1.list.first = m.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
  146.                                         if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible;
  147.                                         if (btn<>WB1.list.first) WB1.Parse(bufpointer, bufsize);
  148.                                 }
  149.  
  150.                                 break;
  151.                         case evButton:
  152.                                 btn=GetButtonID();
  153.                                 if (btn==1)
  154.                                 {
  155.                                         KillProcess(downloader_id);
  156.                                         ExitProcess();
  157.                                 }
  158.                                 ELSE
  159.                                 {
  160.                                         Scan(btn);
  161.                                 }
  162.                                 break;
  163.                         case evKey:
  164.                                 key = GetKey();
  165.                                
  166.                                 if (address_box.flags & 0b10) SWITCH(key)
  167.                                         { CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; }
  168.  
  169.                                 Scan(key);
  170.                                
  171.                                 _EDIT_MARK:
  172.                                 if (key<>0x0d) && (key<>183) && (key<>184) {EAX=key<<8; edit_box_key stdcall(#address_box);}
  173.                                 break;
  174.                         case evReDraw:
  175.                                 if (action_buf) { Scan(action_buf); action_buf=0;}
  176.                                 Draw_Window();
  177.                                 break;
  178.                                
  179.                         case evNetwork:
  180.                                 if (http_transfer > 0) {
  181.                                         http_process stdcall (http_transfer);
  182.                                         $push EAX
  183.                                         ESI = http_transfer;
  184.                                         bufpointer = ESI.http_msg.content_ptr;
  185.                                         bufsize = ESI.http_msg.content_received;
  186.                                         WB1.Parse(bufpointer, bufsize);
  187.                                        
  188.                                         $pop EAX       
  189.                                         if (EAX == 0) {
  190.                                                 ESI = http_transfer;
  191.                                                 // Handle redirects
  192.                                                 if (ESI.http_msg.status >= 300) && (ESI.http_msg.status < 400)
  193.                                                 {
  194.                                                         redirected++;
  195.                                                         if (redirected<=5)
  196.                                                         {
  197.                                                                 http_find_header_field stdcall (http_transfer, #str_location);
  198.                                                                 if (EAX!=0) {
  199.                                                                         ESI = EAX;
  200.                                                                         EDI = #URL;
  201.                                                                         do {
  202.                                                                                 $lodsb;
  203.                                                                                 $stosb;
  204.                                                                         } while (AL != 0) && (AL != 13) && (AL != 10));
  205.                                                                         DSBYTE[EDI-1]='\0';
  206.                                                                 }
  207.                                                         }
  208.                                                         else
  209.                                                         {
  210.                                                         //TODO: display error (too many redirects)
  211.                                                         }
  212.                                                 }
  213.                                                 else
  214.                                                 {
  215.                                                         redirected = 0;
  216.                                                 }
  217.                                                 // Loading the page is complete, free resources
  218.                                                 http_free stdcall (http_transfer);
  219.                                                 http_transfer=0;       
  220.                                                 if (redirected>0)
  221.                                                 {
  222.                                                         WB1.GetNewUrl();
  223.                                                         strcpy(#editURL, #URL);
  224.                                                         BrowserHistory.current--;
  225.                                                         OpenPage();
  226.                                                 }
  227.                                                 else
  228.                                                 {
  229.                                                         Draw_Window();          // stop button => refresh button
  230.                                                 }
  231.                                         }
  232.                                 }
  233.                         default:
  234.                                 if (downloader_id<>0)
  235.                                 {
  236.                                         if (GetProcessSlot(downloader_id)<>0) break;
  237.                                         downloader_id=0;
  238.                                         WB1.list.first = WB1.list.count = 0;
  239.                                         WB1.ReadHtml(_WIN);
  240.                                         Draw_Window();
  241.                                 }
  242.                 }
  243.         }
  244. }
  245.  
  246. void SetElementSizes()
  247. {
  248.         address_box.width = Form.width - 266;
  249.         WB1.list.SetSizes(0, 44, Form.width - 10 - scroll_wv.size_x, Form.cheight - 44, 0, 10);
  250.         WB1.list.column_max = WB1.list.w - 30 / 6;
  251.         WB1.list.visible = WB1.list.h - 3 / WB1.list.line_h - 2;
  252.         WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.h, WB1.list.line_h);
  253. }
  254.  
  255.  
  256. void Draw_Window()
  257. {
  258.         int j;
  259.         DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0xE4DFE1,0,0);
  260.  
  261.         GetProcessInfo(#Form, SelfInfo);
  262.         if (Form.status_window>2)
  263.         {
  264.                 DrawTitle(#header);
  265.                 return;
  266.         }
  267.         if (Form.height<120) MoveSize(OLD,OLD,OLD,120);
  268.         if (Form.width<280) MoveSize(OLD,OLD,280,OLD);
  269.        
  270.         PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
  271.         if (GetProcessSlot(downloader_id)<>0) || (http_transfer > 0) _PutImage(88,10, 24,24, #stop_btn);
  272.        
  273.         DrawBar(200,0,Form.cwidth-200,43,0xE4DFE1);
  274.         DrawBar(0,42,Form.cwidth,1,0xE2DBDC);
  275.         DrawBar(0,43,Form.cwidth,1,0xD2CED0);
  276.         for (j=0; j<5; j++) DefineButton(j*37+11, 7, 29, 29, 300+j+BT_HIDE, 0xE4DFE1);
  277.         _PutImage(Form.cwidth-48,14, 40,19, #URLgoto);
  278.         DefineButton(Form.cwidth-28,15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1);
  279.         DefineButton(Form.cwidth-47,15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1);
  280.         DrawRectangle(205,14,Form.cwidth-205-49,18,0x94AECE); //around adress bar
  281.         DrawRectangle(206,15,Form.cwidth-205-50,16,0xE4ECF3);
  282.  
  283.         SetElementSizes();
  284.         ShowPage();
  285.  
  286.         DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+1, 16, 16, BTN_UP+BT_HIDE, 0xE4DFE1);
  287.         DefineButton(scroll_wv.start_x+1, scroll_wv.start_y+scroll_wv.size_y-18, 16, 16, BTN_DOWN+BT_HIDE, 0xE4DFE1);
  288. }
  289.  
  290.  
  291. void Scan(int id)
  292. {
  293.         if (id >= 400) ProcessLinks(id);
  294.        
  295.         switch (id)
  296.         {
  297.                 case 011: //Ctrk+K
  298.                         WB1.ReadHtml(_KOI);
  299.                         WB1.Parse(bufpointer, bufsize);
  300.                         return;
  301.  
  302.                 case 021: //Ctrl+U
  303.                         WB1.ReadHtml(_UTF);
  304.                         WB1.Parse(bufpointer, bufsize);
  305.                         return;
  306.  
  307.                 case 004: //Ctrl+D
  308.                         WB1.ReadHtml(_DOS);
  309.                         WB1.Parse(bufpointer, bufsize);
  310.                         return;
  311.  
  312.                 case 005: //Win encoding
  313.                         WB1.ReadHtml(_WIN);
  314.                         WB1.Parse(bufpointer, bufsize);
  315.                         return;
  316.  
  317.                 case 009: //free img cache
  318.                         ImgCache.Free();
  319.                         notify(IMAGES_CACHE_CLEARED);
  320.                         WB1.Parse(bufpointer, bufsize);
  321.                         return;
  322.  
  323.                 case 003: //history
  324.                         strcpy(#URL, URL_HISTORY);
  325.                         OpenPage();
  326.                         return;
  327.  
  328.                 case BACK:
  329.                         if (!BrowserHistory.GoBack()) return;
  330.                         OpenPage();
  331.                         return;
  332.                 case FORWARD:
  333.                         if (!BrowserHistory.GoForward()) return;
  334.                         OpenPage();
  335.                         return;
  336.                 case 052:  //F3
  337.                         if (strncmp(#URL,"http:",5)<>0) RunProgram("/rd/1/tinypad", #URL);
  338.                         else RunProgram("/rd/1/tinypad", #download_path);
  339.                         return;
  340.                 case 054: //F5
  341.                         IF(address_box.flags & 0b10) WB1.Parse(bufpointer, bufsize);
  342.                         return;
  343.  
  344.                 case REFRESH:
  345.                         if (http_transfer<>0)
  346.                         {
  347.                                 EAX = http_transfer;
  348.                                 EAX = EAX.http_msg.content_ptr;         // get pointer to data
  349.                                 $push   EAX                                                     // save it on the stack
  350.                                 http_free stdcall (http_transfer);      // abort connection
  351.                                 $pop    EAX                                                    
  352.                                 mem_Free(EAX);                                          // free data
  353.                                 http_transfer=0;
  354.                                 bufsize = 0;
  355.                         }
  356.                         if (GetProcessSlot(downloader_id)<>0)
  357.                         {
  358.                                 KillProcess(downloader_id);
  359.                                 pause(20);
  360.                                 Draw_Window();
  361.                                 return;
  362.                         }
  363.                         anchor_line_num=WB1.list.first;
  364.                         anchor[0]='|';
  365.                         OpenPage();
  366.                         return;
  367.                 case 014:
  368.                 case 020:
  369.                 case NEWTAB:
  370.                         MoveSize(190,80,OLD,OLD);
  371.                         RunProgram(#program_path, #URL);
  372.                         return;
  373.                        
  374.                 case HOME:
  375.                         strcpy(#editURL, "http://kolibrios.org/");
  376.                 case GOTOURL:
  377.                 case 0x0D: //enter
  378.                         if ((strstr(#editURL,"ttp://")==0) && (editURL[0]!='/')) strcpy(#URL,"http://"); else URL[0] = 0;
  379.                         strcat(#URL, #editURL);
  380.                         OpenPage();
  381.                         return;
  382.                 case SEARCHWEB:
  383.                         strcpy(#URL, #search_path);
  384.                         strcat(#URL, #editURL);
  385.                         OpenPage();
  386.                         return;
  387.  
  388.                 case 183: //PgDown
  389.                         if (WB1.list.count < WB1.list.visible) return;
  390.                         IF(WB1.list.first == WB1.list.count - WB1.list.visible) return;
  391.                         WB1.list.first += WB1.list.visible + 2;
  392.                         IF(WB1.list.visible + WB1.list.first > WB1.list.count) WB1.list.first = WB1.list.count - WB1.list.visible;
  393.                         WB1.Parse(bufpointer, bufsize);
  394.                         return;
  395.  
  396.                 case 184: //PgUp
  397.                         if (WB1.list.count < WB1.list.visible) return;
  398.                         IF(WB1.list.first == 0) return;
  399.                         WB1.list.first -= WB1.list.visible - 2;
  400.                         IF(WB1.list.first < 0) WB1.list.first = 0;
  401.                         WB1.Parse(bufpointer, bufsize);
  402.                         return;
  403.  
  404.                 case 178:
  405.                 case BTN_UP:
  406.                         if (WB1.list.first <= 0) return;
  407.                         WB1.list.first--;
  408.                         WB1.Parse(bufpointer, bufsize);
  409.                         return;
  410.  
  411.                 case 177:
  412.                 case BTN_DOWN:
  413.                         if (WB1.list.visible + WB1.list.first >= WB1.list.count) return;
  414.                         WB1.list.first++;
  415.                         WB1.Parse(bufpointer, bufsize);
  416.                         return;
  417.  
  418.                 case 180: //home
  419.                         if (WB1.list.KeyHome()) WB1.Parse(bufpointer, bufsize);
  420.                         return;
  421.  
  422.                 case 181: //end
  423.                         if (WB1.list.count < WB1.list.visible) return;
  424.                         if (WB1.list.KeyEnd()) WB1.Parse(bufpointer, bufsize);
  425.                         return;
  426.         }
  427. }
  428.  
  429.  
  430.  
  431. void ProcessLinks(int id)
  432. {
  433.         strcpy(#URL, PageLinks.GetURL(id-401));
  434.         //$1 - Condition Script
  435.         if (URL[0] == '$')
  436.         {
  437.                 if (URL[1]=='-') && (condition_href) condition_href--;
  438.                 if (URL[1]=='+')
  439.                 {
  440.                         if (condition_href<condition_max) condition_href++; else notify(T_LAST_SLIDE);
  441.                 }
  442.                 if (URL[1]!='-') && (URL[1]!='+') condition_href = atoi(#URL+1);
  443.                 strcpy(#URL, BrowserHistory.CurrentUrl());
  444.                 ShowPage();
  445.                 return;
  446.         }
  447.         //#1
  448.         if (URL[0] == '#')
  449.         {
  450.                 strcpy(#anchor, #URL+strrchr(#URL, '#'));              
  451.                 strcpy(#URL, BrowserHistory.CurrentUrl());
  452.                 WB1.list.first=WB1.list.count-WB1.list.visible;
  453.                 ShowPage();
  454.                 return;
  455.         }
  456.         //liner.ru#1
  457.         if (strrchr(#URL, '#')!=-1)
  458.         {
  459.                 strcpy(#anchor, #URL+strrchr(#URL, '#'));
  460.                 URL[strrchr(#URL, '#')-1] = 0x00;
  461.         }
  462.        
  463.         WB1.GetNewUrl();
  464.        
  465.         if (!strcmp(#URL + strlen(#URL) - 4, ".gif")) || (!strcmp(#URL + strlen(#URL) - 4, ".png")) || (!strcmp(#URL + strlen(#URL) - 4, ".jpg"))
  466.         {
  467.                 //if (strstr(#URL,"http:"))
  468.                 RunProgram("/sys/media/kiv", #URL);
  469.                 strcpy(#editURL, BrowserHistory.CurrentUrl());
  470.                 strcpy(#URL, BrowserHistory.CurrentUrl());
  471.                 return;
  472.         }
  473.         if (!strcmpn(#URL,"mailto:", 7))
  474.         {
  475.                 notify(#URL);
  476.                 strcpy(#editURL, BrowserHistory.CurrentUrl());
  477.                 strcpy(#URL, BrowserHistory.CurrentUrl());
  478.                 return;
  479.         }
  480.  
  481.         OpenPage();
  482.         return;
  483. }
  484.  
  485. void OpenPage()
  486. {
  487.         if (GetProcessSlot(downloader_id)<>0) PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
  488.         KillProcess(downloader_id);
  489.         strcpy(#editURL, #URL);
  490.         BrowserHistory.AddUrl();
  491.         strcpy(#header, #version);
  492.         pre_text =0;
  493.         if (!strncmp(#URL,"http:",5))
  494.         {
  495.                 if (native_http)
  496.                 {
  497.                         http_get stdcall (#URL, #accept_language);     
  498.                         http_transfer = EAX;
  499.                         IF (http_transfer < 0) notify("Error from HTTP lib");
  500.                 }
  501.                 else
  502.                 {
  503.                         KillProcess(downloader_id);
  504.                         DeleteFile(#download_path);
  505.                         downloader_id = RunProgram("/sys/network/downloader", #URL);
  506.                         IF (downloader_id<0) notify("Error running Downloader. Internet unavilable.");
  507.                 }
  508.                 Draw_Window();
  509.                 return;
  510.         }
  511.         WB1.list.first = WB1.list.count =0;
  512.         WB1.ReadHtml(_WIN);
  513.         ShowPage();
  514. }
  515.  
  516. void ShowPage()
  517. {
  518.         address_box.size = address_box.pos = strlen(#editURL);
  519.         address_box.offset=0;
  520.         edit_box_draw stdcall(#address_box);
  521.  
  522.         if (strcmp(#URL, URL_HISTORY)==0) ShowHistory(); else
  523.         if (!bufsize)
  524.         {
  525.                 PageLinks.Clear();
  526.                 if (GetProcessSlot(downloader_id)<>0)
  527.                         WB1.Parse(#loading, sizeof(loading));
  528.                 else
  529.                         WB1.Parse(#page_not_found, sizeof(page_not_found));
  530.         }
  531.         else
  532.                 WB1.Parse(bufpointer, bufsize);
  533.  
  534.         if (!header) strcpy(#header, #version);
  535.         if (!strcmp(#version, #header)) DrawTitle(#header);
  536. }
  537.  
  538. ShowHistory()
  539. {
  540.                 int i;
  541.                 static int history_pointer;
  542.                
  543.                 free(history_pointer);
  544.                 history_pointer = malloc(64000);
  545.                 strcat(history_pointer, " <title>History</title><h1>History</h1>");
  546.                 strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>");
  547.                 for (i=1; i<BrowserHistory.links_count; i++)
  548.                 {
  549.                         strcat(history_pointer, "<a href='");
  550.                         strcat(history_pointer, BrowserHistory.GetUrl(i));
  551.                         strcat(history_pointer, "'>");
  552.                         strcat(history_pointer, BrowserHistory.GetUrl(i));
  553.                         strcat(history_pointer, "</a><br>");
  554.                 }
  555.                 strcat(history_pointer, "</blockquote><h2>Cached images</h2><br>");
  556.                 for (i=1; i<ImgCache.pics_count; i++)
  557.                 {
  558.                         strcat(history_pointer, "<img src='");
  559.                         strcat(history_pointer, #pics[i].path);
  560.                         strcat(history_pointer, "' /><br>");
  561.                         strcat(history_pointer, #pics[i].path);
  562.                 }
  563.                 bufpointer = history_pointer;
  564.                 WB1.Parse(history_pointer, strlen(history_pointer));
  565. }
  566.  
  567.  
  568. stop:
  569.