[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] CODING_STYLE: specify the in

From: Wei Yang
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] CODING_STYLE: specify the indent rule for multiline code
Date: Tue, 19 Feb 2019 22:03:04 +0000
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Feb 19, 2019 at 11:55:04AM -0600, Eric Blake wrote:
>On 2/19/19 11:34 AM, Philippe Mathieu-Daudé wrote:
>> What is still unclear is what to do when a function name is over 60
>> characters (you follow a library/API and can not shorten it), for example:
>> static void ccid_card_vscard_handle_message(PassthruState *card,
>>     const VSCMsgHeader *scr_msg_header);
>> What is the project guideline in this case?
>I don't know that we have an official guideline, but I've seen enough
>code doing that. I've also seen this style:
>static void long_func_name(
>    parameter one, parameter two)
>    if (condition) {
>        call_some_really_long_name(
>            arg1,
>            arg2);
>    }
>where even the first argument is put at an indentation of 4 from the
>primary line.

We should put this style in the example too?

>Eric Blake, Principal Software Engineer
>Red Hat, Inc.           +1-919-301-3226
>Virtualization:  qemu.org | libvirt.org

Wei Yang
Help you, Help me

reply via email to

[Prev in Thread] Current Thread [Next in Thread]