FreeBSD/contrib/diff/src/context.c
/* Print a pair of line numbers with a comma, translated for file FILE.
   If the second number is not greater, use the first in place of it.

   Args A and B are internal line numbers.
   We print the translated (real) line numbers.  */
Print a pair of line numbers with a comma, translated for file FILE.
If the second number is not greater, use the first in place of it.

Args A and B are internal line numbers.
We print the translated (real) line numbers.
Print a pair of line numbers with a comma translated for file FILE . If the second number is not greater use the first in place of it . Args A and B are internal line numbers . We print the translated ( real ) line numbers .
static void
print_context_number_range (struct file_data const *file, lin a, lin b)
{
  long int trans_a, trans_b;
  translate_range (file, a, b, &trans_a, &trans_b);
  if (trans_b <= trans_a)
    fprintf (outfile, "%ld", trans_b);
  else
    fprintf (outfile, "%ld,%ld", trans_a, trans_b);
}
static void print_context_number_range ( struct file_data const * file , lin a , lin b ) { long int trans_a , trans_b ; translate_range ( file , a , b , & trans_a , & trans_b ) ; if ( trans_b <= trans_a ) fprintf ( outfile , " " , trans_b ) ; else fprintf ( outfile , " " , trans_a , trans_b ) ; }
Print a pair of line numbers with a comma, translated for file FILE.
Print a pair of line numbers with a comma translated for file FILE .
/* We can have B <= A in the case of a range of no lines.
     In this case, we should print the line number before the range,
     which is B.

     POSIX 1003.1-2001 requires two line numbers separated by a comma
     even if the line numbers are the same.  However, this does not
     match existing practice and is surely an error in the
     specification.  */