2 #include <rc_cmdlength.h>
8 // XXX: Move to header.
9 size_t remoteconfig_cmdlength( const char *, const char *);
12 /* evaluate the length of the command sequence. This breaks at the first
13 * char that is not >= SPACE and <= 127 after trimming from the right.
16 remoteconfig_cmdlength(
24 /* trim whitespace & garbage from the right */
25 while (src_end != src_buf) {
27 if (ch > ' ' && ch < 128)
31 /* now do a forward scan */
32 for (scan = src_buf; scan != src_end; ++scan) {
34 if ((ch < ' ' || ch >= 128) && ch != '\t')
37 return (size_t)(scan - src_buf);