Commit ddfa5fa3 authored by Luis Kornblueh's avatar Luis Kornblueh
Browse files

Added printing of uuid in proper format for zaxis and grids.

parent 0e0b6265
...@@ -3526,9 +3526,14 @@ void gridPrint(int gridID, int opt) ...@@ -3526,9 +3526,14 @@ void gridPrint(int gridID, int opt)
} }
case GRID_REFERENCE: case GRID_REFERENCE:
{ {
const unsigned char *d;
fprintf(fp, "number = %d\n", gridInqNumber(gridID)); fprintf(fp, "number = %d\n", gridInqNumber(gridID));
fprintf(fp, "position = %d\n", gridInqPosition(gridID)); fprintf(fp, "position = %d\n", gridInqPosition(gridID));
fprintf(fp, "uuid = %s\n", gridInqUUID(gridID, uuid)); gridInqUUID(gridID, uuid);
d = (unsigned char *) &uuid;
fprintf(fp, "uuid = %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]);
if ( gridInqReference(gridID, NULL) ) if ( gridInqReference(gridID, NULL) )
{ {
char reference_link[8192]; char reference_link[8192];
......
...@@ -1363,6 +1363,7 @@ void zaxisPrint(int zaxisID) ...@@ -1363,6 +1363,7 @@ void zaxisPrint(int zaxisID)
{ {
FILE *fp = stdout; FILE *fp = stdout;
int type; int type;
char uuid[17];
int nlevels, levelID; int nlevels, levelID;
int nbyte0, nbyte; int nbyte0, nbyte;
double level; double level;
...@@ -1450,7 +1451,7 @@ void zaxisPrint(int zaxisID) ...@@ -1450,7 +1451,7 @@ void zaxisPrint(int zaxisID)
{ {
if ( nbyte > 70 ) if ( nbyte > 70 )
{ {
fprintf(fp, "\n%*s", nbyte0, ""); fprintf(fp, "\n%*s", nbyte0, "");
nbyte = nbyte0; nbyte = nbyte0;
} }
nbyte += fprintf(fp, "%.9g ", vct[vctsize/2+i]); nbyte += fprintf(fp, "%.9g ", vct[vctsize/2+i]);
...@@ -1459,6 +1460,15 @@ void zaxisPrint(int zaxisID) ...@@ -1459,6 +1460,15 @@ void zaxisPrint(int zaxisID)
*/ */
} }
} }
if ( type == ZAXIS_REFERENCE )
{
const unsigned char *d;
zaxisInqUUID(zaxisID, uuid);
d = (unsigned char *) &uuid;
fprintf(fp, "uuid = %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]);
}
} }
/* /*
* Local Variables: * Local Variables:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment