Send plymouth mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.freedesktop.org/mailman/listinfo/plymouth
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of plymouth digest..."


Today's Topics:

   1. Re: Keyboard input / init + questions (Jerome Martin)
   2. Re: Keyboard input / init + questions (Ray Strode)
   3. Re: Keyboard input / init + questions (Jerome Martin)


----------------------------------------------------------------------

Message: 1
Date: Sun, 26 Sep 2010 21:40:40 +0200
From: Jerome Martin <[email protected]>
Subject: Re: Keyboard input / init + questions
To: Ray Strode <[email protected]>
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi again,

As promised I experimented a bit on my side....

1) I upgraded to git version, still no luck with the keyboard messup with
init (from sysvinit debian squeeze) when it starts the rc2.d after rcS
execution.

2) I experimented with getting the arrow keys working:

 - Disabled the key capture in main.c. What I have in mind is to replace
that by additional hooks in the script file, with proper SetXXXCallback
functions to restore the details view, etc.
 - Added some logic in the scan code to understand c-like "\XXX" where XXX
is an octal number. I had to disabled the simple '\0' case for that (the
logic of the scan code is not very kin to supporting both, so I got lazy,
but that could be implemented too), so with my patches you need to use
"\000" instead. Just for fun I also added a XOR method to the script String
object, so you can use things like "\100".XOR("[") in a script.

3) On the script side, the logic to properly get ANSI escape sequences while
still being able to capture single escape characters or single '[' normally
looks like the following. Here the up and down keys trigger scrolling my log
viewer...

fun refresh_callback () {
  # Animate our icons
  [..]

  # Keyboard mod delays decrement
  if (escape_mod_delay > 0) {
    escape_mod_delay--;
    if (escape_mod_delay == 0) {
      inkey_callback("ESC");
    }
  }
  if (ansi_mod_delay > 0) { ansi_mod_delay--; }
}


# Allows parts of an escape sequence to arrive at 1/25th second interval
compose_keys_delay = 2;
escape_mod_delay = 0;
ansi_mod_delay = 0;

fun inkey_callback (key) {
  if (key == "ESC") {
    key = "\033";
  # The following "\033" could be written "\100".XOR("[")
  } else if (key == "\033" && escape_mod_delay == 0) {
    escape_mod_delay = compose_keys_delay;
    key = "";
  } else if (key == "[" && escape_mod_delay > 0) {
      ansi_mod_delay = compose_keys_delay;
      escape_mod_delay = 0;
      key = "";
  } else if (ansi_mod_delay > 0) {
    if (key == "A") {
      key = "UP";
    } else if (key == "B") {
      key = "DOWN";
    } else if (key == "C") {
      key = "LEFT";
    } else if (key == "D") {
      key = "RIGHT";
    }
    ansi_mod_delay = 0;
  }

  if (key == "UP") {
    if (log_view_pos == -1) {
      log_view_pos = log_len - display_len;
    }
    log_view_pos--;
    if (log_view_pos < 1)
      log_view_pos = 0;
    display_log();
  } else if (key == "DOWN")  {
    if (log_view_pos != -1) {
      log_view_pos++;
      if (log_view_pos > log_len - display_len) {
        log_view_pos = -1;
      } else {
        display_log();
      }
    }
  } else if (key != "") {
    toggle_help();
  }
}

And the patches themselves in attached file...

4) About my questions on string handling, I think I am now familiar enough
with plymouth script parser to implement what I need myself. I noticed
 SubString() and a CharAt() methods already, I will probably add a Len() one
for my needs. I was also going to ask a question about fonts, but it seems
that the Image.Text() has already been augmented to handle font selection,
so I am all set there :-) the current git version certainly deserves a
proper release and some documentation though ...

5) As a sidenote, I did a quick debian packaging of the git version, but had
to adapt a bit the debian package rules from squeeze because it assumed that
plymouth original sources already had autoconf ran there, when those that I
downloaded had an autogen.sh script ... This is weird, and it is either an
unclean package in debian OR the fact that you released last time with
autogen.sh already ran. Is that the case ?

Best Regards,
-- 
J?r?me Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/plymouth/attachments/20100926/e3cf86cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plymouth_0.8.4-1.diff
Type: text/x-patch
Size: 7274 bytes
Desc: not available
URL: 
<http://lists.freedesktop.org/archives/plymouth/attachments/20100926/e3cf86cc/attachment-0001.bin>

