[Libvir] [PATCH] Cleanup xs_internal.c

Hi Blanks and Tabs coexist in xs_internal.c. This patch replaces a tab by blanks in xs_internal.c. Signed-off-by: Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com> Thanks, Masayuki Sunou.

Masayuki Sunou wrote:
Hi
Blanks and Tabs coexist in xs_internal.c. This patch replaces a tab by blanks in xs_internal.c.
I'm not sure what our policy is for this. Emacs at least displays and creates the optimal mix of tabs and spaces, and assuming you have a sensible default of tabstops every 8 columns, it'll look fine. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Mon, Aug 20, 2007 at 12:58:48PM +0100, Richard W.M. Jones wrote:
Masayuki Sunou wrote:
Hi
Blanks and Tabs coexist in xs_internal.c. This patch replaces a tab by blanks in xs_internal.c.
I'm not sure what our policy is for this. Emacs at least displays and creates the optimal mix of tabs and spaces, and assuming you have a sensible default of tabstops every 8 columns, it'll look fine.
So far I have avoided this kind of patches, it's usually more of a burden than a gain. I will sometime cleanup a full file, but for this I will use the following cb script based on GNU indent, it fixes a lot of things: paphio:~/libvirt -> cat ~/bin/cb #!/bin/sh indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 -nut -sbi4 -psl -saf -sai -saw -sbi4 -ss -sc -cdw -cli4 -npcs -nbc paphio:~/libvirt -> Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hi, Daniel That's a good idea. Anyway some code seems to be assumed tab = 8spaces(not 4spaces), I hope this kind of mis-spaces will be fixed. Thanks Atsushi SAKAI Daniel Veillard <veillard@redhat.com> wrote:
On Mon, Aug 20, 2007 at 12:58:48PM +0100, Richard W.M. Jones wrote:
Masayuki Sunou wrote:
Hi
Blanks and Tabs coexist in xs_internal.c. This patch replaces a tab by blanks in xs_internal.c.
I'm not sure what our policy is for this. Emacs at least displays and creates the optimal mix of tabs and spaces, and assuming you have a sensible default of tabstops every 8 columns, it'll look fine.
So far I have avoided this kind of patches, it's usually more of a burden than a gain. I will sometime cleanup a full file, but for this I will use the following cb script based on GNU indent, it fixes a lot of things:
paphio:~/libvirt -> cat ~/bin/cb #!/bin/sh indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 -nut -sbi4 -psl -saf -sai -saw -sbi4 -ss -sc -cdw -cli4 -npcs -nbc paphio:~/libvirt ->
Daniel
-- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Tue, Aug 21, 2007 at 09:58:27AM +0900, Atsushi SAKAI wrote:
Hi, Daniel
That's a good idea. Anyway some code seems to be assumed tab = 8spaces(not 4spaces), I hope this kind of mis-spaces will be fixed.
Well I actually looked at xenStoreOpen() which is one of the places your patch changes, and that section looks fine in my editor. Indenting is using a shift of 4 columns, and the tab aligns to the closest multiple of 8 (which is the main standard definition for it), the lines you changed rendered fine for me as they indented to the second level in a function, i.e. using 4 spaces to align inside the function and a tab to align at column 8 in the block inside the test. To me there is no need to patch it renders just fine. Could you check your editor setting ? Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Atsushi SAKAI wrote:
Anyway some code seems to be assumed tab = 8spaces(not 4spaces), I hope this kind of mis-spaces will be fixed.
Tabstops are normally 8 spaces ... Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (4)
-
Atsushi SAKAI
-
Daniel Veillard
-
Masayuki Sunou
-
Richard W.M. Jones