Ignore:
Timestamp:
05/24/13 12:38:54 (12 years ago)
Author:
Eric.Larour
Message:

CHG: greatly simplified the shared/io/Print routines. Replaced
_printf_ by _pprintString_ , then replaced all _printLine_ by _printString_
and _pprintLine_ by _pprintString_
We will then replace the _printString_ by _printf_ and _pprintString_ by _printf0_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/wrappers/KMLOverlay/KMLOverlay.cpp

    r13250 r15099  
    55
    66void KMLOverlayUsage(void){/*{{{*/
    7         _pprintLine_("KMLOverlay - KML file overlay module:");
    8         _pprintLine_("");
    9         _pprintLine_("   This module reads a list of image files and writes a KML or KMZ overlay file.");
    10         _pprintLine_("");
    11         _pprintLine_("   Usage:");
    12         _pprintLine_("      ierror=KMLOverlay(kmlfile,'param name',param,...);");
    13         _pprintLine_("");
    14         _pprintLine_("      kmlfile     KML or KMZ file name (string)");
    15         _pprintLine_("");
    16         _pprintLine_("      lataxis     latitude axis (double vector [south north], required)");
    17         _pprintLine_("      longaxis    longitude axis (double vector [west east], required)");
    18         _pprintLine_("      images      relative or http image file names (string or array of strings or cell array of strings, required)");
    19         _pprintLine_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");
    20         _pprintLine_("");
    21         _pprintLine_("      ierror     error flag (double, non-zero for error)");
    22         _pprintLine_("");
    23         _pprintLine_("   Example:");
    24         _pprintLine_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");
    25         _pprintLine_("");
     7        _pprintString_("KMLOverlay - KML file overlay module:" << "\n");
     8        _pprintString_("" << "\n");
     9        _pprintString_("   This module reads a list of image files and writes a KML or KMZ overlay file." << "\n");
     10        _pprintString_("" << "\n");
     11        _pprintString_("   Usage:" << "\n");
     12        _pprintString_("      ierror=KMLOverlay(kmlfile,'param name',param,...);" << "\n");
     13        _pprintString_("" << "\n");
     14        _pprintString_("      kmlfile     KML or KMZ file name (string)" << "\n");
     15        _pprintString_("" << "\n");
     16        _pprintString_("      lataxis     latitude axis (double vector [south north], required)" << "\n");
     17        _pprintString_("      longaxis    longitude axis (double vector [west east], required)" << "\n");
     18        _pprintString_("      images      relative or http image file names (string or array of strings or cell array of strings, required)" << "\n");
     19        _pprintString_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)" << "\n");
     20        _pprintString_("" << "\n");
     21        _pprintString_("      ierror     error flag (double, non-zero for error)" << "\n");
     22        _pprintString_("" << "\n");
     23        _pprintString_("   Example:" << "\n");
     24        _pprintString_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);" << "\n");
     25        _pprintString_("" << "\n");
    2626}/*}}}*/
    2727WRAPPER(KMLOverlay){
     
    6363
    6464        options->Get(&lataxis ,&nlat ,(char*)"lataxis");
    65         if (verbose && lataxis) for (i=0; i<nlat; i++) _printLine_("  lataxis [" << i << "]=" << lataxis[i]);
     65        if (verbose && lataxis) for (i=0; i<nlat; i++) _printString_("  lataxis [" << i << "]=" << lataxis[i] << "\n");
    6666        options->Get(&longaxis,&nlong,(char*)"longaxis");
    67         if (verbose && longaxis) for (i=0; i<nlong; i++) _printLine_("  longaxis[" << i << "]=" << longaxis[i]);
     67        if (verbose && longaxis) for (i=0; i<nlong; i++) _printString_("  longaxis[" << i << "]=" << longaxis[i] << "\n");
    6868        options->Get(&pimages,&nimages,(char*)"images");
    69         if (verbose && pimages) for (i=0; i<nimages; i++) _printLine_("  pimages[" << i << "]=\"" << pimages[i] << "\"");
     69        if (verbose && pimages) for (i=0; i<nimages; i++) _printString_("  pimages[" << i << "]=\"" << pimages[i] << "\"" << "\n");
    7070        options->Get(&dzip,(char*)"zip",0.);
    71         if (verbose) _printLine_("  dzip=" << dzip);
     71        if (verbose) _printString_("  dzip=" << dzip << "\n");
    7272
    7373        /*some checks*/
     
    8484        if(!strlen(filkml)) strcpy(filkml,"stdout");
    8585
    86         if(verbose) _printLine_("Opening kml overlay file \"" << filkml << "\".");
     86        if(verbose) _printString_("Opening kml overlay file \"" << filkml << "\"." << "\n");
    8787        fid=fopen(filkml,"w");
    8888
    8989        /* Run core computations: */
    90         if (verbose) _printLine_("Calling core:");
     90        if (verbose) _printString_("Calling core:" << "\n");
    9191        KMLOverlayx(&ierror,lataxis,longaxis,nimages,pimages,fid);
    9292
    93         if (verbose) _printLine_("Closing file \"" << filkml << "\".");
     93        if (verbose) _printString_("Closing file \"" << filkml << "\"." << "\n");
    9494        fclose(fid);
    9595
     
    108108                                strcat(czip,pimages[i]);
    109109                        }
    110                 if (verbose) _printLine_("Zipping file \"" << filkmz << "\".");
    111                 if (verbose) _printLine_(czip);
     110                if (verbose) _printString_("Zipping file \"" << filkmz << "\"." << "\n");
     111                if (verbose) _printString_(czip << "\n");
    112112
    113113                if (mexEvalString(czip)) _error_("Error zipping file \"" << filkmz << "\".");
Note: See TracChangeset for help on using the changeset viewer.