diff --git a/src/xpdev/csv_file.c b/src/xpdev/csv_file.c index 492ba3edb717d0192a1082a80d26b2cac7eb875d..8b1c3eea900f4bdc024b2b55f6bc55bf89060659 100644 --- a/src/xpdev/csv_file.c +++ b/src/xpdev/csv_file.c @@ -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) { diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c index 6d86c1079c22c34fdfa2fcee2ec35fe9b28e6edf..0b4d2b709dda9dce173d49494a9982210a133274 100644 --- a/src/xpdev/ini_file.c +++ b/src/xpdev/ini_file.c @@ -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) {