va_list list; va_start(list, segments);
while( va_arg(list, char*) != 0 ) ++nb_segs;
va_end(list);
}
va_list list; va_start(list, segments);
while( va_arg(list, char*) != 0 ) ++nb_segs;
va_end(list);
}
if( !segments ) {
va_list list; va_start(list, segments);
for( int i=0; i<nb_segs; ++i )
if( !segments ) {
va_list list; va_start(list, segments);
for( int i=0; i<nb_segs; ++i )