------------------------------

Message: 2
Date: Sun, 26 Sep 2010 16:29:14 -0400
From: Ray Strode <[email protected]>
Subject: Re: Keyboard input / init + questions
To: Jerome Martin <[email protected]>
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=UTF-8

Hi,

On Sun, Sep 26, 2010 at 3:40 PM, Jerome Martin <[email protected]> wrote:

> 1) I upgraded to git version, still no luck with the keyboard messup with
> init (from sysvinit debian squeeze) when it starts the rc2.d after rcS
> execution.
Can you post a log booted with plymouth:debug ?

[..snip..]
> And the patches themselves in attached file...
Most of these changes are script specific, so I'll leave this stuff
for Charlie to respond to.

> the current git version certainly deserves a
> proper release and some documentation though ...
Right, I was going to do some logging changes before doing a 0.8.4
release, but maybe i'll do those changes after the release.

Documentation is something very much lacking in plymouth.  I want to
rectify that before 1.0.

> 5) As a sidenote, I did a quick debian packaging of the git version, but had
> to adapt a bit the debian package rules from squeeze because it assumed that
> plymouth original sources already had autoconf ran there, when those that I
> downloaded had an autogen.sh script ... This is weird, and it is either an
> unclean package in debian OR the fact that you released last time with
> autogen.sh already ran. Is that the case ?
the autogoo model is a little weird here.  The version of the source
in the tarball contains generated files that aren't checked into
version control.  When making a release, I do

"make distcheck"

which creates the tarball and adds the generated files to the tarball.
 If you're just building a snapshot you can do:

"make dist"

which does the same thing but skips a bunch of checks and a test
compile that take a lot of time.

--Ray


------------------------------

Message: 3
Date: Sun, 26 Sep 2010 22:36:11 +0200
From: Jerome Martin <[email protected]>
Subject: Re: Keyboard input / init + questions
To: Ray Strode <[email protected]>
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

On Sun, Sep 26, 2010 at 10:29 PM, Ray Strode <[email protected]> wrote:

> Hi,
>
> On Sun, Sep 26, 2010 at 3:40 PM, Jerome Martin <[email protected]>
> wrote:
>
> > 1) I upgraded to git version, still no luck with the keyboard messup with
> > init (from sysvinit debian squeeze) when it starts the rc2.d after rcS
> > execution.
> Can you post a log booted with plymouth:debug ?
>

Mmmh, I'll try to get that setup back online and do that ASAP.


>
> [..snip..]
> > And the patches themselves in attached file...
> Most of these changes are script specific, so I'll leave this stuff
> for Charlie to respond to.
>

OK.


>
> > the current git version certainly deserves a
> > proper release and some documentation though ...
> Right, I was going to do some logging changes before doing a 0.8.4
> release, but maybe i'll do those changes after the release.
>
> Documentation is something very much lacking in plymouth.  I want to
> rectify that before 1.0.
>

<nod>


>
> > 5) As a sidenote, I did a quick debian packaging of the git version, but
> had
> > to adapt a bit the debian package rules from squeeze because it assumed
> that
> > plymouth original sources already had autoconf ran there, when those that
> I
> > downloaded had an autogen.sh script ... This is weird, and it is either
> an
> > unclean package in debian OR the fact that you released last time with
> > autogen.sh already ran. Is that the case ?
> the autogoo model is a little weird here.  The version of the source
> in the tarball contains generated files that aren't checked into
> version control.  When making a release, I do
>
> "make distcheck"
>
> which creates the tarball and adds the generated files to the tarball.
>  If you're just building a snapshot you can do:
>
> "make dist"
>
> which does the same thing but skips a bunch of checks and a test
> compile that take a lot of time.
>

Mmmhh. But against which makefile ? You need to generate it first don't you
?
So the release from git tree would be ./autogen.sh; ./configure OPTIONS and
then your make distcheck ?

Best,
-- 
J?r?me Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/plymouth/attachments/20100926/b2076c42/attachment.htm>

------------------------------

_______________________________________________
plymouth mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/plymouth


End of plymouth Digest, Vol 23, Issue 5
***************************************

Reply via email to