Subversion Repositories Kolibri OS

Rev

Rev 7300 | Rev 7890 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                                 ;;
  3. ;; Copyright (C) KolibriOS team 2004-2018. All rights reserved.    ;;
  4. ;; Distributed under terms of the GNU General Public License       ;;
  5. ;;                                                                 ;;
  6. ;;  IRC client for KolibriOS                                       ;;
  7. ;;                                                                 ;;
  8. ;;   Written by hidnplayr@kolibrios.org,                           ;;
  9. ;;     text encoder/decoder by Clevermouse.                        ;;
  10. ;;                                                                 ;;
  11. ;;         GNU GENERAL PUBLIC LICENSE                              ;;
  12. ;;          Version 2, June 1991                                   ;;
  13. ;;                                                                 ;;
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15.  
  16. version equ '0.31'
  17.  
  18. ; connection status
  19. STATUS_DISCONNECTED     = 0
  20. STATUS_RESOLVING        = 1
  21. STATUS_CONNECTING       = 2
  22. STATUS_CONNECTED        = 3
  23. STATUS_LOGGED_IN        = 4
  24.  
  25. ; window flags
  26. FLAG_UPDATED            = 1 shl 0
  27. FLAG_RECEIVING_NAMES    = 1 shl 1
  28. FLAG_SCROLL_LOW         = 1 shl 2
  29.  
  30. ; window types
  31. WINDOWTYPE_NONE         = 0
  32. WINDOWTYPE_SERVER       = 1
  33. WINDOWTYPE_CHANNEL      = 2
  34. WINDOWTYPE_CHAT         = 3
  35. WINDOWTYPE_LIST         = 4
  36. WINDOWTYPE_DCC          = 5
  37.  
  38. ; supported encodings
  39. CP866                   = 0
  40. CP1251                  = 1
  41. UTF8                    = 2
  42.  
  43. ; settings
  44. USERCMD_MAX_SIZE        = 400
  45.  
  46. WIN_MIN_X               = 600
  47. WIN_MIN_Y               = 183
  48.  
  49. TEXT_X                  = 2
  50. TEXT_Y                  = TOP_Y + 2
  51.  
  52. TOP_SPACE               = 2
  53. TAB_HEIGHT              = 14
  54. TAB_WIDTH               = 120
  55. TAB_SPACE               = 5
  56. TOP_Y                   = TOP_SPACE+ TAB_HEIGHT
  57. INPUTBOX_HEIGHT         = 13
  58.  
  59. MAX_WINDOWS             = 20
  60. MAX_USERS               = 4096
  61. TEXT_BUFFERSIZE         = 1024*1024
  62.  
  63. MAX_NICK_LEN            = 32
  64. MAX_REAL_LEN            = 32    ; realname
  65. QUIT_MSG_LEN            = 250
  66. MAX_SERVER_NAME         = 256
  67.  
  68. MAX_CHANNEL_LEN         = 40
  69. MAX_CHANNELS            = 37
  70.  
  71. MAX_COMMAND_LEN         = 512
  72.  
  73. PACKETBUF_SIZE          = 1024
  74. PATH_SIZE               = 1024
  75. PARAM_SIZE              = 1024
  76. SERVERCOMMAND_SIZE      = 600
  77.  
  78. TIMESTAMP               = 3     ; 3 = hh:mm:ss, 2 = hh:mm, 0 = no timestamp
  79.  
  80. MAX_WINDOWNAME_LEN      = 256
  81.  
  82. WINDOW_BTN_START        = 100
  83. WINDOW_BTN_CLOSE        = 2
  84. WINDOW_BTN_LIST         = 3
  85.  
  86. SCROLLBAR_WIDTH         = 14
  87. USERLIST_WIDTH          = 160
  88.  
  89. FONT_WIDTH              = 8
  90. FONT_HEIGHT             = 16
  91.  
  92. format binary as ""
  93.  
  94. use32
  95.  
  96.         org     0x0
  97.  
  98.         db      'MENUET01'              ; 8 byte id
  99.         dd      1                       ; header version
  100.         dd      START                   ; program start
  101.         dd      I_END                   ; program image size
  102.         dd      IM_END+2048             ; required amount of memory
  103.         dd      IM_END+2048
  104.         dd      param
  105.         dd      path
  106.  
  107. include "../../macros.inc"
  108. include "../../proc32.inc"
  109. include "../../dll.inc"
  110. include "../../network.inc"
  111. include "../../struct.inc"
  112. include "../../develop/libraries/box_lib/trunk/box_lib.mac"
  113.  
  114. struct  window
  115.         data_ptr        dd ?
  116.         flags           db ?
  117.         type            db ?
  118.         name            rb MAX_WINDOWNAME_LEN
  119.         users           dd ?
  120.         users_scroll    dd ?
  121.         selected        dd ?            ; selected user, 0 if none selected
  122.  
  123.         text_start      dd ?            ; pointer to current textbox data
  124.         text_end        dd ?
  125.         text_print      dd ?            ; pointer to first character to print on screen
  126.         text_line_print dd ?            ; line number of that character
  127.         text_write      dd ?            ; write pointer
  128.         text_lines      dd ?            ; total number of lines
  129.         text_scanned    dd ?            ; pointer to beginning of unscanned data (we still need to count number of lines, insert newline characters,..)
  130.  
  131. ends
  132.  
  133. struct  window_data
  134.         text            rb TEXT_BUFFERSIZE
  135.         names           rb MAX_NICK_LEN * MAX_USERS
  136. ends
  137.  
  138. include "encodings.inc"
  139. include "window.inc"
  140. include "serverparser.inc"
  141. include "userparser.inc"
  142. include "socket.inc"
  143. include "gui.inc"
  144. include "users.inc"
  145. include "textbox.inc"
  146.  
  147.  
  148. START:
  149.  
  150.         mcall   68, 11                  ; init heap so we can allocate memory dynamically
  151.  
  152. ; wanted events
  153.         mcall   40, EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_STACK+EVM_MOUSE+EVM_MOUSE_FILTER
  154.  
  155. ; load libraries
  156.         stdcall dll.Load, @IMPORT
  157.         test    eax, eax
  158.         jnz     exit
  159.  
  160. ; find path to main settings file (ircc.ini)
  161.         mov     edi, path               ; Calculate the length of zero-terminated string
  162.         xor     al, al
  163.         mov     ecx, PATH_SIZE
  164.         repne   scasb
  165.         dec     edi
  166.         mov     eax, '.ini'
  167.         stosd
  168.         xor     al, al
  169.         stosb
  170.  
  171. ; Fill the window buffer with zeros
  172.         mov     edi, windows
  173.         mov     ecx, (sizeof.window*MAX_WINDOWS+3)/4
  174.         xor     eax, eax
  175.         rep     stosd
  176.  
  177. ; clear command area too
  178.         mov     edi, servercommand
  179.         mov     ecx, SERVERCOMMAND_SIZE/4
  180.         rep     stosd
  181.  
  182. ; allocate window data block
  183.         mov     ebx, windows
  184.         call    window_create_textbox
  185.         test    eax, eax
  186.         jz      exit
  187.         mov     [ebx + window.type], WINDOWTYPE_SERVER
  188.  
  189. ; get system colors
  190.         mcall   48, 3, colors, 40
  191.  
  192. ; set edit box and scrollbar colors
  193.         mov     eax, [colors.work]
  194.         mov     [scroll1.bg_color], eax
  195.         mov     [scroll2.bg_color], eax
  196.  
  197.         mov     eax, [colors.work_button]
  198.         mov     [scroll1.front_color], eax
  199.         mov     [scroll2.front_color], eax
  200.  
  201.         mov     eax, [colors.work_text]
  202.         mov     [scroll1.line_color], eax
  203.         mov     [scroll2.line_color], eax
  204.  
  205.         mov     [scroll1.type], 1               ; 0 = simple, 1 = skinned
  206.         mov     [scroll2.type], 1
  207.  
  208. ; get settings from ini
  209.         invoke  ini.get_str, path, str_user, str_nick, user_nick, MAX_NICK_LEN, default_nick
  210.         invoke  ini.get_str, path, str_user, str_real, user_real_name, MAX_REAL_LEN, default_real
  211.         invoke  ini.get_str, path, str_user, str_quitmsg, quit_msg, 250, default_quit
  212.  
  213. ; Welcome user
  214.         mov     esi, str_welcome
  215.         call    print_asciiz
  216.  
  217. ; Check if parameter contains an URL
  218.         cmp     byte[param], 0
  219.         je      @f
  220.         mov     esi, param
  221.         mov     ecx, PARAM_SIZE
  222.         call    cmd_usr_server.now
  223.   @@:
  224.  
  225. redraw:
  226.         call    draw_window
  227.  
  228. mainloop:
  229.         mcall   10              ; wait for event
  230.  
  231.         dec     eax
  232.         jz      redraw
  233.  
  234.         dec     eax
  235.         jz      main_window_key
  236.  
  237.         dec     eax
  238.         jz      button
  239.  
  240.         cmp     al, 3
  241.         je      mouse
  242.  
  243.         call    process_network_event
  244.  
  245.         mov     edi, [window_active]
  246.         test    [edi + window.flags], FLAG_UPDATED
  247.         jz      .no_update
  248.         call    draw_channel_text
  249.         mov     edi, [window_active]
  250.         cmp     [edi + window.type], WINDOWTYPE_CHANNEL
  251.         jne     .no_update
  252.         call    draw_user_list
  253.   .no_update:
  254.         call    highlight_updated_tabs
  255.  
  256.         jmp     mainloop
  257.  
  258. button:
  259.  
  260.         mcall   17              ; get id
  261.         ror     eax, 8
  262.  
  263.         cmp     ax, 1           ; close program
  264.         je      quit
  265.  
  266.         cmp     ax, WINDOW_BTN_CLOSE
  267.         jne     @f
  268.         call    cmd_usr_close_window
  269.         jmp     mainloop
  270.  
  271.   @@:
  272.         cmp     ax, WINDOW_BTN_LIST
  273.         jne     @f
  274.  
  275.         push    eax
  276.  
  277.         mcall   37, 1           ; Get mouse position
  278.         sub     ax, TEXT_Y
  279.         mov     bl, FONT_HEIGHT
  280.         div     bl
  281.         and     eax, 0x000000ff
  282.         inc     eax
  283.         add     eax, [scroll1.position]
  284.         mov     ebx, [window_active]
  285.         mov     [ebx + window.selected], eax
  286.  
  287.         call    draw_user_list
  288.  
  289.         pop     eax
  290.         test    eax, 1 shl 25   ; Right mouse button pressed?
  291.         jz      mainloop
  292.  
  293. ; TODO: check if selected nick is my nick!
  294.  
  295. ; Right mouse BTN was pressed, open chat window
  296.         mov     ebx, [window_active]
  297.         mov     eax, [ebx + window.selected]
  298.         dec     eax
  299.         imul    eax, MAX_NICK_LEN
  300.         mov     ebx, [ebx + window.data_ptr]
  301.         lea     esi, [ebx + window_data.names + eax]
  302. ; Strip user prefixes
  303.         cmp     byte[esi], '~'
  304.         je      .inc
  305.         cmp     byte[esi], '&'
  306.         je      .inc
  307.         cmp     byte[esi], '@'
  308.         je      .inc
  309.         cmp     byte[esi], '%'
  310.         je      .inc
  311.         cmp     byte[esi], '+'
  312.         je      .inc
  313.   .open:
  314.         call    window_open
  315.         test    ebx, ebx
  316.         jz      mainloop
  317.         mov     [window_active], ebx
  318.         call    redraw
  319.  
  320.         jmp     mainloop
  321.   .inc:
  322.         inc     esi
  323.         jmp     .open
  324.  
  325.   @@:
  326.         sub     ax, WINDOW_BTN_START
  327.         jb      quit
  328.  
  329.         cmp     ax, MAX_WINDOWS
  330.         ja      quit
  331.  
  332. ; Save users scrollbar position
  333.         push    [scroll1.position]
  334.         mov     edx, [window_active]
  335.         pop     [edx + window.users_scroll]
  336.  
  337. ; OK, time to switch to another window.
  338.         mov     dx, sizeof.window
  339.         mul     dx
  340.         shl     edx, 16
  341.         mov     dx, ax
  342.         add     edx, windows
  343.         cmp     [edx + window.type], WINDOWTYPE_NONE
  344.         je      quit
  345.         mov     [window_active], edx
  346.  
  347.         push    [edx + window.text_line_print]
  348.         pop     [scroll2.position]
  349.  
  350.         push    [edx + window.users_scroll]
  351.         pop     [scroll1.position]
  352.  
  353.         call    draw_window
  354.         jmp     mainloop
  355.  
  356. quit:
  357.         cmp     [socketnum], 0
  358.         je      @f
  359.         mov     esi, quit_msg
  360.         call    quit_server
  361.   @@:
  362.  
  363. exit:
  364.  
  365. ; Close all open windows
  366.         call    window_close_all
  367.  
  368. ; Erase RAM areas which could contain the connection details
  369.         xor     eax, eax
  370.         mov     edi, irc_server_name
  371.         mov     ecx, MAX_SERVER_NAME
  372.         rep stosb
  373.  
  374.         mov     edi, user_nick
  375.         mov     ecx, MAX_NICK_LEN
  376.         rep stosb
  377.  
  378.         mov     edi, user_real_name
  379.         mov     ecx, MAX_REAL_LEN
  380.         rep stosb
  381.  
  382.         mov     edi, sockaddr1
  383.         mov     ecx, SOCKADDR1_SIZE
  384.         rep stosb
  385.  
  386.         mcall   -1
  387.  
  388.  
  389.  
  390. main_window_key:
  391.  
  392.         mcall   2
  393.  
  394.         push    dword edit1
  395.         call    [edit_box_key]
  396.  
  397. ;        cmp     ah, 178
  398. ;        jne     .no_up
  399. ;
  400. ;        jmp     mainloop
  401. ;
  402. ;
  403. ;  .no_up:
  404. ;        cmp     ah, 177
  405. ;        jne     .no_down
  406. ;
  407. ;        jmp     mainloop
  408. ;
  409. ;  .no_down:
  410.         cmp     ah, 13          ; enter
  411.         jne     no_send2
  412.  
  413.         call    user_parser
  414.  
  415.         mov     eax, [edit1.size]
  416.  
  417.         mov     [edit1.size], 0
  418.         mov     [edit1.pos], 0
  419.  
  420.         invoke  edit_box_draw, edit1
  421.  
  422.         call    draw_channel_text
  423.  
  424.         jmp     mainloop
  425.   no_send2:
  426.  
  427.         jmp     mainloop
  428.  
  429. mouse:
  430.         invoke  edit_box_mouse, edit1
  431.  
  432. ;        mcall   37, 7
  433. ;        movsx   eax, ax
  434. ;        add     [scroll2.position], eax
  435.  
  436. ; TODO: check if scrollbar is active?
  437.         mov     edi, [window_active]
  438.         cmp     [edi + window.type], WINDOWTYPE_CHANNEL
  439.         jne     @f
  440.         push    [scroll1.position]
  441.         invoke  scrollbar_mouse, scroll1
  442.         pop     eax
  443.         cmp     eax, [scroll1.position] ; did the scrollbar move?
  444.         je      @f
  445.         call    draw_user_list
  446.   @@:
  447.  
  448. ; TODO: check if scrollbar is active?
  449.         mov     edi, [window_active]
  450.         mov     eax, [edi + window.text_lines]
  451.         cmp     eax, [textbox_height]
  452.         jbe     @f
  453.         invoke  scrollbar_mouse, scroll2
  454.         mov     edi, [window_active]
  455.         and     [edi+window.flags], not FLAG_SCROLL_LOW
  456.         mov     edx, [scroll2.position]
  457.         add     edx, [scroll2.cur_area]
  458.         sub     edx, [scroll2.max_area]
  459.         jne     .not_low
  460.         or      [edi+window.flags], FLAG_SCROLL_LOW
  461.   .not_low:
  462.         mov     edx, [scroll2.position]
  463.         sub     edx, [edi + window.text_line_print]
  464.         je      @f
  465.         call    draw_channel_text.scroll_to_pos
  466.   @@:
  467.  
  468.         jmp     mainloop
  469.  
  470.  
  471. ; DATA AREA
  472.  
  473. encoding_text:
  474. db      'CP866 '
  475. db      'CP1251'
  476. db      'UTF-8 '
  477. encoding_text_len = 6
  478.  
  479. join_header             db 3, '3* ', 0
  480. quit_header             db 3, '5* ', 0
  481. nick_header             db 3, '2* ', 0
  482. kick_header             db 3, '5* ', 0
  483. mode_header             db 3, '2* ', 0
  484. part_header             db 3, '5* ', 0
  485. topic_header            db 3, '3* ', 0
  486. action_header           db 3, '6* ', 0
  487. ctcp_header             db 3, '13-> [', 0
  488. ctcp_header_recv        db 3, '13', 0
  489. msg_header              db 3, '7-> *', 0
  490. ctcp_version            db '] VERSION', 10, 0
  491. ctcp_ping               db '] PING', 10, 0
  492. ctcp_time               db '] TIME', 10, 0
  493.  
  494. has_left_channel        db ' has left ', 0
  495. joins_channel           db ' has joined ', 0
  496. is_now_known_as         db ' is now known as ', 0
  497. has_quit_irc            db ' has quit IRC', 10, 0
  498.  
  499. sets_mode               db ' sets mode ', 0
  500. str_kicked              db ' is kicked from ', 0
  501. str_by                  db ' by ', 0
  502. str_nickchange          db 'Nickname is now ', 0
  503. str_realchange          db 'Real name is now ', 0
  504. str_talking             db 'Now talking in ', 0
  505. str_topic               db 'Topic is "', 0
  506. str_topic_end           db '"', 10, 0
  507. str_setby               db 'Set by ', 0
  508.  
  509. str_connecting          db 3, '3* Connecting to ', 0
  510. str_sockerr             db 3, '5* Socket error', 10, 0
  511. str_dnserr              db 3, '5* Unable to resolve hostname', 10, 0
  512. str_refused             db 3, '5* Connection refused', 10, 0
  513. str_srv_disconnected    db 3, '5* Server disconnected', 10, 0
  514. str_disconnected        db 3, '5* Disconnected', 10, 0
  515. str_reconnect           db 3, '5* Connection reset by user', 10, 0
  516. str_notconnected        db 3, '5* You are not connected', 10, 0
  517. str_notchannel          db 3, '5* You are not on a channel', 10, 0
  518. str_notloggedin         db 3, '5* You are not logged in to the server', 10, 0
  519.  
  520. str_1                   db 3, '13 -', 0
  521. str_2                   db '- ', 0
  522.  
  523. str_list                db 'list', 0
  524.  
  525. str_help                db 'The following commands are available:', 10
  526.                         db 10
  527.                         db '/nick <nick>         : change nickname', 10
  528.                         db '/real <real name>    : change real name', 10
  529.                         db '/server <address>    : connect to server', 10
  530.                         db '/code <code>         : change codepage (cp866, cp1251, or utf8)', 10
  531.                         db '/join <channel>      : join a channel', 10
  532.                         db '/part <channel>      : part from a channel', 10
  533.                         db '/quit                : quit server', 10
  534.                         db '/msg <user>          : send a private message', 10
  535.                         db '/ctcp <user>         : send a message using client-to-client protocol', 10
  536.                         db 10
  537.                         db 'Other commands are sent straight to a server', 10
  538.                         db 10, 0
  539.  
  540. str_welcome             db 3, '3 ___', 3, '7__________', 3, '6_________  ', 3, '4         __   __               __', 10
  541.                         db 3, '3|   \', 3, '7______   \', 3, '6_   ___ \ ', 3, '4   ____ |  | |__| ____   _____/  |_', 10
  542.                         db 3, '3|   |', 3, '7|       _/', 3, '6    \  \/ ', 3, '4 _/ ___\|  | |  |/ __ \ /    \   __\', 10
  543.                         db 3, '3|   |', 3, '7|    |   \', 3, '6     \____', 3, '4 \  \___|  |_|  \  ___/|   |  \  |', 10
  544.                         db 3, '3|___|', 3, '7|____|_  /', 3, '6\______  /', 3, '4  \___  >____/__|\___  >___|  /__|', 10
  545.                         db 3, '3     ', 3, '7       \/ ', 3, '6       \/ ', 3, '4      \/             \/     \/', 10
  546.                         db 'Welcome to KolibriOS IRC client ', version, 10
  547.                         db 'Type /help for help', 10, 0
  548.  
  549. str_version             db 'VERSION KolibriOS '
  550. str_programname         db 'IRC client ', version, 0
  551.  
  552. str_user                db 'user', 0
  553. str_nick                db 'nick', 0
  554. str_real                db 'realname', 0
  555. str_email               db 'email', 0
  556. str_quitmsg             db 'quitmsg', 0
  557.  
  558. default_nick            db 'kolibri_user', 0
  559. default_real            db 'Kolibri User', 0
  560. default_quit            db 'KolibriOS forever', 0
  561.  
  562. closing_cross           db 'x',0
  563.  
  564. irc_colors              dd 0xffffff     ;  0 white
  565.                         dd 0x000000     ;  1 black
  566.                         dd 0x00007f     ;  2 blue (navy)
  567.                         dd 0x009300     ;  3 green
  568.                         dd 0xff0000     ;  4 red
  569.                         dd 0x7f0000     ;  5 brown (maroon)
  570.                         dd 0x9c009c     ;  6 purple
  571.                         dd 0xfc7f00     ;  7 olive
  572.                         dd 0xffff00     ;  8 yellow
  573.                         dd 0x00fc00     ;  9 light green
  574.                         dd 0x009393     ; 10 teal
  575.                         dd 0x00ffff     ; 11 cyan
  576.                         dd 0x0000fc     ; 12 royal blue
  577.                         dd 0xff00ff     ; 13 pink
  578.                         dd 0x7f7f7f     ; 14 grey
  579.                         dd 0xd4d0c4     ; 15 light grey (silver)
  580.  
  581. sockaddr1:
  582.         dw AF_INET4
  583. .port   dw 0x0b1a       ; 6667          FIXMEEEEEE
  584. .ip     dd 0
  585.         rb 10
  586.  
  587. SOCKADDR1_SIZE          = 18
  588.  
  589. status                  dd STATUS_DISCONNECTED
  590.  
  591. window_active           dd windows
  592. window_print            dd windows
  593.  
  594. align 4
  595. @IMPORT:
  596.  
  597. library network,        'network.obj',\
  598.         libini,         'libini.obj',\
  599.         boxlib,         'box_lib.obj'
  600.  
  601. import  network,\
  602.         getaddrinfo,    'getaddrinfo',\
  603.         freeaddrinfo,   'freeaddrinfo',\
  604.         inet_ntoa,      'inet_ntoa'
  605.  
  606. import  libini,\
  607.         ini.get_str,    'ini_get_str',\
  608.         ini.get_int,    'ini_get_int'
  609.  
  610. import  boxlib,\
  611.         edit_box_draw,  'edit_box',\
  612.         edit_box_key,   'edit_box_key',\
  613.         edit_box_mouse, 'edit_box_mouse',\
  614.         scrollbar_draw, 'scrollbar_v_draw',\
  615.         scrollbar_mouse,'scrollbar_v_mouse'
  616.  
  617.         ;         width, left, top
  618. edit1   edit_box  0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0x000000, USERCMD_MAX_SIZE, input_text, mouse_dd, ed_always_focus, 25, 25
  619.         ;         xsize, xpos, ysize, ypos, btn_height, max, cur, pos, bgcol, frcol, linecol
  620. scroll1 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
  621. scroll2 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
  622.  
  623. input_text      db '/server chat.freenode.net', 0
  624.                 rb MAX_COMMAND_LEN
  625.  
  626. I_END:
  627.  
  628. user_command    rb MAX_COMMAND_LEN*4
  629. .size           dd ?
  630.  
  631. utf8_bytes_rest dd ?            ; bytes rest in current UTF8 sequence
  632. utf8_char       dd ?            ; first bits of current UTF8 character
  633.  
  634. packetbuf       rb PACKETBUF_SIZE         ; buffer for packets to server
  635. path            rb PATH_SIZE
  636. param           rb PARAM_SIZE
  637.  
  638. servercommand   rb SERVERCOMMAND_SIZE
  639.  
  640. thread_info     process_information
  641. xsize           dd ?
  642. ysize           dd ?
  643. mouse_dd        dd ?
  644.  
  645. textbox_height  dd ?            ; in characters
  646. textbox_width   dd ?            ; in characters, not pixels ;)
  647.  
  648. colors          system_colors
  649.  
  650. irc_server_name rb MAX_SERVER_NAME      ; TODO: move this server URL into window struct
  651. socketnum       dd ?                    ; TODO: same for socket
  652.  
  653. user_nick       rb MAX_NICK_LEN
  654. user_real_name  rb MAX_REAL_LEN
  655. quit_msg        rb QUIT_MSG_LEN
  656.  
  657. windows         rb MAX_WINDOWS*sizeof.window
  658.  
  659. IM_END: