const cmd_t* find_cmd(const char *name){ int i ; for(i = 0; cmd_tbl[i].name != 0 ;i++){ /*if(!my_strcmp(name,cmd_tbl[i].name)){ return &cmd_tbl[i]; }*/ if(!a_strcmp(name,cmd_tbl[i].name)){ return &cmd_tbl[i]; } } return 0; }
/** Get the plot, and create one if it does not exist. * \param d The graph private data. * \param title The plot title. * \return A maybe new plot. */ static plot_t * graph_plot_get(graph_data_t *d, const char *title) { plot_t *plot; /* check if this section is defined already */ for(int j = 0; j < d->plots.len; j++) { plot = &d->plots.tab[j]; if(!a_strcmp(title, plot->title)) return plot; } /* no plot found -> create one */ return graph_plot_add(d, title); }