Pass argc pointer to parse_options()
This lets us keep argc up to date as the backend picks out arguments from the argv array.
This commit is contained in:
@@ -238,7 +238,7 @@ main(int argc, char *argv[])
|
|||||||
struct display *display;
|
struct display *display;
|
||||||
struct calibrator *calibrator;
|
struct calibrator *calibrator;
|
||||||
|
|
||||||
display = display_create(argc, argv);
|
display = display_create(&argc, argv);
|
||||||
|
|
||||||
if (display == NULL) {
|
if (display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
|
|||||||
+1
-1
@@ -297,7 +297,7 @@ main(int argc, char *argv[])
|
|||||||
struct display *display;
|
struct display *display;
|
||||||
struct clickdot *clickdot;
|
struct clickdot *clickdot;
|
||||||
|
|
||||||
display = display_create(argc, argv);
|
display = display_create(&argc, argv);
|
||||||
if (display == NULL) {
|
if (display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -890,7 +890,7 @@ main(int argc, char *argv[])
|
|||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
return benchmark();
|
return benchmark();
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -1094,7 +1094,7 @@ int main(int argc, char *argv[])
|
|||||||
desktop.unlock_task.run = unlock_dialog_finish;
|
desktop.unlock_task.run = unlock_dialog_finish;
|
||||||
wl_list_init(&desktop.outputs);
|
wl_list_init(&desktop.outputs);
|
||||||
|
|
||||||
desktop.display = display_create(argc, argv);
|
desktop.display = display_create(&argc, argv);
|
||||||
if (desktop.display == NULL) {
|
if (desktop.display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -614,7 +614,7 @@ main(int argc, char *argv[])
|
|||||||
struct dnd *dnd;
|
struct dnd *dnd;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -1056,7 +1056,7 @@ main(int argc, char *argv[])
|
|||||||
g_type_init();
|
g_type_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
editor.display = display_create(argc, argv);
|
editor.display = display_create(&argc, argv);
|
||||||
if (editor.display == NULL) {
|
if (editor.display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+3
-3
@@ -390,11 +390,11 @@ main(int argc, char *argv[])
|
|||||||
struct display *d;
|
struct display *d;
|
||||||
struct eventdemo *e;
|
struct eventdemo *e;
|
||||||
|
|
||||||
argc = parse_options(eventdemo_options,
|
parse_options(eventdemo_options,
|
||||||
ARRAY_LENGTH(eventdemo_options), argc, argv);
|
ARRAY_LENGTH(eventdemo_options), &argc, argv);
|
||||||
|
|
||||||
/* Connect to the display and have the arguments parsed */
|
/* Connect to the display and have the arguments parsed */
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
|
|||||||
struct display *d;
|
struct display *d;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -474,7 +474,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
struct display *d;
|
struct display *d;
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -410,7 +410,7 @@ main(int argc, char *argv[])
|
|||||||
int i;
|
int i;
|
||||||
int image_counter = 0;
|
int image_counter = 0;
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -706,7 +706,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
memset(&virtual_keyboard, 0, sizeof virtual_keyboard);
|
memset(&virtual_keyboard, 0, sizeof virtual_keyboard);
|
||||||
|
|
||||||
virtual_keyboard.display = display_create(argc, argv);
|
virtual_keyboard.display = display_create(&argc, argv);
|
||||||
if (virtual_keyboard.display == NULL) {
|
if (virtual_keyboard.display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -281,7 +281,7 @@ main(int argc, char *argv[])
|
|||||||
struct display *display;
|
struct display *display;
|
||||||
struct resizor *resizor;
|
struct resizor *resizor;
|
||||||
|
|
||||||
display = display_create(argc, argv);
|
display = display_create(&argc, argv);
|
||||||
if (display == NULL) {
|
if (display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -279,7 +279,7 @@ int main(int argc, char *argv[])
|
|||||||
struct display *d;
|
struct display *d;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ int main(int argc, char *argv[])
|
|||||||
char *config_file;
|
char *config_file;
|
||||||
struct output *output;
|
struct output *output;
|
||||||
|
|
||||||
display = display_create(argc, argv);
|
display = display_create(&argc, argv);
|
||||||
if (display == NULL) {
|
if (display == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+3
-3
@@ -2683,10 +2683,10 @@ int main(int argc, char *argv[])
|
|||||||
NULL);
|
NULL);
|
||||||
free(config_file);
|
free(config_file);
|
||||||
|
|
||||||
argc = parse_options(terminal_options,
|
parse_options(terminal_options,
|
||||||
ARRAY_LENGTH(terminal_options), argc, argv);
|
ARRAY_LENGTH(terminal_options), &argc, argv);
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ int main(int argc, char *argv[])
|
|||||||
usage(EXIT_FAILURE);
|
usage(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+2
-3
@@ -295,10 +295,9 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
g_type_init();
|
g_type_init();
|
||||||
|
|
||||||
argc = parse_options(view_options,
|
parse_options(view_options, ARRAY_LENGTH(view_options), &argc, argv);
|
||||||
ARRAY_LENGTH(view_options), argc, argv);
|
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
+1
-1
@@ -4329,7 +4329,7 @@ handle_display_data(struct task *task, uint32_t events)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct display *
|
struct display *
|
||||||
display_create(int argc, char *argv[])
|
display_create(int *argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct display *d;
|
struct display *d;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ struct rectangle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct display *
|
struct display *
|
||||||
display_create(int argc, char *argv[]);
|
display_create(int *argc, char *argv[]);
|
||||||
|
|
||||||
void
|
void
|
||||||
display_destroy(struct display *display);
|
display_destroy(struct display *display);
|
||||||
|
|||||||
@@ -310,10 +310,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
init_frand();
|
init_frand();
|
||||||
|
|
||||||
argc = parse_options(wscreensaver_options,
|
parse_options(wscreensaver_options,
|
||||||
ARRAY_LENGTH(wscreensaver_options), argc, argv);
|
ARRAY_LENGTH(wscreensaver_options), &argc, argv);
|
||||||
|
|
||||||
d = display_create(argc, argv);
|
d = display_create(&argc, argv);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
fprintf(stderr, "failed to create display: %m\n");
|
fprintf(stderr, "failed to create display: %m\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ struct weston_option {
|
|||||||
|
|
||||||
int
|
int
|
||||||
parse_options(const struct weston_option *options,
|
parse_options(const struct weston_option *options,
|
||||||
int count, int argc, char *argv[]);
|
int count, int *argc, char *argv[]);
|
||||||
|
|
||||||
#endif /* CONFIGPARSER_H */
|
#endif /* CONFIGPARSER_H */
|
||||||
|
|
||||||
|
|||||||
@@ -51,11 +51,11 @@ handle_option(const struct weston_option *option, char *value)
|
|||||||
|
|
||||||
int
|
int
|
||||||
parse_options(const struct weston_option *options,
|
parse_options(const struct weston_option *options,
|
||||||
int count, int argc, char *argv[])
|
int count, int *argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, j, k, len = 0;
|
int i, j, k, len = 0;
|
||||||
|
|
||||||
for (i = 1, j = 1; i < argc; i++) {
|
for (i = 1, j = 1; i < *argc; i++) {
|
||||||
for (k = 0; k < count; k++) {
|
for (k = 0; k < count; k++) {
|
||||||
if (options[k].name)
|
if (options[k].name)
|
||||||
len = strlen(options[k].name);
|
len = strlen(options[k].name);
|
||||||
@@ -77,6 +77,7 @@ parse_options(const struct weston_option *options,
|
|||||||
argv[j++] = argv[i];
|
argv[j++] = argv[i];
|
||||||
}
|
}
|
||||||
argv[j] = NULL;
|
argv[j] = NULL;
|
||||||
|
*argc = j;
|
||||||
|
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2134,7 +2134,7 @@ planes_binding(struct wl_seat *seat, uint32_t time, uint32_t key, void *data)
|
|||||||
static struct weston_compositor *
|
static struct weston_compositor *
|
||||||
drm_compositor_create(struct wl_display *display,
|
drm_compositor_create(struct wl_display *display,
|
||||||
int connector, const char *seat, int tty, int pixman,
|
int connector, const char *seat, int tty, int pixman,
|
||||||
int argc, char *argv[], const char *config_file)
|
int *argc, char *argv[], const char *config_file)
|
||||||
{
|
{
|
||||||
struct drm_compositor *ec;
|
struct drm_compositor *ec;
|
||||||
struct udev_device *drm_device;
|
struct udev_device *drm_device;
|
||||||
@@ -2430,7 +2430,7 @@ output_section_done(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT struct weston_compositor *
|
WL_EXPORT struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
int connector = 0, tty = 0, use_pixman = 0;
|
int connector = 0, tty = 0, use_pixman = 0;
|
||||||
|
|||||||
@@ -826,7 +826,7 @@ switch_vt_binding(struct wl_seat *seat, uint32_t time, uint32_t key, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct weston_compositor *
|
static struct weston_compositor *
|
||||||
fbdev_compositor_create(struct wl_display *display, int argc, char *argv[],
|
fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file, struct fbdev_parameters *param)
|
const char *config_file, struct fbdev_parameters *param)
|
||||||
{
|
{
|
||||||
struct fbdev_compositor *compositor;
|
struct fbdev_compositor *compositor;
|
||||||
@@ -897,7 +897,7 @@ out_free:
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT struct weston_compositor *
|
WL_EXPORT struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
/* TODO: Ideally, available frame buffers should be enumerated using
|
/* TODO: Ideally, available frame buffers should be enumerated using
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ headless_destroy(struct weston_compositor *ec)
|
|||||||
static struct weston_compositor *
|
static struct weston_compositor *
|
||||||
headless_compositor_create(struct wl_display *display,
|
headless_compositor_create(struct wl_display *display,
|
||||||
int width, int height, const char *display_name,
|
int width, int height, const char *display_name,
|
||||||
int argc, char *argv[], const char *config_file)
|
int *argc, char *argv[], const char *config_file)
|
||||||
{
|
{
|
||||||
struct headless_compositor *c;
|
struct headless_compositor *c;
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ err_free:
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT struct weston_compositor *
|
WL_EXPORT struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
int width = 1024, height = 640;
|
int width = 1024, height = 640;
|
||||||
|
|||||||
@@ -1423,7 +1423,7 @@ struct rpi_parameters {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct weston_compositor *
|
static struct weston_compositor *
|
||||||
rpi_compositor_create(struct wl_display *display, int argc, char *argv[],
|
rpi_compositor_create(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file, struct rpi_parameters *param)
|
const char *config_file, struct rpi_parameters *param)
|
||||||
{
|
{
|
||||||
struct rpi_compositor *compositor;
|
struct rpi_compositor *compositor;
|
||||||
@@ -1536,7 +1536,7 @@ out_free:
|
|||||||
#define DEFAULT_MAX_PLANES 80
|
#define DEFAULT_MAX_PLANES 80
|
||||||
|
|
||||||
WL_EXPORT struct weston_compositor *
|
WL_EXPORT struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
struct rpi_parameters param = {
|
struct rpi_parameters param = {
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ wayland_destroy(struct weston_compositor *ec)
|
|||||||
static struct weston_compositor *
|
static struct weston_compositor *
|
||||||
wayland_compositor_create(struct wl_display *display,
|
wayland_compositor_create(struct wl_display *display,
|
||||||
int width, int height, const char *display_name,
|
int width, int height, const char *display_name,
|
||||||
int argc, char *argv[], const char *config_file)
|
int *argc, char *argv[], const char *config_file)
|
||||||
{
|
{
|
||||||
struct wayland_compositor *c;
|
struct wayland_compositor *c;
|
||||||
struct wl_event_loop *loop;
|
struct wl_event_loop *loop;
|
||||||
@@ -697,7 +697,7 @@ err_free:
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT struct weston_compositor *
|
WL_EXPORT struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
int width = 1024, height = 640;
|
int width = 1024, height = 640;
|
||||||
|
|||||||
@@ -1366,7 +1366,7 @@ x11_compositor_create(struct wl_display *display,
|
|||||||
int fullscreen,
|
int fullscreen,
|
||||||
int no_input,
|
int no_input,
|
||||||
int use_pixman,
|
int use_pixman,
|
||||||
int argc, char *argv[], const char *config_file)
|
int *argc, char *argv[], const char *config_file)
|
||||||
{
|
{
|
||||||
struct x11_compositor *c;
|
struct x11_compositor *c;
|
||||||
struct x11_configured_output *o;
|
struct x11_configured_output *o;
|
||||||
@@ -1556,7 +1556,7 @@ err_free:
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT struct weston_compositor *
|
WL_EXPORT struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
int fullscreen = 0;
|
int fullscreen = 0;
|
||||||
|
|||||||
+7
-8
@@ -2951,8 +2951,7 @@ log_uname(void)
|
|||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
weston_compositor_init(struct weston_compositor *ec,
|
weston_compositor_init(struct weston_compositor *ec,
|
||||||
struct wl_display *display,
|
struct wl_display *display,
|
||||||
int argc,
|
int *argc, char *argv[],
|
||||||
char *argv[],
|
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
{
|
{
|
||||||
struct wl_event_loop *loop;
|
struct wl_event_loop *loop;
|
||||||
@@ -3336,7 +3335,7 @@ int main(int argc, char *argv[])
|
|||||||
struct sigaction segv_action;
|
struct sigaction segv_action;
|
||||||
struct weston_compositor
|
struct weston_compositor
|
||||||
*(*backend_init)(struct wl_display *display,
|
*(*backend_init)(struct wl_display *display,
|
||||||
int argc, char *argv[], const char *config_file);
|
int *argc, char *argv[], const char *config_file);
|
||||||
int i;
|
int i;
|
||||||
char *backend = NULL;
|
char *backend = NULL;
|
||||||
const char *modules = "desktop-shell.so", *option_modules = NULL;
|
const char *modules = "desktop-shell.so", *option_modules = NULL;
|
||||||
@@ -3366,8 +3365,7 @@ int main(int argc, char *argv[])
|
|||||||
{ WESTON_OPTION_BOOLEAN, "version", 0, &version },
|
{ WESTON_OPTION_BOOLEAN, "version", 0, &version },
|
||||||
};
|
};
|
||||||
|
|
||||||
argc = parse_options(core_options,
|
parse_options(core_options, ARRAY_LENGTH(core_options), &argc, argv);
|
||||||
ARRAY_LENGTH(core_options), argc, argv);
|
|
||||||
|
|
||||||
if (help)
|
if (help)
|
||||||
usage(EXIT_SUCCESS);
|
usage(EXIT_SUCCESS);
|
||||||
@@ -3419,7 +3417,7 @@ int main(int argc, char *argv[])
|
|||||||
if (!backend_init)
|
if (!backend_init)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
||||||
ec = backend_init(display, argc, argv, config_file);
|
ec = backend_init(display, &argc, argv, config_file);
|
||||||
if (ec == NULL) {
|
if (ec == NULL) {
|
||||||
weston_log("fatal: failed to create compositor\n");
|
weston_log("fatal: failed to create compositor\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
@@ -3431,9 +3429,10 @@ int main(int argc, char *argv[])
|
|||||||
sigaction(SIGSEGV, &segv_action, NULL);
|
sigaction(SIGSEGV, &segv_action, NULL);
|
||||||
segv_compositor = ec;
|
segv_compositor = ec;
|
||||||
|
|
||||||
for (i = 1; argv[i]; i++)
|
|
||||||
|
for (i = 1; i < argc; i++)
|
||||||
weston_log("fatal: unhandled option: %s\n", argv[i]);
|
weston_log("fatal: unhandled option: %s\n", argv[i]);
|
||||||
if (argv[1]) {
|
if (argc > 1) {
|
||||||
ret = EXIT_FAILURE;
|
ret = EXIT_FAILURE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -714,7 +714,7 @@ weston_compositor_get_time(void);
|
|||||||
|
|
||||||
int
|
int
|
||||||
weston_compositor_init(struct weston_compositor *ec, struct wl_display *display,
|
weston_compositor_init(struct weston_compositor *ec, struct wl_display *display,
|
||||||
int argc, char *argv[], const char *config_file);
|
int *argc, char *argv[], const char *config_file);
|
||||||
void
|
void
|
||||||
weston_compositor_shutdown(struct weston_compositor *ec);
|
weston_compositor_shutdown(struct weston_compositor *ec);
|
||||||
void
|
void
|
||||||
@@ -839,8 +839,8 @@ int
|
|||||||
noop_renderer_init(struct weston_compositor *ec);
|
noop_renderer_init(struct weston_compositor *ec);
|
||||||
|
|
||||||
struct weston_compositor *
|
struct weston_compositor *
|
||||||
backend_init(struct wl_display *display, int argc, char *argv[],
|
backend_init(struct wl_display *display, int *argc, char *argv[],
|
||||||
const char *config_file);
|
const char *config_file);
|
||||||
|
|
||||||
int
|
int
|
||||||
module_init(struct weston_compositor *compositor);
|
module_init(struct weston_compositor *compositor);
|
||||||
|
|||||||
Reference in New Issue
Block a user