about summary refs log tree commit diff stats
path: root/src/ui/core.c
Commit message (Expand)AuthorAgeFilesLines
* Added mucconfwin moduleJames Booth2015-11-021-281/+0
* Removed ui_statusbar_newJames Booth2015-11-021-6/+0
* Removed ui_clear_winJames Booth2015-11-021-6/+0
* Removed ui_unreadJames Booth2015-11-021-7/+1
* Removed ui_handle_room_join_errorJames Booth2015-11-021-6/+0
* Removed ui_win_typeJames Booth2015-11-021-7/+0
* Removed ui_swap_winsJames Booth2015-11-021-6/+0
* Removed ui_tidy_winsJames Booth2015-11-021-6/+0
* Renamed ui_switch_win -> ui_focus_winJames Booth2015-11-021-6/+6
* Removed ui_handle_recipient_not_foundJames Booth2015-11-021-12/+0
* Removed ui_titlebar_presenceJames Booth2015-11-021-6/+0
* Removed ui_get_chat_recipientsJames Booth2015-11-021-11/+1
* mucwin_hide_occupants takes ProfMucWinJames Booth2015-11-021-1/+1
* mucwin_show_occupants takes ProfMucWinJames Booth2015-11-021-1/+1
* Renamed ui_room_hide_occupants -> mucwin_hide_occupantsJames Booth2015-11-011-1/+1
* Renamed mucwin_occupants -> mucwin_show_occupantsJames Booth2015-11-011-1/+1
* Renamed ui_room_show_occupants -> mucwin_occupantsJames Booth2015-11-011-1/+1
* Added mucwin moduleJames Booth2015-11-011-757/+0
* Added xmlwin moduleJames Booth2015-11-011-20/+0
* Removed ui_open_xmlconsole_win()James Booth2015-11-011-9/+0
* Removed ui_create_xmlconsole_win()James Booth2015-11-011-7/+0
* Removed ui_xmlconsole_existsJames Booth2015-11-011-33/+23
* Removed ui_input_nonblocking()James Booth2015-11-011-6/+0
* Removed ui_ paging functionsJames Booth2015-11-011-28/+0
* Removed ui_input_clear()James Booth2015-11-011-6/+0
* Removed ui_readline()James Booth2015-11-011-6/+0
* Added /subject append <text>James Booth2015-10-291-1/+1
* Tidied remaining chatwin functionsJames Booth2015-10-271-4/+16
* Moved ui_handle_otr_errorJames Booth2015-10-271-0/+11
* Removed ui_events moduleJames Booth2015-10-271-1/+0
* Removed ui_ev_focus_winJames Booth2015-10-271-7/+11
* Extracted chatwin.cJames Booth2015-10-261-410/+0
* Removed ui_about() functionJames Booth2015-10-261-7/+0
* Applied coding style to src/ui/core.cJames Booth2015-10-251-114/+113
* Merge remote-tracking branch 'jubalh/jub'James Booth2015-10-241-9/+5
|\
| * Reduce scope of variables in ui/coreMichael Vetter2015-10-121-9/+5
* | Title bar TLS indicatorJames Booth2015-10-141-2/+6
|/
* Added auto xa option, tidied autoaway codeJames Booth2015-09-271-30/+0
* Set status to what it was before autoawayJames Booth2015-09-251-4/+3
* Prompt user to allow or deny untrusted TLS certificatesJames Booth2015-09-221-0/+7
* PGP: UI tweaks for passphrase requestJames Booth2015-09-011-0/+4
* Fixed passing from arg in PGP ask passphraseJames Booth2015-09-011-3/+3
* Added UI function to get PGP passphraseJames Booth2015-09-011-3/+23
* Split PGP incoming and outgoing message handlingJames Booth2015-08-301-9/+9
* Added preference for encryption charJames Booth2015-08-261-2/+2
* Display special char for encrypted messagesJames Booth2015-08-261-8/+15
* Leave chat rooms before receiving self unavailable presenceJames Booth2015-08-231-0/+2
* Show software version result in current windowJames Booth2015-08-061-0/+51
* Use id handler for software version requests, handle errorsJames Booth2015-08-051-0/+18
* Added cons_show_paddedJames Booth2015-07-291-2/+2
span> newline), quit var done?/eax: boolean <- stream-empty? line compare done?, 0/false break-if-!= # wastefully recompute width on every line # zero error-checking; we assume input lines are all equally long copy-to width, 0 # turn each byte into a tree and append it $main:line-loop: { var done?/eax: boolean <- stream-empty? line compare done?, 0/false break-if-!= #? print-int32-decimal 0, num-rows #? print-string 0, " " #? print-int32-decimal 0, width #? print-string 0, "\n" var dest/ebx: (addr int) <- index trees, trees-length var c/eax: byte <- read-byte line # newline comes only at end of line compare c, 0xa/newline break-if-= # '#' = tree compare c, 0x23/hash { break-if-!= copy-to *dest, 1 } # anything else = no tree { break-if-= copy-to *dest, 0 } increment width trees-length <- increment loop } increment num-rows loop } } # phase 2: compute var product/edi: int <- copy 1 var result/eax: int <- num-trees-hit trees, width, num-rows, 1, 1 print-int32-decimal 0, result print-string 0, " x " product <- multiply result var result/eax: int <- num-trees-hit trees, width, num-rows, 3, 1 print-int32-decimal 0, result print-string 0, " x " product <- multiply result var result/eax: int <- num-trees-hit trees, width, num-rows, 5, 1 print-int32-decimal 0, result print-string 0, " x " product <- multiply result var result/eax: int <- num-trees-hit trees, width, num-rows, 7, 1 print-int32-decimal 0, result print-string 0, " x " product <- multiply result var result/eax: int <- num-trees-hit trees, width, num-rows, 1, 2 print-int32-decimal 0, result print-string 0, " = " product <- multiply result print-int32-hex 0, product print-string 0, "\n" return 0 } fn num-trees-hit trees: (addr array int), width: int, num-rows: int, right: int, down: int -> _/eax: int { #? print-string 0, "== " #? print-int32-decimal 0, right #? print-string 0, " " #? print-int32-decimal 0, down #? print-string 0, "\n" var row/ecx: int <- copy 0 var col/edx: int <- copy 0 var num-trees-hit/edi: int <- copy 0 { compare row, num-rows break-if->= #? print-int32-decimal 0, col #? print-string 0, "\n" var curr/eax: int <- index2d trees, row, col, width compare curr, 0 { break-if-= num-trees-hit <- increment } col <- add right row <- add down loop } return num-trees-hit } fn index2d _arr: (addr array int), _row: int, _col: int, width: int -> _/eax: int { # handle repeating columns of trees var dummy/eax: int <- copy 0 var col/edx: int <- copy 0 dummy, col <- integer-divide _col, width #? print-string 0, " " #? print-int32-decimal 0, col #? print-string 0, "\n" # compute index var index/eax: int <- copy _row index <- multiply width index <- add col # look up array var arr/esi: (addr array int) <- copy _arr var src/eax: (addr int) <- index arr, index return *src }