/***************************************
- $Header: /home/amb/routino/src/RCS/nodesx.c,v 1.75 2010/10/09 14:14:42 amb Exp $
+ $Header: /home/amb/routino/src/RCS/nodesx.c,v 1.76 2010/11/13 14:22:28 amb Exp $
Extented Node data type functions.
#include "types.h"
#include "files.h"
+#include "logging.h"
#include "functions.h"
/* Print the start message */
- printf("Sorting Nodes");
- fflush(stdout);
+ printf_first("Sorting Nodes");
/* Close the files and re-open them (finished appending) */
/* Print the final message */
- printf("\rSorted Nodes: Nodes=%d Duplicates=%d\n",nodesx->xnumber,nodesx->xnumber-nodesx->number);
- fflush(stdout);
+ printf_last("Sorted Nodes: Nodes=%d Duplicates=%d",nodesx->xnumber,nodesx->xnumber-nodesx->number);
}
/* Print the start message */
- printf("Sorting Nodes Geographically");
- fflush(stdout);
+ printf_first("Sorting Nodes Geographically");
/* Allocate the memory for the geographical offsets array */
/* Print the final message */
- printf("\rSorted Nodes Geographically \n");
- fflush(stdout);
+ printf_last("Sorted Nodes Geographically");
}
/* Print the start message */
- printf("Checking: Nodes=0");
- fflush(stdout);
+ printf_first("Checking: Nodes=0");
/* While we are here we can work out the range of data */
total++;
if(!(total%10000))
- {
- printf("\rChecking: Nodes=%d Highway=%d not-Highway=%d",total,highway,nothighway);
- fflush(stdout);
- }
+ printf_middle("Checking: Nodes=%d Highway=%d not-Highway=%d",total,highway,nothighway);
}
/* Close the files and re-open them */
/* Print the final message */
- printf("\rChecked: Nodes=%d Highway=%d not-Highway=%d \n",total,highway,nothighway);
- fflush(stdout);
+ printf_last("Checked: Nodes=%d Highway=%d not-Highway=%d",total,highway,nothighway);
}
/* Print the start message */
- printf("Creating Real Nodes: Nodes=0");
- fflush(stdout);
+ printf_first("Creating Real Nodes: Nodes=0");
/* Map into memory */
#endif
if(!((i+1)%10000))
- {
- printf("\rCreating Real Nodes: Nodes=%d",i+1);
- fflush(stdout);
- }
+ printf_middle("Creating Real Nodes: Nodes=%d",i+1);
}
/* Free the unneeded memory */
/* Print the final message */
- printf("\rCreating Real Nodes: Nodes=%d \n",nodesx->number);
- fflush(stdout);
+ printf_last("Creating Real Nodes: Nodes=%d",nodesx->number);
}
/* Print the start message */
- printf("Indexing Segments: Segments=0");
- fflush(stdout);
+ printf_first("Indexing Segments: Segments=0");
/* Map into memory */
}
if(!((i+1)%10000))
- {
- printf("\rIndexing Segments: Segments=%d",i+1);
- fflush(stdout);
- }
+ printf_middle("Indexing Segments: Segments=%d",i+1);
}
/* Unmap from memory */
/* Print the final message */
- printf("\rIndexed Segments: Segments=%d \n",segmentsx->number);
- fflush(stdout);
+ printf_last("Indexed Segments: Segments=%d ",segmentsx->number);
}
/* Print the start message */
- printf("Writing Nodes: Nodes=0");
- fflush(stdout);
+ printf_first("Writing Nodes: Nodes=0");
/* Map into memory */
WriteFile(fd,node,sizeof(Node));
if(!((i+1)%10000))
- {
- printf("\rWriting Nodes: Nodes=%d",i+1);
- fflush(stdout);
- }
+ printf_middle("Writing Nodes: Nodes=%d",i+1);
}
/* Write out the header structure */
/* Print the final message */
- printf("\rWrote Nodes: Nodes=%d \n",nodesx->number);
- fflush(stdout);
+ printf_last("Wrote Nodes: Nodes=%d",nodesx->number);
}