Hello Vojta,

thanks for the critics. I tried to correct all the mistakes I made and
hereby submitting the corrected patch.

2012/4/4 Vojtech Horky <[email protected]>

> Hello Tobias,
> thanks for the patch!
>
> Please, use tabs for indentation. The policy is to use tab for
> indentation and spaces for alignment (e.g. 4 spaces for command that
> did not fit onto single line).
>
Sorry for that. I messed up my .vimrc recently but fixed it so it is doing
the right indentation by itself now.
I fixed all the wrong indentations made by me, too.

Depends on the context but goto is regularly used in HelenOS for
> exception-like handling of errors.
>
That's what I thought and therefore didn't use goto in the last patch.

Having slightly more than 80 characters is not that big problem in
> itself. The problem here is that the function do_copy() is too big -
> 200 lines is just too much.


> Thus the proper solution is to split it into more functions to make it
> more readable. Side effect is decreasing number of indentation levels.
> For example, it would be useful to create a function
> bool get_yes_no_from_user(const char *message, bool default)
> for reading yes/no and get rid of that while loop that is a lot about
> checking for proper input and little about real action.

So I created the function get_user_decision(...) as you suggested for
getting the users input.

If there is more about the patch please let me know.

Tobias

>
> Cheers,
> - Vojta
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>

Attachment: cp.diff
Description: Binary data

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to