Ignore:
Timestamp:
06/22/12 10:28:55 (13 years ago)
Author:
Mathieu Morlighem
Message:

Changing some printf to _printLine_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/c/shared/Elements/elements.h ΒΆ

    r12475 r12507  
    3030
    3131inline void printarray(IssmDouble* array,int lines,int cols=1){
    32         printf("\n");
     32        _printLine_("");
    3333        for(int i=0;i<lines;i++){ 
    34                 printf("   [ ");
    35                 for(int j=0;j<cols;j++) printf(" %12.7g ",array[i*cols+j]);
    36                 printf(" ]\n");
     34                _printString_("   [ ");
     35                for(int j=0;j<cols;j++) _printString_( " " << setw(11) << setprecision (5) << array[i*cols+j]);
     36                _printLine_(" ]");
    3737        } 
    38         printf("\n");
     38        _printLine_("");
    3939}
    4040inline void printarray(int* array,int lines,int cols=1){
    41         printf("\n");
     41        _printLine_("");
    4242        for(int i=0;i<lines;i++){ 
    43                 printf("   [ ");
    44                 for(int j=0;j<cols;j++) printf(" %6i",array[i*cols+j]);
    45                 printf(" ]\n");
     43                _printString_("   [ ");
     44                for(int j=0;j<cols;j++) _printString_( " " << setw(11) << setprecision (5) << array[i*cols+j]);
     45                _printLine_(" ]");
    4646        } 
    47         printf("\n");
     47        _printLine_("");
    4848}
    4949inline void printbinary(int n) {
    5050        unsigned int i=1L<<(sizeof(n)*8-1);
    51 
    5251        while (i>0) {
    5352                if (n&i)
    54                  printf("1");
     53                 _printString_("1");
    5554                else
    56                  printf("0");
     55                 _printString_("0");
    5756                i>>=1;
    5857        }
Note: See TracChangeset for help on using the changeset viewer.