[parted-devel] Re: Parted 2.0 plans

Otavio Salvador otavio at debian.org
Thu Nov 23 14:15:34 CET 2006


leslie.polzer at gmx.net writes:

> On Wed, Nov 22, 2006 at 09:20:05PM +0000, Debarshi 'Rishi' Ray wrote:
>
>> >>I have implemented this feature.
> Thank you very much :)
>
>> >I think -l is more clear. It'll basically "list" the devices. But
>> >another options would be put one as an alias to the other. Would work
>> >fine.
> I'm for aliasing, too.
>
>> >Basically, I still think -l is clear.
> Me too, and people are used to it from fdisk.
>
>> >> +static int print_all ();
>> >
>> >Why you didn't use _print_all ();?
>>
>> There are 2 functions. print_all does the actual job of 'print all'.
>> When invoked using the command line switch _print_all calls print_all
>> and exits, in other cases do_print calls print_all. I chose the names
>> according to the way 'version' and '--version' are implemented through
>> 'do_print' and '_version' respectively.
>>
>> Has it messed up the naming conventions?
> Sort of.  Static functions are prefixed with an underscore throughout
> the code.  When there's a naming clash in this respect, you should think
> about the naming of your functions.  The 'do_' prefix is helpful in this
> case, if I got it right.

Would be nice if you could write out a simple text file describing the
code style. I hadn't know about this convention about static and
non-static functions on parted code and probably others also doesn't
know about it too.

Could you do a brief doc describing it?

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft gives you Windows ... Linux gives
 you the whole house."



More information about the parted-devel mailing list