Subversion Repositories Kolibri OS

Rev

Rev 3215 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3215 Rev 3216
Line 805... Line 805...
805
;        call    find_channel   ;;;; ASSUME current channel for now
805
;        call    find_channel   ;;;; ASSUME current channel for now
806
        mov     ebx, [window_print]
806
        mov     ebx, [window_print]
807
        mov     [ebx + window.users], 0              ;;; FIXME: Only if we have just set the receiving names bit
807
        mov     [ebx + window.users], 0              ;;; FIXME: Only if we have just set the receiving names bit
808
        mov     eax, [ebx + window.data_ptr]
808
        mov     eax, [ebx + window.data_ptr]
809
        lea     edi, [eax + window_data.names]
809
        lea     edi, [eax + window_data.names]
810
        lea     edx, [edi + MAX_NICK_LEN]
810
        mov     edx, edi
Line 811... Line 811...
811
 
811
 
812
; now find the semicolon separating channelname and usernames
812
; now find the semicolon separating channelname and usernames
813
  .loop2:
813
  .loop2:
814
        lodsb
814
        lodsb
815
        cmp     al, ':'
815
        cmp     al, ':'
816
        je      .namesloop
816
        je      .newname
817
        test    al, al
817
        test    al, al
Line 818... Line 818...
818
        jnz     .loop2
818
        jnz     .loop2
Line -... Line 819...
-
 
819
 
-
 
820
        ret
-
 
821
 
-
 
822
  .next:
-
 
823
        add     edx, MAX_NICK_LEN
-
 
824
        mov     edi, edx
-
 
825
;;;        cmp     edi, ..              ; TODO: Check for buffer overflow
-
 
826
        jmp     .namesloop            ;;;;
819
 
827
 
820
        ret
828
  .newname:
821
 
829
        inc     [ebx + window.users]
822
  .namesloop:
830
  .namesloop:
823
; now the names list begins, separated with spaces
831
; now the names list begins, separated with spaces
824
        lodsb
832
        lodsb
825
        test    al, al
833
        test    al, al
826
        jz      .done
834
        jz      .done
827
        cmp     al, ' '
835
        cmp     al, ' '
Line 828... Line -...
828
        jz      .next
-
 
829
        stosb
-
 
830
        jmp     .namesloop
-
 
831
 
-
 
832
  .next:
-
 
833
        inc     [ebx + window.users]
-
 
834
        mov     edi, edx
-
 
835
        add     edx, MAX_NICK_LEN
-
 
836
 
836
        jz      .next
837
;;;        cmp     edi, ..              ; TODO: Check for buffer overflow
837
        stosb
838
        jmp     .namesloop
838
        jmp     .namesloop
Line 839... Line 839...
839
 
839
 
Line 840... Line 840...
840
  .done:
840
  .done:
Line 841... Line -...
841
        call    users_calculate
-
 
842
        call    print_channel_list
-
 
843
 
-
 
844
        ret
-
 
845
 
-
 
846
 
-
 
847
users_calculate:
-
 
848
 
841
        call    users_calculate
849
        mov     eax, [ysize]
842
        call    print_channel_list
850
        sub     eax, TEXT_Y + 35 + 10 ;;;;
843
 
851
        xor     edx, edx
844
        ret
-
 
845
 
-
 
846
 
-
 
847
users_calculate:
-
 
848
 
-
 
849
        mov     ebx, [window_print]
-
 
850
        mov     eax, [ebx + window.users]
852
        mov     ecx, 10
851
        mov     [scroll1.max_area], eax