static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
static void stop_animation (ply_boot_splash_plugin_t *plugin);
ply_boot_splash_plugin_t *create_plugin (ply_key_file_t *key_file);
+ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void);
ply_boot_splash_plugin_t *
create_plugin (ply_key_file_t *key_file)
plugin->loop = NULL;
}
-void
+static void
on_keyboard_input (ply_boot_splash_plugin_t *plugin,
const char *keyboard_input,
size_t character_size)
keyboard_string);
}
-void
+static void
on_backspace (ply_boot_splash_plugin_t *plugin)
{}
-void
+static void
on_enter (ply_boot_splash_plugin_t *plugin,
const char *text)
{}
-void
+static void
on_draw (ply_boot_splash_plugin_t *plugin,
int x,
int y,
int height)
{}
-void
+static void
on_erase (ply_boot_splash_plugin_t *plugin,
int x,
int y,
ply_window_remove_enter_handler (plugin->window, (ply_window_enter_handler_t) on_enter);
}
-void
+static void
add_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
{
plugin->window = window;
}
-void
+static void
remove_window (ply_boot_splash_plugin_t *plugin,
ply_window_t *window)
{
plugin->window = NULL;
}
-bool
+static bool
show_splash_screen (ply_boot_splash_plugin_t *plugin,
ply_event_loop_t *loop,
ply_buffer_t *boot_buffer,
return start_animation (plugin);
}
-void
+static void
update_status (ply_boot_splash_plugin_t *plugin,
const char *status)
{
status);
}
-void
+static void
hide_splash_screen (ply_boot_splash_plugin_t *plugin,
ply_event_loop_t *loop)
{
ply_window_set_mode (plugin->window, PLY_WINDOW_MODE_TEXT);
}
-void
+static void
on_root_mounted (ply_boot_splash_plugin_t *plugin)
{
script_lib_plymouth_on_root_mounted (plugin->script_state,
plugin->script_plymouth_lib);
}
-void
+static void
become_idle (ply_boot_splash_plugin_t *plugin,
ply_trigger_t *idle_trigger)
{
ply_trigger_pull (idle_trigger, NULL);
}
-void display_normal (ply_boot_splash_plugin_t *plugin)
+static void
+display_normal (ply_boot_splash_plugin_t *plugin)
{
script_lib_plymouth_on_display_normal (plugin->script_state,
plugin->script_plymouth_lib);
}
-void
+static void
display_password (ply_boot_splash_plugin_t *plugin,
const char *prompt,
int bullets)
bullets);
}
-void
+static void
display_question (ply_boot_splash_plugin_t *plugin,
const char *prompt,
const char *entry_text)
#include <assert.h>
#include <stdbool.h>
#include <unistd.h>
+#include <string.h>
#define COLUMN_START_INDEX 0
case PLY_SCAN_TOKEN_TYPE_INTEGER:
case PLY_SCAN_TOKEN_TYPE_FLOAT:
case PLY_SCAN_TOKEN_TYPE_SYMBOL:
- case PLY_SCAN_TOKEN_TYPE_ERROR:
break;
case PLY_SCAN_TOKEN_TYPE_IDENTIFIER:
case PLY_SCAN_TOKEN_TYPE_STRING:
case PLY_SCAN_TOKEN_TYPE_COMMENT:
+ case PLY_SCAN_TOKEN_TYPE_ERROR:
free (token->data.string);
break;
}
{
if (curchar == '\0')
{
- token->data.string = "End of file before end of string";
+ token->data.string = strdup("End of file before end of string");
token->type = PLY_SCAN_TOKEN_TYPE_ERROR;
return;
}
if (curchar == '\n')
{
- token->data.string = "Line terminator before end of string";
+ token->data.string = strdup("Line terminator before end of string");
token->type = PLY_SCAN_TOKEN_TYPE_ERROR;
return;
}
if (nextchar == '\0')
{
free (token->data.string);
- token->data.string = "End of file before end of comment";
+ token->data.string = strdup("End of file before end of comment");
token->type = PLY_SCAN_TOKEN_TYPE_ERROR;
return;
}