#include #include "../perm.h" void cycle_fprint(FILE *file, slong *x, slong n) { slong k = 0; if( n > 1 ) { for(slong j=0; j= 0 ); } cycle_fprint(file, c, l); l = 0; } } while( found ); flint_free(m); flint_free(c); } void _perm_print_pretty(slong *x, slong n) { _perm_fprint_pretty(stdout, x, n); } char * _perm_get_str_pretty(slong *x, slong n) { char * buffer = NULL; size_t buffer_size = 0; FILE * out = open_memstream(&buffer, &buffer_size); _perm_fprint_pretty(out, x, n); fclose(out); return buffer; }