... and then I forgot to include the actual patch. sorry.

2012/4/5 Tobias Börtitz <[email protected]>

> So with the fixed problem fgetc() was producing I decided to improve the
> patch again.
> I tried to fix all issues mentioned above. I also split the do_copy()
> function as suggested by Maurizio :-)
>
> Please let me know when there are any further issues.
> Tobias
>
>
> 2012/4/5 Maurizio Lombardi <[email protected]>
>
>> On Wed, Apr 4, 2012 at 8:22 PM, Vojtech Horky <[email protected]>
>> wrote:
>> > I think that the function could be broken down even more but I admit I
>> > haven't look all that closely.
>>
>> You are right, it could be broken in two smaller chunks.
>> Actually do_copy looks like the following:
>>
>> do_copy()
>> {
>>  //some initializations here
>>   if (src_type == TYPE_FILE)
>>   {
>>      //Large code
>>   } else if (src_type == TYPE_DIR) {
>>      //Large code
>>   } else error;
>> }
>>
>> It could be refactored in the following way:
>>
>> do_copy()
>> {
>>  //some initializations here
>>   if (src_type == TYPE_FILE)
>>      do_copy_file();
>>   else if (src_type == TYPE_DIR)
>>      do_copy_dir();
>>   else error;
>> }
>>
>> --
>> --------------------
>> Maurizio Lombardi
>>
>> _______________________________________________
>> HelenOS-devel mailing list
>> [email protected]
>> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>>
>
>

Attachment: cp.patch
Description: Binary data

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

Reply via email to