Turn a sequence into its ASCII representation */
| 163 | |
| 164 | /* Turn a sequence into its ASCII representation */ |
| 165 | sds sparklineRender(sds output, struct sequence *seq, int columns, int rows, int flags) { |
| 166 | int j; |
| 167 | |
| 168 | for (j = 0; j < seq->length; j += columns) { |
| 169 | int sublen = (seq->length-j) < columns ? (seq->length-j) : columns; |
| 170 | |
| 171 | if (j != 0) output = sdscatlen(output,"\n",1); |
| 172 | output = sparklineRenderRange(output, seq, rows, j, sublen, flags); |
| 173 | } |
| 174 | return output; |
| 175 | } |
| 176 |
no test coverage detected