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 src\diffutils\2.8.7\diffutils-2.8.7-src\context.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

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to