#include <ngspice.h>
#include <dvec.h>
#include <plot.h>
#include <fteext.h>
#include "pvec.h"
void
pvec(struct dvec *d)
{
char buf[BSIZE_SP], buf2[BSIZE_SP], buf3[BSIZE_SP];
sprintf(buf, " %-20s: %s, %s, %d long",
d->v_name,
ft_typenames(d->v_type),
isreal(d) ? "real" : "complex",
d->v_length);
if (d->v_flags & VF_MINGIVEN) {
sprintf(buf2, ", min = %g", d->v_minsignal);
strcat(buf, buf2);
}
if (d->v_flags & VF_MAXGIVEN) {
sprintf(buf2, ", max = %g", d->v_maxsignal);
switch (d->v_gridtype) {
case GRID_LOGLOG:
strcat(buf, ", grid = loglog");
break;
case GRID_XLOG:
strcat(buf, ", grid = xlog");
case GRID_YLOG:
strcat(buf, ", grid = ylog");
case GRID_POLAR:
strcat(buf, ", grid = polar");
case GRID_SMITH:
strcat(buf, ", grid = smith (xformed)");
case GRID_SMITHGRID:
strcat(buf, ", grid = smithgrid (not xformed)");
default: /* va: GRID_NONE or GRID_LIN */
switch (d->v_plottype) {
case PLOT_COMB:
strcat(buf, ", plot = comb");
case PLOT_POINT:
strcat(buf, ", plot = point");
default: /* va: PLOT_LIN, */
if (d->v_defcolor) {
sprintf(buf2, ", color = %s", d->v_defcolor);
if (d->v_scale) {
sprintf(buf2, ", scale = %s", d->v_scale->v_name);
if (d->v_numdims > 1) {
dimstring(d->v_dims, d->v_numdims, buf3);
sprintf(buf2, ", dims = [%s]", buf3);
if (d->v_plot->pl_scale == d) {
strcat(buf, " [default scale]\n");
} else {
strcat(buf, "\n");
out_send(buf);
return;