#20136: Various meataxe build issues
-------------------------------------------------+-------------------------
       Reporter:  jdemeyer                       |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-7.1
      Component:  packages: optional             |   Resolution:
       Keywords:                                 |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Reported upstream. Developers  |  Work issues:
  acknowledge bug.                               |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by SimonKing):

 Replying to [comment:16 jdemeyer]:
 > Replying to [comment:15 SimonKing]:
 > > It seems that in most cases the change is in how comments are
 formatted and whether tabs are used. This makes rebasing my patches a
 mess, and for no good reason (I mean, it isn't so much about codes but
 about formatting!).

 Unfortunately, it is more complicated. Here is an example obtained with
 `diff -b`:
 {{{
 #!patch
 1,8c1,7
 < /* ============================= C MeatAxe
 ==================================
 <    File:        $Id: matcmp.c,v 1.1.1.1 2007/09/02 11:06:17 mringe Exp $
 <    Comment:     Compare matrices.
 <
 --------------------------------------------------------------------------
 <    (C) Copyright 1998 Michael Ringe, Lehrstuhl D fuer Mathematik,
 <    RWTH Aachen, Germany  <[email protected]>
 <    This program is free software; see the file COPYING for details.
 <
 ==========================================================================
 */
 ---
 >
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 > // C MeatAxe - Compare matrices
 > //
 > // (C) Copyright 1998-2015 Michael Ringe, Lehrstuhl D fuer Mathematik,
 RWTH Aachen
 > //
 > // This program is free software; see the file COPYING for details.
 >
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 10,11c9
 <
 < #include "meataxe.h"
 ---
 > #include <meataxe.h>
 14c12,13
 < MTX_DEFINE_FILE_INFO
 ---
 >
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 > // Local data
 15a15
 > MTX_DEFINE_FILE_INFO
 16a17,18
 > /// @addtogroup mat
 > /// @{
 18,42c20,38
 < /**
 <  ** @addtogroup mat
 <  ** @{
 <  **/
 <
 < /**
 <  ** Compare two matrices
 <  ** If the matrices are equal, the return value is 0. Otherwise the
 return value is positive,
 <  ** if @em a is "greater" than @em b and negative, if @em a is "less"
 than @em b. The ordering
 <  ** matrices is defined as follows:
 <  **
 <  ** - If the matrices are over different fields, the matrix over the
 smaller field is smaller.
 <  ** - Otherwise, if the matrices have different number of columns, the
 matrix with the smaller
 <  **   number of columns is smaller.
 <  ** - Otherwise, if the matrices have different number of rows, the
 matrix with the smaller
 <  **   number of rows is smaller.
 <  ** - Otherwise, the relation is determined by the return value of
 FfCmpRow() on the first row
 <  **   that is not equal in both matrices.
 <  **
 <  ** In case an error occurs, the return value is -1. But note that a
 return value of -1 does
 <  ** not necessarily mean that an error has occured.
 <  ** @param a First matrix.
 <  ** @param b Second matrix.
 <  ** @return 0 if the matrices are equal, nonzero otherwise (see
 description).
 <  **/
 ---
 >
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 > /// Compare two matrices
 > /// If the matrices are equal, the return value is 0. Otherwise the
 return value is positive,
 > /// if @em a is "greater" than @em b and negative, if @em a is "less"
 than @em b. The ordering
 > /// matrices is defined as follows:
 > ///
 > /// - If the matrices are over different fields, the matrix over the
 smaller field is smaller.
 > /// - Otherwise, if the matrices have different number of columns, the
 matrix with the smaller
 > ///   number of columns is smaller.
 > /// - Otherwise, if the matrices have different number of rows, the
 matrix with the smaller
 > ///   number of rows is smaller.
 > /// - Otherwise, the relation is determined by the return value of
 FfCmpRow() on the first row
 > ///   that is not equal in both matrices.
 > ///
 > /// In case an error occurs, the return value is -1. But note that a
 return value of -1 does
 > /// not necessarily mean that an error has occured.
 > /// @param a First matrix.
 > /// @param b Second matrix.
 > /// @return 0 if the matrices are equal, nonzero otherwise (see
 description).
 50,51c46
 <     if (!MatIsValid(a) || !MatIsValid(b))
 <     {
 ---
 >    if (!MatIsValid(a) || !MatIsValid(b)) {
 58c53
 <     if ((i = a->Field - b->Field) != 0)
 ---
 >    if ((i = a->Field - b->Field) != 0) {
 60c55,56
 <     if ((i = a->Noc - b->Noc) != 0)
 ---
 >    }
 >    if ((i = a->Noc - b->Noc) != 0) {
 62c58,59
 <     if ((i = a->Nor - b->Nor) != 0)
 ---
 >    }
 >    if ((i = a->Nor - b->Nor) != 0) {
 63a61
 >    }
 70,71c68
 <     for (i = 0; i < a->Nor; ++i)
 <     {
 ---
 >    for (i = 0; i < a->Nor; ++i) {
 75c72
 <       if (diff != 0)
 ---
 >       if (diff != 0) {
 77a75
 >    }
 84,86c82,83
 < /**
 <  ** @}
 <  **/
 ---
 >
 > /// @}
 }}}
 The file has 83 lines, but even though the code didn't change the tiniest
 bit, the diff file has 117 lines ---  which basically makes it so that all
 hunks for a patch will fail.

--
Ticket URL: <http://trac.sagemath.org/ticket/20136#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to