Console management commands.
Definition in file console_cmd.c.
| static int console_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
"console" command
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 86 of file console_cmd.c.
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 );
int image_pixbuf(struct image *image, struct pixel_buffer **pixbuf)
Create pixel buffer from image.
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
void ansicol_set_pair(unsigned int cpair)
Set ANSI foreground and background colour.
#define CSI
Control Sequence Introducer.
static struct command_descriptor console_cmd
"console" command descriptor
char * strerror(int errno)
Retrieve string representation of error number.
int console_configure(struct console_configuration *config)
Configure console.
#define CPAIR_DEFAULT
Default colour pair.
void unregister_image(struct image *image)
Unregister executable image.
static union @447 opts
"cert<xxx>" option list
#define NULL
NULL pointer (VOID *)
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.
References ansicol_set_pair(), console_cmd, console_configure(), CPAIR_DEFAULT, CSI, image_pixbuf(), imgacquire(), NULL, opts, parse_options(), printf(), rc, strerror(), and unregister_image().
| static int colour_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
"colour" command
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 164 of file console_cmd.c.
int parse_integer(char *text, unsigned int *value)
Parse integer value.
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
void ansicol_set_pair(unsigned int cpair)
Set ANSI foreground and background colour.
static struct command_descriptor colour_cmd
"colour" command descriptor
#define colour
Colour for debug messages.
int ansicol_define(unsigned int colour, unsigned int basic, uint32_t rgb)
Define ANSI colour.
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)
char * strerror(int errno)
Retrieve string representation of error number.
#define ANSICOL_NO_RGB
RGB value for "not defined".
#define CPAIR_DEFAULT
Default colour pair.
static union @447 opts
"cert<xxx>" option list
void * memset(void *dest, int character, size_t len) __nonnull
References ansicol_define(), ANSICOL_NO_RGB, ansicol_set_pair(), colour, colour_cmd, COLOUR_DEFAULT, CPAIR_DEFAULT, memset(), optind, opts, parse_integer(), printf(), rc, reparse_options(), and strerror().
| static int cpair_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
"cpair" command
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 221 of file console_cmd.c.
241 opts.background ) ) != 0 ) {
242 printf (
"Could not define colour pair: %s\n",
int parse_integer(char *text, unsigned int *value)
Parse integer value.
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
void ansicol_set_pair(unsigned int cpair)
Set ANSI foreground and background colour.
int ansicol_define_pair(unsigned int cpair, unsigned int foreground, unsigned int background)
Define ANSI colour pair.
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)
char * strerror(int errno)
Retrieve string representation of error number.
#define CPAIR_DEFAULT
Default colour pair.
static union @447 opts
"cert<xxx>" option list
static struct command_descriptor cpair_cmd
"cpair" command descriptor
void * memset(void *dest, int character, size_t len) __nonnull
References ansicol_define_pair(), ansicol_set_pair(), COLOUR_DEFAULT, cpair_cmd, CPAIR_DEFAULT, memset(), optind, opts, parse_integer(), printf(), rc, reparse_options(), and strerror().