diff --git a/src/rinex.c b/src/rinex.c index 398aa8f0a..bf52067d7 100644 --- a/src/rinex.c +++ b/src/rinex.c @@ -157,15 +157,6 @@ typedef struct { /* signal index type */ double shift[MAXOBSTYPE]; /* phase shift (cycle) */ } sigind_t; -/* set string without tail space ---------------------------------------------*/ -static void setstr(char *dst, const char *src, int n) -{ - char *p=dst; - const char *q=src; - while (*q&&q=dst&&*p==' ') *p--='\0'; -} /* adjust time considering week handover -------------------------------------*/ static gtime_t adjweek(gtime_t t, gtime_t t0) { diff --git a/src/rtkcmn.c b/src/rtkcmn.c index 5ff96f154..fe6aa5beb 100644 --- a/src/rtkcmn.c +++ b/src/rtkcmn.c @@ -1550,6 +1550,15 @@ extern void matprint(const double A[], int n, int m, int p, int q) { matfprint(A,n,m,p,q,stdout); } +/* set string without tail space ---------------------------------------------*/ +extern void setstr(char *dst, const char *src, int n) +{ + char *p=dst; + const char *q=src; + while (*q&&q=dst&&*p==' ') *p--='\0'; +} /* string to number ------------------------------------------------------------ * convert substring in string to number * args : char *s I string ("... nnn.nnn ...") diff --git a/src/rtklib.h b/src/rtklib.h index 4c727a045..46716827d 100644 --- a/src/rtklib.h +++ b/src/rtklib.h @@ -1415,6 +1415,7 @@ EXPORT void matfprint(const double *A, int n, int m, int p, int q, FILE *fp); EXPORT void add_fatal(fatalfunc_t *func); /* time and string functions -------------------------------------------------*/ +EXPORT void setstr(char *dst, const char *src, int n); EXPORT double str2num(const char *s, int i, int n); EXPORT int str2time(const char *s, int i, int n, gtime_t *t); EXPORT void time2str(gtime_t t, char *str, int n);