(bind-func lilv_print_all_plugin_ports
(lambda (plugin)
(let ((ports (lilv_plugin_get_num_ports plugin))
(port:LilvPort* null)
(name:LilvNode* null)
(i:i32 0))
(printf "num of ports: %d\n" ports)
(dotimes (i ports)
(set! port (lilv_plugin_get_port_by_index plugin i))
(set! name (lilv_port_get_name plugin port))
(printf "port[%d]: %s\n" i (lilv_node_as_string name)))
void)))