- fprintf(out,"\nenum {\n");
- for(li=c->nodes;li;li=g_list_next(li)) {
- Node *n = li->data;
- if(n->type == METHOD_NODE) {
- Method *m = (Method *)n;
- if(m->scope == SIGNAL_LAST_METHOD ||
- m->scope == SIGNAL_FIRST_METHOD) {
- char *s = g_strdup(m->id);
- g_strup(s);
- fprintf(out,"\t%s_SIGNAL,\n",s);
- g_free(s);
+ out_printf(out,"\n");
+ if(signals>0) {
+ out_printf(out,"enum {\n");
+ for(li=c->nodes;li;li=g_list_next(li)) {
+ Node *n = li->data;
+ if(n->type == METHOD_NODE) {
+ Method *m = (Method *)n;
+ if(m->scope == SIGNAL_LAST_METHOD ||
+ m->scope == SIGNAL_FIRST_METHOD) {
+ char *s = g_strdup(m->id);
+ g_strup(s);
+ out_printf(out,"\t%s_SIGNAL,\n",s);
+ g_free(s);
+ }