[SLOF] [PATCH RFC v0 1/3] Improve indentation in OF.fs

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Mon Oct 10 16:13:55 AEDT 2016


Alexey Kardashevskiy <aik at ozlabs.ru> writes:

> On 10/10/16 03:09, Nikunj A Dadhania wrote:
>> Make uniform indentation(width = 4) everywhere in the file.
>> 
>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>> ---
>>  board-qemu/slof/OF.fs | 112 +++++++++++++++++++++++++-------------------------
>>  1 file changed, 56 insertions(+), 56 deletions(-)
>> 
>> diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
>> index 5a4368f..7566c8b 100644
>> --- a/board-qemu/slof/OF.fs
>> +++ b/board-qemu/slof/OF.fs
>> @@ -116,12 +116,12 @@ d# 512000000 VALUE tb-frequency   \ default value - needed for "ms" to work
>>  370 cp
>>  
>>  : check-boot-menu
>> -   s" qemu,boot-menu" get-chosen IF
>> -      decode-int 1 = IF
>> -         ." Press F12 for boot menu." cr cr
>> -      THEN
>> -      2drop
>> -   THEN
>> +    s" qemu,boot-menu" get-chosen IF
>> +        decode-int 1 = IF
>> +            ." Press F12 for boot menu." cr cr
>> +        THEN
>> +        2drop
>> +    THEN
>>  ;
>>  check-boot-menu
>>  
>> @@ -170,30 +170,30 @@ CREATE version-str 10 ALLOT
>>      " Press 's' to enter Open Firmware." terminal-write drop
>>      cr cr
>>      temp-ptr disp-size > IF
>> -	temp-ptr disp-size MOD
>> -	dup
>> -	prevga-disp-buf + swap disp-size swap - terminal-write drop
>> -	temp-ptr disp-size MOD
>> -	prevga-disp-buf swap 1 - terminal-write drop
>> +        temp-ptr disp-size MOD
>> +        dup
>> +        prevga-disp-buf + swap disp-size swap - terminal-write drop
>> +        temp-ptr disp-size MOD
>> +        prevga-disp-buf swap 1 - terminal-write drop
>>      ELSE
>> -	prevga-disp-buf temp-ptr terminal-write drop
>> +        prevga-disp-buf temp-ptr terminal-write drop
>>      THEN
>>  ;
>>  
>>  : enable-framebuffer-output  ( -- )
>> -\ enable output on framebuffer
>> -   s" screen" find-alias ?dup  IF
>> -      \ we need to open/close the screen device once
>> -      \ before "ticking" display-emit to emit
>> -      open-dev close-node
>> -      false to store-prevga?
>> -      s" display-emit" $find  IF 
>> -         to emit 
>> -	 dump-display-buffer
>> -      ELSE
>> -         2drop
>> -      THEN
>> -   THEN
>> +    \ enable output on framebuffer
>> +    s" screen" find-alias ?dup  IF
>> +        \ we need to open/close the screen device once
>> +        \ before "ticking" display-emit to emit
>> +        open-dev close-node
>> +        false to store-prevga?
>> +        s" display-emit" $find  IF
>> +            to emit
>> +            dump-display-buffer
>> +        ELSE
>> +            2drop
>> +        THEN
>> +    THEN
>>  ;
>>  
>>  enable-framebuffer-output
>> @@ -220,24 +220,24 @@ romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop
>>          ." No console specified "
>>          " screen" find-alias dup IF nip THEN
>>          " keyboard" find-alias dup IF nip THEN
>> -	AND IF
>> -	  ." using screen & keyboard" cr
>> -	  " screen" output
>> -	  " keyboard" input
>> -        ELSE
>> -          " hvterm" find-alias IF
>> -	    drop
>> -	    ." using hvterm" cr
>> -            " hvterm" io
>> -	  ELSE
>> -	    " /openprom" find-node ?dup IF
>> -		set-node
>> -		." and no default found, creating dev-null" cr
>> -		" dev-null.fs" included
>> -		" devnull-console" io
>> -		0 set-node
>> -	    THEN
>> -	  THEN
>> +		    AND IF
>> +            ." using screen & keyboard" cr
>> +            " screen" output
>> +            " keyboard" input
>> +		    ELSE
>> +            " hvterm" find-alias IF
>> +                drop
>> +                ." using hvterm" cr
>> +                " hvterm" io
>> +            ELSE
>> +		    		    " /openprom" find-node ?dup IF
>> +		    		        set-node
>> +		    		        ." and no default found, creating dev-null" cr
>> +		    		        " dev-null.fs" included
>> +		    		        " devnull-console" io
>> +		    		        0 set-node
>
> This chunk does not look like improvement.

Is indentation broken still?

Regards
Nikunj



More information about the SLOF mailing list