Hello Tobias, thanks for the patch! Dne 3. dubna 2012 19:08 Tobias Börtitz <[email protected]> napsal(a): > Hello everyone, > > since I want to apply for this year's GSoC, here is my first rather small > patch for HelenOS. > It introduces the -i flag for interactive overwriting files to the 'cp' > command. 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).
> For there is quite much indentation going on and I didn't want to use a goto Depends on the context but goto is regularly used in HelenOS for exception-like handling of errors. > statement, the character count per line is sometimes a bit higher than the > 80 characters per line, which is defined in the coding guidelines > (http://www.helenos.org/cstyle). If there is any good solution to this > please let me know :) 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. Cheers, - Vojta > The new flag overrides the -f flag and vise versa, for they can't exist at > the same time. The one of those flags occurring last will be the > one being used. > > For discussions I will also be available in the #helenos irc-channel on > irc.freenode.net, going by the username 'kurbel'. > > Cheers, > Tobias > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/cgi-bin/listinfo/helenos-devel > _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
