104 printf (
"Could not use picture: %s\n",
110 if ( !
opts.config.width )
111 opts.config.width =
opts.config.pixbuf->width;
112 if ( !
opts.config.height )
113 opts.config.height =
opts.config.pixbuf->height;
127 pixbuf_put (
opts.config.pixbuf );
241 opts.background ) ) != 0 ) {
242 printf (
"Could not define colour pair: %s\n",
int image_pixbuf(struct image *image, struct pixel_buffer **pixbuf)
Create pixel buffer from image.
int parse_integer(char *text, unsigned int *value)
Parse integer value.
unsigned int rgb
24-bit RGB value
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
unsigned int basic
Basic colour.
struct command console_commands [] __command
Console management commands.
unsigned int background
Background colour.
char * picture
Picture URI.
int keep
Keep picture after configuration.
static int console_exec(int argc, char **argv)
"console" command
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
static int cpair_exec(int argc, char **argv)
"cpair" command
static struct option_descriptor console_opts[]
"console" option list
void ansicol_set_pair(unsigned int cpair)
Set ANSI foreground and background colour.
static struct command_descriptor colour_cmd
"colour" command descriptor
#define CSI
Control Sequence Introducer.
Parse command-line options.
#define colour
Colour for debug messages.
int parse_string(char *text, char **value)
Parse string value.
struct console_configuration config
Console configuration.
int ansicol_define(unsigned int colour, unsigned int basic, uint32_t rgb)
Define ANSI colour.
int ansicol_define_pair(unsigned int cpair, unsigned int foreground, unsigned int background)
Define ANSI colour pair.
static struct command_descriptor console_cmd
"console" command descriptor
static struct option_descriptor cpair_opts[]
"cpair" option list
int reparse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Reparse command-line options.
#define COLOUR_DEFAULT
Default colour (usually white foreground, black background)
int parse_flag(char *text __unused, int *flag)
Parse flag.
char * strerror(int errno)
Retrieve string representation of error number.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Command line option parsing.
Option does not take an argument.
static struct option_descriptor colour_opts[]
"colour" option list
static union @437 opts
"cert<xxx>" option list
int console_configure(struct console_configuration *config)
Configure console.
#define ANSICOL_NO_RGB
RGB value for "not defined".
const char * name
Name of the command.
unsigned int foreground
Foreground colour.
#define CPAIR_DEFAULT
Default colour pair.
void unregister_image(struct image *image)
Unregister executable image.
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
Option requires an argument.
A command-line option descriptor.
static int colour_exec(int argc, char **argv)
"colour" command
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
static struct command_descriptor cpair_cmd
"cpair" command descriptor
#define NULL
NULL pointer (VOID *)
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.
void * memset(void *dest, int character, size_t len) __nonnull