All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: liguang <lig.fnst@cn.fujitsu.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH v2 5/5] ui: boolize 'full_screen'
Date: Wed, 19 Jun 2013 12:37:04 +0400	[thread overview]
Message-ID: <51C16DB0.1090905@msgid.tls.msk.ru> (raw)
In-Reply-To: <1371527137-16949-5-git-send-email-lig.fnst@cn.fujitsu.com>

18.06.2013 07:45, liguang wrote:
[]
> -void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
> +void sdl_display_init(DisplayState *ds, bool full_screen, int no_frame);

The same applies to no_frame, isn't it?

These conversions to bool are like this -- "thankless", because there are
so many of them all around, you touch one place and it becomes obvious
that nearby places should be touched too.  Like this:

> --- a/vl.c
> +++ b/vl.c
> @@ -198,7 +198,7 @@ static int rtc_utc = 1;
>  static int rtc_date_offset = -1; /* -1 means no change */
>  QEMUClock *rtc_clock;
>  int vga_interface_type = VGA_NONE;
> -static int full_screen = 0;
> +static bool full_screen = false;
>  static int no_frame = 0;
>  int no_quit = 0;

This no_quit is bool too... :) But I think _this_ one might be in a
separate patch.  But it is also display-specific.

Besides, I think we should rewamp this display init thing entirely,
making displays to be modules and implementing options parsing
properly.

I think I'll do that today, and will convert these to bools while
at it.

Thanks,

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: liguang <lig.fnst@cn.fujitsu.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 5/5] ui: boolize 'full_screen'
Date: Wed, 19 Jun 2013 12:37:04 +0400	[thread overview]
Message-ID: <51C16DB0.1090905@msgid.tls.msk.ru> (raw)
In-Reply-To: <1371527137-16949-5-git-send-email-lig.fnst@cn.fujitsu.com>

18.06.2013 07:45, liguang wrote:
[]
> -void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
> +void sdl_display_init(DisplayState *ds, bool full_screen, int no_frame);

The same applies to no_frame, isn't it?

These conversions to bool are like this -- "thankless", because there are
so many of them all around, you touch one place and it becomes obvious
that nearby places should be touched too.  Like this:

> --- a/vl.c
> +++ b/vl.c
> @@ -198,7 +198,7 @@ static int rtc_utc = 1;
>  static int rtc_date_offset = -1; /* -1 means no change */
>  QEMUClock *rtc_clock;
>  int vga_interface_type = VGA_NONE;
> -static int full_screen = 0;
> +static bool full_screen = false;
>  static int no_frame = 0;
>  int no_quit = 0;

This no_quit is bool too... :) But I think _this_ one might be in a
separate patch.  But it is also display-specific.

Besides, I think we should rewamp this display init thing entirely,
making displays to be modules and implementing options parsing
properly.

I think I'll do that today, and will convert these to bools while
at it.

Thanks,

/mjt

  reply	other threads:[~2013-06-19  8:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  3:45 [Qemu-trivial] [PATCH v2 1/5] vnc: pass bool parameter for some functions liguang
2013-06-18  3:45 ` [Qemu-devel] " liguang
2013-06-18  3:45 ` [Qemu-trivial] [PATCH v2 2/5] vnc: boolize 'skipauth' liguang
2013-06-18  3:45   ` [Qemu-devel] " liguang
2013-06-18  3:45 ` [Qemu-trivial] [PATCH v2 3/5] qemu-char: use bool in qemu_chr_open_socket liguang
2013-06-18  3:45   ` [Qemu-devel] " liguang
2013-06-19  8:28   ` [Qemu-trivial] " Michael Tokarev
2013-06-19  8:28     ` [Qemu-devel] " Michael Tokarev
2013-06-20  0:21     ` li guang
2013-06-20  0:21       ` [Qemu-devel] " li guang
2013-06-18  3:45 ` [Qemu-trivial] [PATCH v2 4/5] sd: pass bool parameter for sd_init liguang
2013-06-18  3:45   ` [Qemu-devel] " liguang
2013-06-19  8:30   ` [Qemu-trivial] " Michael Tokarev
2013-06-19  8:30     ` [Qemu-devel] " Michael Tokarev
2013-06-18  3:45 ` [Qemu-trivial] [PATCH v2 5/5] ui: boolize 'full_screen' liguang
2013-06-18  3:45   ` [Qemu-devel] " liguang
2013-06-19  8:37   ` Michael Tokarev [this message]
2013-06-19  8:37     ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2013-06-19  8:17 ` [Qemu-trivial] [PATCH v2 1/5] vnc: pass bool parameter for some functions Michael Tokarev
2013-06-19  8:17   ` [Qemu-devel] " Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C16DB0.1090905@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=lig.fnst@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.