Console management commands.
Definition in file console_cmd.c.
| int console_exec |
( |
int | argc, |
|
|
char ** | argv ) |
|
static |
"console" command
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 87 of file console_cmd.c.
87 {
91
92
94 goto err_parse;
95
96
98
99
101 goto err_acquire;
102
103
105 printf (
"Could not use picture: %s\n",
107 goto err_pixbuf;
108 }
109
110
111 if ( !
opts.config.width )
112 opts.config.width =
opts.config.pixbuf->width;
113 if ( !
opts.config.height )
114 opts.config.height =
opts.config.pixbuf->height;
115 }
116
117
120 goto err_configure;
121 }
122
123
126
127 err_configure:
128 pixbuf_put (
opts.config.pixbuf );
129 err_pixbuf:
130
133 err_acquire:
134 err_parse:
136}
#define NULL
NULL pointer (VOID *)
void ansicol_set_pair(unsigned int cpair)
Set ANSI foreground and background colour.
#define CSI
Control Sequence Introducer.
struct arbelprm_rc_send_wqe rc
static union @024010030001061367220137227263210031030210157031 opts
"cert<xxx>" option list
int console_configure(struct console_configuration *config)
Configure console.
static struct command_descriptor console_cmd
"console" command descriptor
#define CPAIR_DEFAULT
Default colour pair.
void unregister_image(struct image *image)
Unregister executable image.
int imgacquire(const char *name_uri, unsigned long timeout, struct image **image)
Acquire an image.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
int image_pixbuf(struct image *image, struct pixel_buffer **pixbuf)
Create pixel buffer from image.
char * strerror(int errno)
Retrieve string representation of error number.
int printf(const char *fmt,...)
Write a formatted string to the console.
References ansicol_set_pair(), console_cmd, console_configure(), CPAIR_DEFAULT, CSI, image_pixbuf(), imgacquire(), NULL, opts, parse_options(), printf(), rc, strerror(), and unregister_image().
Referenced by COMMAND().
| int colour_exec |
( |
int | argc, |
|
|
char ** | argv ) |
|
static |
"colour" command
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 165 of file console_cmd.c.
165 {
169
170
174
175
178
179
182
183
187 }
188
189
191
192 return 0;
193}
#define colour
Colour for debug messages.
#define ANSICOL_NO_RGB
RGB value for "not defined".
#define COLOUR_DEFAULT
Default colour (usually white foreground, black background)
int ansicol_define(unsigned int colour, unsigned int basic, uint32_t rgb)
Define ANSI colour.
static struct command_descriptor colour_cmd
"colour" command descriptor
int optind
Current option index.
void * memset(void *dest, int character, size_t len) __nonnull
int reparse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Reparse command-line options.
int parse_integer(char *text, unsigned int *value)
Parse integer value.
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().
Referenced by COMMAND().