GEN gpolvar(GEN x) { long v; if (!x) { GEN h = hash_values(h_polvar); return vars_to_RgXV(vars_sort_inplace(h)); } if (typ(x)==t_PADIC) return gcopy( gel(x,2) ); v = gvar(x); if (v==NO_VARIABLE) return gen_0; return pol_x(v); }
void MidiAudioCtrlMap::write(int level, Xml& xml) const { for(ciMidiAudioCtrlMap imacm = begin(); imacm != end(); ++imacm) { int port, chan, mctrl; hash_values(imacm->first, &port, &chan, &mctrl); int actrl = imacm->second.audioCtrlId(); QString s= QString("midiMapper port=\"%1\" ch=\"%2\" mctrl=\"%3\" actrl=\"%4\"") .arg(port) .arg(chan) .arg(mctrl) .arg(actrl); xml.tag(level++, s.toAscii().constData()); // TODO //const MidiAudioCtrlStruct& macs = imacs->second; //xml.intTag(level, "macs ???", macs.); xml.etag(level--, "midiMapper"); } }