Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=7402073 By: kapu-phlip Hello, When I use <diff -up file1.c file2.c> to compare two file, I find the function is truncated to 40 characters. Then I download the source code, and find print_context_function( ) in srcdiffutils2.8.7diffutils-2.8.7-srccontext.c file, I think the hard-coded const 40 is the reason: /* Print FUNCTION in a context header. */ static void print_context_function (FILE *out, char const *function) { int i; putc (' ', out); for (i = 0; i < 40 && function[i] != 'n'; i++) continue; fwrite (function, sizeof (char), i, out); } I want to known here why use the hard-coded const 40? We should delete the for loop and change the code to : /* Print FUNCTION in a context header. */ static void print_context_function (FILE *out, char const *function) { putc (' ', out); fwrite (function, sizeof (char), i, out); } ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=74807 |