- // Fill the buffer from the DataFile
- int amount_read = Data_Read(df, buffer, index, DATA_BUFSIZ);
-
- // Print all points in the buffer
- for (int i = 0; i < amount_read && index <= end_index; ++i)
- {
- // Print individual DataPoint
- FCGI_PrintRaw(fmt_string, buffer[i].time_stamp, buffer[i].value);
-
- // Last seperator is not required
- if (index+1 <= end_index)
- FCGI_PrintRaw("%c", seperator);
-
- // Advance the position in the DataFile
- ++index;
- }
+ // Print individual DataPoint
+ FCGI_PrintRaw(fmt_string, buffer[i].time_stamp, buffer[i].value);
+
+ // Last separator is not required
+ if (index+1 < end_index)
+ FCGI_PrintRaw("%c", separator);
+
+ // Advance the position in the DataFile
+ ++index;