Charlie Brej [Tue, 23 Jun 2009 13:26:07 +0000 (14:26 +0100)]
[scan] Remember the line and column number of tokens
This is useful for scan and parse error reporting. The first column is zero but
this can be changed. Nedit and Emacs say zero, gedit says 1 and Vi says "0-1".
Charlie Brej [Mon, 22 Jun 2009 22:38:57 +0000 (23:38 +0100)]
[scan] Add block comments
Treats "/*" and "*/" as block comment markers. Block comments may be nested.
There is a bug where if a comment or a string is not terminated before the end
of a file, the scanner deadlocks. Need to add a way or reporting scanner
errors to the parser.
Charlie Brej [Mon, 22 Jun 2009 21:59:45 +0000 (22:59 +0100)]
[scan] Add parsing of line comments
These are currently hard coded to '//' and '#'. The code is there to return
them to the caller but currently they are thrown away.
Should add a skip_comments option and allow customisable markers.
Charlie Brej [Mon, 22 Jun 2009 20:30:09 +0000 (21:30 +0100)]
[scan] Remember white space between tokens
Tokens now contain the number of white space characters since the last token.
This is useful in situations where white space between symbols changes the
meaning (e.g. a++ vs. a+ +).
Charlie Brej [Mon, 22 Jun 2009 20:20:13 +0000 (21:20 +0100)]
[script] Add support for script image rotation
An image rotate operation creates a new image with the same dimensions but with
the contents rotated by an angle around the centre of the image. Also added a
script object to float function to allow this.
Charlie Brej [Mon, 22 Jun 2009 15:48:46 +0000 (16:48 +0100)]
[script] Add support for unary operations (!/+/-/++/--)
Allows execution of unary operations: Pre/postfix inc/decrement, logical
negation and unary plus/minus.
The writebacks of increment/decrements happen during the execution of the
expression, unlike C where they are executed after the line if executed. This
is the case simply because it is simpler to execute this way.
Charlie Brej [Thu, 18 Jun 2009 16:27:32 +0000 (17:27 +0100)]
[script] Add support for logical AND and OR
Allows the use of "&&" and "||". These are evaluated lazily and return the
evaluated sub-value which completed the operation rather than a bool. It allows
things like:
If cache_lookup returns a false value (NULL, or 0) then slow_lookup is executed
and its result is placed in reply. Otherwise the result from cache_lookup is
used.
Charlie Brej [Fri, 12 Jun 2009 17:04:25 +0000 (18:04 +0100)]
Initial scripted plugin support
This is an initial support for the scripted plugin. There are _many_ FIXMEs
and the whole code is reather unstable. The formatting is completely incorrect
and will be changed soon. There are scripts which are converted using a perl
to an C embeddable string.
Ray Strode [Fri, 12 Jun 2009 03:11:26 +0000 (23:11 -0400)]
[frame-buffer] Discard overlapping flush areas
One advantage of the previous bounding box approach to flushing
is overlapping flush areas wouldn't get flushed multiple times.
This commit tries to identify overlapping flush areas and eliminate
them. It's not perfect though.
A better approach might be to store a sorted tree of areas to be
flushed, and walk the tree when adding new flush areas to quickly find
overlapping areas. Then we'd split each area into two or more new areas
to avoid overlaps.
Ray Strode [Fri, 12 Jun 2009 02:50:07 +0000 (22:50 -0400)]
[frame-buffer] Track multiple flush areas
Previously we would always aggregate flush areas together even
if they were disjoint and far apart. That meant that if two
images on opposites sides of the screen were updated in one
frame, then the entire screen would get redrawn.
We now track flush areas in a list, instead of a bounding box.
Ray Strode [Fri, 12 Jun 2009 02:31:11 +0000 (22:31 -0400)]
[frame-buffer] Rework flush interface to take area
Before this commit it would always flush the area_to_flush
area. Now the interface allows flushing arbitrary areas. This
change paves the way for us to flush multiple disjoint areas
at one time.
Ray Strode [Mon, 4 May 2009 21:17:36 +0000 (17:17 -0400)]
[two-step] pull trigger right away if already idle
The trigger always needs to get pulled so that the
daemon knows that it can quit. Previously, we weren't
pulling it if two-step was already idle. This meant that
plymouthd never quit.
Charlie Brej [Wed, 13 May 2009 12:11:36 +0000 (13:11 +0100)]
[two-step] Add merge-fade as a progress animation transition type
The merge fade merges the two frames before drawing them to the framebuffer.
This makes a smooth transition between areas with partly transparent pixels or
areas in later frames becoming trasparent. This is set as the default on the
"glow" theme.
Ray Strode [Sat, 2 May 2009 04:36:28 +0000 (00:36 -0400)]
[two-step] Add fade to progress animation
One issue with the two-step plugin is that during the initial boot
progress the frames can be updated several seconds apart from each
other. This can look jumpy. We can now optionally fade between
the frames to make the experience be a little smoother.
Ray Strode [Sat, 2 May 2009 03:08:09 +0000 (23:08 -0400)]
[two-step] Pull background color from theme
The OLPC theme looks best when it's white, so we need to be able to
specify the background color from the theme. If the theme doesn't
specify a background color, we fall back to the old behavior of using
the distro default.
Ray Strode [Wed, 29 Apr 2009 18:25:02 +0000 (14:25 -0400)]
[splash] Split splashes into plugins and themes
Some of the plugins (well, the glow plugin) would be a lot more
versatile if they could be reused for multiple splashes with different
images.
This commit splits boot splashes into two parts, the plugin engine which
does all the dirty work, and the theme which says which plugin to use
and optionally how the plugin should work (using plugin specific
key/value pairs)
Ray Strode [Thu, 30 Apr 2009 03:23:12 +0000 (23:23 -0400)]
[libply] Add new keyfile class
This is a very lame keyfile parser. We'll be able to use it to load
some metadata about the plugins.
The idea is that plugins will shift to being engines that can be
leveraged from multiple splash themes. This way, for instance, the glow
plugin (which will be renamed) can be used to implement several
splashes.
Charlie Brej [Wed, 13 May 2009 09:31:44 +0000 (10:31 +0100)]
[daemon] Update tests to include compile correctly
Adds ply-list.c/h to all tests automake files which use ply-logger.c.
Adds PLYMOUTH_TIME_DIRECTORY/PLUGIN/THEME_PATH when ply-boot-splash.c is used.
Adds PLY_BOOT_SPLASH_MODE_BOOT_UP to the ply_boot_splash_show call.
Ray Strode [Tue, 5 May 2009 14:59:57 +0000 (10:59 -0400)]
[daemon] Dump log to plymouth-crash.log on crash
This will be useful for debug purposes.
It's implemented by adding the concept of
"filters" to the logger code. Each time a message
is logged it is passed through all registered
filter handlers and then the output of the filters
are what is actually logged.
In this case, we pass the messages through verbatim,
but also redirect them to a debug buffer.
We only do this redirection when plymouth:debug is
used.
Ray Strode [Tue, 5 May 2009 15:57:21 +0000 (11:57 -0400)]
[event-loop] Don't crash by running removed timeouts
We used to run and remove timeouts in a loop. This
breaks the case where the dispatched timeout handler
removes the timeout itself.
We fix it by making timeout handling a two pass thing.
First we find which handlers need to be dispatched,
and move them to their own list. Then we run through
the new list and dispatch the handlers.
Charlie Brej [Tue, 31 Mar 2009 21:13:20 +0000 (22:13 +0100)]
Pause progress by default on password and question queries
Plymouth client ask-for-password and ask-question commands have their option
"--pause-progress" changed to "--dont-pause-progress". By default progress is
paused and "--dont-pause-progress" has to be supplied to not pause.
Ray Strode [Fri, 13 Mar 2009 14:08:15 +0000 (10:08 -0400)]
Support "splash" in addition to "rhgb" on kernel command line
We used "rhgb" because that's what Fedora users were used to
instinctively removing when graphical boot messes up. This
isn't a very intuitive (or very upstream-y) name though.
Charlie Brej [Mon, 9 Mar 2009 14:51:08 +0000 (14:51 +0000)]
Fix password entry dialogue in fade-in plugin.
Previously ply-entry was crashing with an assertion "entry->loop == NULL"
whenever the entry was updated. The change is basicly a copy of the working
version from spinfinity.
This will play a sequence of images from beginning to end at
a fixed frame rate. It differs from the throbber in that it starts
at the 0th image and does not repeat.
With integer options there's no obvious value to mean "unset" like there is for
string types (and to a lesser extent boolean types), so this commit
adds a mechanism.
Charlie Brej [Sat, 3 Jan 2009 22:18:24 +0000 (22:18 +0000)]
Add hashtable and bitarray functionality
Hashtable uses the bitarray to mark the used/dead places in the hash data array.
The hashtable functions follow the general gist of the glib ones. To create a
hashtable you supply the hashing and comparison functions. Examples of direct
and string based indexing are supplied. Hashtable is a single word because there
is no hash_somethingelse but the name may change soon. Notice the compare
function returns a signed int difference rather than an equal bool. This is
because it may be an idea to later migrate the collision system to a tree
sub-structure (currently it is a linear array search with an incrementing step
size).
Charlie Brej [Sat, 3 Jan 2009 21:33:56 +0000 (21:33 +0000)]
Allow client request answers to be greater than 255 characters.
The new limit is 2^32. This only affects the replies to the client. Data sent
along with requests (e.g. password prompt) remain limited to <256 characters.
Two new functions have been added to the ply-utils (ply_read_uint32 and
ply_write_uint32) which receive/transmit 32bit numbers on FD streams.
AFAICT in function ply_boot_client_process_incoming_replies the answer was not
NUL terminated, which may have caused some of the password error bugs.
Charlie Brej [Sat, 3 Jan 2009 19:41:21 +0000 (19:41 +0000)]
Optionally pause progress while asking for a password or a question
The "Rework input methods" commit broke the pausing of the progress bar during
password entry. This commit reimplements that functionality but this time the
pausing is optional, applied with a --pause-progress parameter. The client
program sends the (un)pause commands before/after the password requests.
The default is currently to not pause but that may change quite soon.
This also fixes a couple minor bugs and formatting from "Rework input methods".
Also changed "progress-pause" to "pause-progress" to make it more human
intuitive.
Charlie Brej [Sat, 3 Jan 2009 15:58:39 +0000 (15:58 +0000)]
Make Ctrl+C and Ctrl+D cause the password/question entry to quit
When asking for a password or a question, if the user presses Ctrl+C or Ctrl+D
the backend will reply a NULL. This is interprited as a "Stop asking me". The
client will not repeat the request (even if number of retries hasn't been
reached) and quit with an error exit_status.
Charlie Brej [Sun, 28 Dec 2008 18:34:25 +0000 (18:34 +0000)]
Add progress-pause/unpause commands to halt the progress bar
Progress bar expansion was previously halted on password entry. Now the
progress can be halted whenever the system wishes. This can be useful when the
system notices there is a big task which is normally not present during normal
boots e.g. fsck.
Charlie Brej [Fri, 19 Dec 2008 14:16:33 +0000 (14:16 +0000)]
Rework of the input methods
Previously the splash plugins would deal with password entry, which would mean
that code was repeated and upon splash unload the password entry would be lost.
Now the keyboard strokes are processed with outside the splash, and the plugins
only deal with showing an appropriate user interface. As well as password
entry, the system can ask questions with non hidden text entry and sensing of
keystrokes.
Charlie Brej [Wed, 17 Dec 2008 12:07:57 +0000 (12:07 +0000)]
Ensure ply-buffer data block always terminates with a '\0'
In some instances, ply-buffer did not terminate the data block with a '\0'.
Doing so allows the data to be used as a string. Additionally it now tries
harder to deal with very long additions to the buffer by repeatedly expanding
the capacity and dealing with appends larger than the maximum buffer size.
Ray Strode [Mon, 24 Nov 2008 22:42:11 +0000 (17:42 -0500)]
Allow NULL to be passed to ply_image_free()
free() allows NULL so there is no reason ply_image_free
shouldn't. This also papers over a bug in the solar
plugin that we haven't been able to identify yet.
Ray Strode [Wed, 19 Nov 2008 16:21:13 +0000 (11:21 -0500)]
Add a --rebuild-initrd arg for set-default-plugin
Normally when a user runs plymouth-set-default-plugin
to change which plugin plymouth uses, the change doesn't
take effect until a new kernel is installed and the initrd
is rebuilt.
This new --rebuild-initrd argument forces the currently
running initrd to get rebuilt immediately (bug 18297).