src/lib/bjson.c
void strip_long_opts(char *out, const char *in)
{
   const char *p;
   for (p=in; *p; p++) {
      switch (*p) {
      /* V, C, J, and P are long options, skip them */
      case 'V':
      case 'C':
      case 'J':
      case 'P':
         while (*p != ':') {
            p++;       /* skip to after : */
         }
         break;
      /* Copy everything else */
      default:
         *out++ = *p;
         break;
      }
   }
   *out = 0;           /* terminate string */
}
/*
 * Strip long options out of fo->opts string so that
 *   they will not give us false matches for regular
 *   1 or 2 character options.
 */
Strip long options out of fo->opts string so that
they will not give us false matches for regular
1 or 2 character options.
Strip long options out of fo - > opts string so that they will not give us false matches for regular 1 or 2 character options .
void strip_long_opts(char *out, const char *in)
{
   const char *p;
   for (p=in; *p; p++) {
      switch (*p) {
      case 'V':
      case 'C':
      case 'J':
      case 'P':
         while (*p != ':') {
            p++;       
         }
         break;
      default:
         *out++ = *p;
         break;
      }
   }
   *out = 0;           
}
void strip_long_opts ( char * out , const char * in ) { const char * p ; for ( p = in ; * p ; p ++ ) { switch ( * p ) { case ' ' : case ' ' : case ' ' : case ' ' : while ( * p != ' ' ) { p ++ ; } break ; default : * out ++ = * p ; break ; } } * out = 0 ; }
Strip long options out of fo->opts string so that
   they will not give us false matches for regular
   1 or 2 character options.
Strip long options out of fo - > opts string so that they will not give us false matches for regular 1 or 2 character options .
/* V, C, J, and P are long options, skip them */ /* skip to after : */ /* Copy everything else */ /* terminate string */