Skip to content
Snippets Groups Projects
Commit 20ed5784 authored by rswindell's avatar rswindell
Browse files

truncsp() and truncnl() now defined in truncsp.c.

parent c9429acb
Branches
Tags
No related merge requests found
......@@ -133,17 +133,7 @@ str_list_t csvCreate(str_list_t records[], str_list_t columns)
return(list);
}
/****************************************************************************/
/* Truncates all white-space chars off end of 'str' */
/****************************************************************************/
static void truncsp(char *str)
{
uint c;
c=strlen(str);
while(c && (uchar)str[c-1]<=' ') c--;
str[c]=0;
}
#include "truncsp.c"
str_list_t csvParseLine(char* line)
{
......
......@@ -53,29 +53,7 @@
static ini_style_t default_style;
/****************************************************************************/
/* Truncates all white-space chars off end of 'str' */
/****************************************************************************/
static void truncsp(char *str)
{
uint c;
c=strlen(str);
while(c && (uchar)str[c-1]<=' ') c--;
str[c]=0;
}
/****************************************************************************/
/* Truncates carriage-return and line-feed chars off end of 'str' */
/****************************************************************************/
static void truncnl(char *str)
{
uint c;
c=strlen(str);
while(c && (str[c-1]=='\r' || str[c-1]=='\n')) c--;
str[c]=0;
}
#include "truncsp.c" /* truncsp() and truncnl() */
static char* section_name(char* p)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment