Commit f27ea327 authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

comments

parent 0191b0e9
......@@ -16,20 +16,19 @@
/*****************************************************************************/
/** Write CSV data into file opened for writing, using the column separator
specified inside CSV struct.
specified inside CSV structure.
Field contents are written as they are, that is, no conversions
for decimal separator is done here.
Field contents are written as they are, that is, no conversions for decimal separator is done here.
@return enum tpcerror (TPCERROR_OK when successful).
@author Vesa Oikonen
@sa csvRead, csvMakeRegular
*/
int csvWrite(
/** Pointer to CSV struct, contents of which are to be written */
/** Pointer to CSV structure, contents of which are to be written. */
CSV *csv,
/** Output file pointer */
/** Output file pointer. */
FILE *fp,
/** Pointer to status data; enter NULL if not needed */
/** Pointer to status data; enter NULL if not needed. */
TPCSTATUS *status
) {
int verbose=0; if(status!=NULL) verbose=status->verbose;
......@@ -221,11 +220,11 @@ int csvRead(
@sa csvInit, csvFree, csvWrite, csvPutString, csvPutInt, csvPutLineWithSpaces
*/
int csvPutLine(
/** Pointer to initiated CSV; previous contents are not changed */
/** Pointer to initiated CSV; previous contents are not changed. */
CSV *csv,
/** Pointer to the CSV file line to be processed */
/** Pointer to the CSV file line to be processed. */
const char *line,
/** Pointer to status data; enter NULL if not needed */
/** Pointer to status data; enter NULL if not needed. */
TPCSTATUS *status
) {
if(csv==NULL) return TPCERROR_FAIL;
......@@ -318,14 +317,14 @@ int csvPutLine(
@pre Before first use initialize the CSV struct with csvInit().
@post Remember to free the memory in CSV after last use with csvFree().
@author Vesa Oikonen
@sa csvPutLine, csvRemoveEmptyLines
@sa csvPutLine, csvRemoveEmptyLines, csvRead
*/
int csvPutLineWithSpaces(
/** Pointer to initiated CSV; previous contents are not changed */
/** Pointer to initiated CSV; previous contents are not changed. */
CSV *csv,
/** Pointer to the CSV file line to be processed */
/** Pointer to the CSV file line to be processed. */
const char *line,
/** Pointer to status data; enter NULL if not needed */
/** Pointer to status data; enter NULL if not needed. */
TPCSTATUS *status
) {
if(csv==NULL) return TPCERROR_FAIL;
......@@ -351,7 +350,7 @@ int csvPutLineWithSpaces(
// Find the end of token
lptr=cptr; j=0;
while(*lptr) {
// jump over quoted sequencies */
// jump over quoted sequences */
if(*lptr=='\'') {
if(single_quotation==0 && strchr(lptr+1, '\'')!=NULL) single_quotation=1;
else single_quotation=0;
......
Markdown is supported
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