Index: trunk/clock_and_orbit/clock_orbit_rtcm.c
===================================================================
--- trunk/clock_and_orbit/clock_orbit_rtcm.c	(revision 1842)
+++ trunk/clock_and_orbit/clock_orbit_rtcm.c	(revision 2323)
@@ -3,5 +3,5 @@
         Name:           clock_orbit_rtcm.c
         Project:        RTCM3
-        Version:        $Id: clock_orbit_rtcm.c,v 1.15 2009/05/14 13:24:13 stoecker Exp $
+        Version:        $Id: clock_orbit_rtcm.c,v 1.8 2009/05/14 13:24:41 stoecker Exp $
         Authors:        Dirk Stöcker
         Description:    state space approach for RTCM3
@@ -10,5 +10,9 @@
 #include <stdio.h>
 #include <string.h>
+#ifndef sparc
 #include <stdint.h>
+#else
+#include <sys/types.h>
+#endif
 #include "clock_orbit_rtcm.h"
 
@@ -227,4 +231,8 @@
       left = nums - 28;
       nums = 28;
+    }
+    else
+    {
+      left = 0;
     }
     while(nums)
@@ -420,5 +428,5 @@
 int moremessagesfollow, char *buffer, size_t size)
 {
-  int gps, glo, mmi, i, j;
+  int gps=0, glo=0, mmi, i, j;
 
   STARTDATA
@@ -600,4 +608,5 @@
   case COTYPE_GPSORBIT:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GPSORBIT;
     G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
@@ -650,4 +659,5 @@
   case COTYPE_GPSCLOCK:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GPSCLOCK;
     G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
@@ -683,4 +693,5 @@
   case COTYPE_GPSCOMBINED:
     if(!co) return -5;
+    co->messageType = COTYPE_GPSCOMBINED;
     G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
@@ -720,4 +731,5 @@
   case COTYPE_GPSURA:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GPSURA;
     G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
@@ -741,4 +753,5 @@
   case COTYPE_GPSHR:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GPSHR;
     G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
@@ -763,4 +776,5 @@
   case COTYPE_GLONASSORBIT:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GLONASSORBIT;
     G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
     G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
@@ -811,4 +825,5 @@
   case COTYPE_GLONASSCLOCK:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GLONASSCLOCK;
     G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
     G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
@@ -842,4 +857,5 @@
   case COTYPE_GLONASSCOMBINED:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GLONASSCOMBINED;
     G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
     G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
@@ -877,4 +893,5 @@
   case COTYPE_GLONASSURA:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GLONASSURA;
     G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
     G_MULTIPLE_MESSAGE_INDICATOR(mmi)
@@ -896,4 +913,5 @@
   case COTYPE_GLONASSHR:
     if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
+    co->messageType = COTYPE_GLONASSHR;
     G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
     G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
@@ -916,4 +934,5 @@
   case BTYPE_GPS:
     if(!b) return GCOBR_NOBIASPARAMETER;
+    b->messageType = BTYPE_GPS;
     G_GPS_EPOCH_TIME(b->GPSEpochTime, b->NumberOfGPSSat)
     G_SSR_UPDATE_INTERVAL(b->UpdateInterval)
@@ -940,4 +959,5 @@
   case BTYPE_GLONASS:
     if(!b) return GCOBR_NOBIASPARAMETER;
+    b->messageType = BTYPE_GLONASS;
     G_GLONASS_EPOCH_TIME(b->GLONASSEpochTime, b->NumberOfGLONASSSat)
     G_SSR_UPDATE_INTERVAL(b->UpdateInterval)
