Lines Matching +full:top +full:- +full:ctrl
1 \ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org>
26 marker task-check-password.4th
30 vocabulary password-processing
31 only forth also password-processing definitions
35 21 constant ctrl_u \ The decimal ASCII value for Ctrl-U sequence
38 variable read-tick \ Twiddle position (used by read)
39 variable read-start \ Starting X offset (column)(used by read)
45 \ The key that was pressed is added to the top of the stack in the form of its
52 : sgetkey ( -- )
56 drop \ Remove stack-cruft
62 read-tick @ dup 1+ 4 mod read-tick !
65 dup 1 = if ( 2 ) ." -" else
70 read-start @ 25 at-xy
74 \ Always allow Backspace, Enter, and Ctrl-U
83 : cfill ( c c-addr/u -- )
85 -rot 2dup c! 1+ rot 1-
89 : read-reset ( -- )
94 : read ( c-addr/u -- ) \ Expects string prompt as stack input
96 0 25 at-xy \ Move the cursor to the bottom-left
97 dup 1+ read-start ! \ Store X offset after the prompt
115 3 spaces read-start @ 25 at-xy \ Erase the twiddle
118 readlen @ 1 - dup readlen ! \ Decrement input length
120 0= if 3 spaces read-start @ 25 at-xy then \ Twiddle
124 readlen @ 1+ dup readlen ! 1- readval + c!
131 only forth definitions also password-processing also support-functions
133 : check-password ( -- )
135 \ Do not allow the user to proceed beyond this point if a boot-lock
137 s" bootlock_password" getenv dup -1 <> if
140 s" Boot Password: " read ( prompt -- )
145 2drop read-reset
149 s" geom_eli_passphrase_prompt" getenv dup -1 <> if
150 s" YES" compare-insensitive 0= if
151 s" GELI Passphrase: " read ( prompt -- )
153 read-reset
158 s" password" getenv -1 = if exit else drop then
171 s" Password: " read ( prompt -- )
173 2drop read-reset exit