Re: [edk2] [patch] ShellPkg: bug fix for editor and hexeditor small screen

Subject: Re: [edk2] [patch] ShellPkg: bug fix for editor and hexeditor small screen

From: Jordan Justen <jljusten@gmail.com>

To: edk2-devel@lists.sourceforge.net

Date: 2011-09-22 06:26:17

On Tue, Sep 20, 2011 at 07:23, yang kidz  wrote:
> Status =3D gST->ConOut->ClearScreen (gST->ConOut);
>
> I think this will clean the whole screen.
> So if we use this methord, we shall update the title bar and status bar at
> the same time.

Yes, I think it should look the same as the help does right now on an
80x25 screen.

Another option would be to look at EditorClearLine in
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
It seems like a good start for a function to clear to the end of the line.

So maybe a new function like:
VOID
EFIAPI
EditorClearToEndOfLine (
  IN UINTN Row,
  IN UINTN Col
  );

-Jordan

>
> Best regard.
>
> -Yang :-)
>
> 2011/9/20 Jordan Justen 
>>
>> Hi Woody,
>>
>> Thanks for the contribution.
>>
>> Can you refer to these pages:
>>
>> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=3DMember=
_Types
>>
>> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=3DHow_to=
_Become_a_Contributor
>> to see how to become a 'Basic Contributor' for our project?
>>
>> Our project can only include your patch if you complete this process.
>>
>> Regarding the patch:
>>
>> Can you keep the help looking the same as it currently looks? =A0I think
>> this means that 17 rows will be required.
>>
>> We don't initialize variables on the same line as we declare them:
>> + =A0INTN =A0 =A0 CurrentLine=3D0;
>>
>> For our coding style, we usually have the extra comment lines, so
>> don't remove them:
>> - =A0//
>> =A0 // scan for ctrl+w
>> - =A0//
>>
>> It looks like the strings returned from HiiGetString should be freed.
>>
>> Can you update the help strings to not have extra spaces at the end of
>> the line in the .uni file? =A0You can pad
>>
>> I notice cls (ShellPkg/Library/UefiShellLevel3CommandsLib/Cls.c) uses:
>> Status =3D gST->ConOut->ClearScreen (gST->ConOut);
>> Can we use this before printing the strings to simplify the blank
>> characters issue?
>>
>> Thanks again,
>>
>> -Jordan
>>
>> On Mon, Sep 19, 2011 at 07:31, woooody3  wrote:
>> >
>> >
>> > On 19 September 2011 22:11, woooody3  wrote:
>> >>
>> >> Hi, all.
>> >> This is a patch file. Changes are listed here.
>> >> [ShellPkg] UefiShellDebug1CommandsLib - editor and hexeditor
>> >> =A0=A0 =A0 =A0 =A0 =A0 small screen patch for r11966.patch
>> >> * bug fix for small screen (60x15),
>> >> =A0=A0screen's row should be not less than 15.
>> >> =A0=A0screen's column should be not less than 60.
>> >> - signed-off-by woody
>> >>
>> >>
>> >> On 19 September 2011 22:02, yang kidz  wrote:
>> >>>
>> >>> Hi, all.
>> >>> Shall we make column 60 as the smallest size?
>> >>> If so, I and my partner will summit a patch soon.
>> >>>
>> >>> Best regards.
>> >>>
>> >>> -Yang
>> >>>
>> >>> 2011/9/1 Jordan Justen 
>> >>>>
>> >>>> On Wed, Aug 31, 2011 at 12:57, Andrew Fish  wrote:
>> >>>> > What happens if the screen is larger than 80x25? We have our older
>> >>>> > version of the shell default to max mode.
>> >>>>
>> >>>> Yes, this should be supported. =A0(But, I'm not sure if it is.)
>> >>>>
>> >>>> > Also where are 60x18 and 60x15 coming from?
>> >>>>
>> >>>> A portrait screen of 480 wide by 800 tall would only support 60
>> >>>> columns
>> >>>> of text.
>> >>>>
>> >>>> As to rows or text ... I don't think there's a concern for anything
>> >>>> less than 25.
>> >>>>
>> >>>> I only listed 60 columns as a goal for the editor task:
>> >>>>
>> >>>>
>> >>>> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=3DT=
asks/Text_Editor
>> >>>> But, I just threw out 15 rows as something Yang could try for.
>> >>>>
>> >>>> -Jordan
>> >>>>
>> >>>>
>> >>>> > On Aug 31, 2011, at 12:49 PM, Jordan Justen wrote:
>> >>>> >
>> >>>> >> Yang,
>> >>>> >>
>> >>>> >> There is an issue with this patch. =A0It only clears the first 60
>> >>>> >> columns to display the help.
>> >>>> >>
>> >>>> >> So, if there are 80 columns, and you have text after column 60,
>> >>>> >> then
>> >>>> >> it will not be cleared when the help is shown.
>> >>>> >>
>> >>>> >> You probably should make the strings in the .uni not have extra
>> >>>> >> spaces
>> >>>> >> at the end of the token, but then have the code add spaces clear
>> >>>> >> the
>> >>>> >> text to the end of the line.
>> >>>> >>
>> >>>> >> Also, I think it would be better to keep the help text as it was
>> >>>> >> previously, and support a minimum of 60x18 rather than 60x15.
>> >>>> >>
>> >>>> >> -Jordan
>> >>>> >>
>> >>>> >> On Thu, Aug 25, 2011 at 03:45, yang kidz 
>> >>>> >> wrote:
>> >>>> >>> Hi, all.
>> >>>> >>>
>> >>>> >>> This is a patch file. Changes are listed here.
>> >>>> >>>
>> >>>> >>> [ShellPkg] UefiShellDebug1CommandsLib - editor and hexeditor
>> >>>> >>> =A0 =A0 =A0 =A0 =A0 =A0small screen patch for r12200.patch
>> >>>> >>>
>> >>>> >>> * bug fix for small screen (60x15),
>> >>>> >>> =A0 screen's row should be not less than 15.
>> >>>> >>>
>> >>>> >>> - signed-off-by kidzyoung
>> >>>> >>>
>> >>>> >>>
>> >>>> >>> 2011/8/23 Jordan Justen 
>> >>>> >>>>
>> >>>> >>>> Yang,
>> >>>> >>>>
>> >>>> >>>> Can you update your tree to the current latest revision, and
>> >>>> >>>> provide a
>> >>>> >>>> patch just containing the changes for the screen size fix?
>> >>>> >>>>
>> >>>> >>>> Thanks,
>> >>>> >>>>
>> >>>> >>>> -Jordan
>> >>>> >>>>
>> >>>> >>>> On Fri, Aug 19, 2011 at 05:26, yang kidz 
>> >>>> >>>> wrote:
>> >>>> >>>>> Hi, all.
>> >>>> >>>>>
>> >>>> >>>>> This is a patch file. Changes are listed here.
>> >>>> >>>>>
>> >>>> >>>>> [ShellPkg] UefiShellDebug1CommandsLib - editor and hexeditor
>> >>>> >>>>> =A0 =A0 =A0 =A0 =A0 =A0small screen patch for r11966.patch
>> >>>> >>>>>
>> >>>> >>>>> * bug fix for small screen (60x15),
>> >>>> >>>>> =A0 screen's row should be not less than 15.
>> >>>> >>>>>
>> >>>> >>>>> - signed-off-by kidzyoung
>> >>>> >>>>>

---------------------------------------------------------------------------=
---
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel