Commit 948e7d1d authored by Rob Swindell's avatar Rob Swindell

getrec() now returns length of record read

This is useful for detecting blank records.
parent 26638e25
......@@ -41,7 +41,7 @@
/* Places into 'strout' CR or ETX terminated string starting at */
/* 'start' and ending at 'start'+'length' or terminator from 'strin' */
/****************************************************************************/
void DLLCALL getrec(const char *strin,int start,int length,char *strout)
int DLLCALL getrec(const char *strin,int start,int length,char *strout)
{
int i=0,stop;
......@@ -52,6 +52,7 @@ void DLLCALL getrec(const char *strin,int start,int length,char *strout)
strout[i++]=strin[start++];
}
strout[i]=0;
return i;
}
/****************************************************************************/
......
......@@ -70,7 +70,7 @@
extern "C" {
#endif
DLLEXPORT void DLLCALL getrec(const char *instr,int start,int length,char *outstr); /* Retrieve a record from a string */
DLLEXPORT int DLLCALL getrec(const char *instr,int start,int length,char *outstr); /* Retrieve a record from a string */
DLLEXPORT void DLLCALL putrec(char *outstr,int start,int length,char *instr); /* Place a record into a string */
#ifdef __cplusplus
......
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