Update of /cvsroot/pure-data/externals/io/hidio In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16365
Modified Files: hidio.c Log Message: added pre-generated symbols for often used symbols
Index: hidio.c =================================================================== RCS file: /cvsroot/pure-data/externals/io/hidio/hidio.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** hidio.c 1 Dec 2006 15:07:46 -0000 1.3 --- hidio.c 1 Dec 2006 15:18:10 -0000 1.4 *************** *** 63,66 **** --- 63,69 ---- unsigned short element_count[MAX_DEVICES];
+ /* pre-generated symbols */ + t_symbol *ps_open, *ps_device, *ps_poll, *ps_total, *ps_range; + /*------------------------------------------------------------------------------ * FUNCTION PROTOTYPES *************** *** 117,136 **** static void output_open_status(t_hidio *x) { ! output_status(x, gensym("open"), x->x_device_open); }
static void output_device_number(t_hidio *x) { ! output_status(x, gensym("device"), x->x_device_number); }
static void output_poll_time(t_hidio *x) { ! output_status(x, gensym("poll"), x->x_delay); }
static void output_device_count(t_hidio *x) { ! output_status(x, gensym("total"), device_count); }
--- 120,139 ---- static void output_open_status(t_hidio *x) { ! output_status(x, ps_open, x->x_device_open); }
static void output_device_number(t_hidio *x) { ! output_status(x, ps_device, x->x_device_number); }
static void output_poll_time(t_hidio *x) { ! output_status(x, ps_poll, x->x_delay); }
static void output_device_count(t_hidio *x) { ! output_status(x, ps_total, device_count); }
*************** *** 148,152 **** SETFLOAT(output_data + 2, element[x->x_device_number][i]->min); SETFLOAT(output_data + 3, element[x->x_device_number][i]->max); ! outlet_anything(x->x_status_outlet, gensym("range"), 4, output_data); } } --- 151,155 ---- SETFLOAT(output_data + 2, element[x->x_device_number][i]->min); SETFLOAT(output_data + 3, element[x->x_device_number][i]->max); ! outlet_anything(x->x_status_outlet, ps_range, 4, output_data); } } *************** *** 302,306 **** { if(!x->x_device_open) ! hidio_open(x,gensym("open"),0,NULL); if(!x->x_started) { --- 305,309 ---- { if(!x->x_device_open) ! hidio_open(x,ps_open,0,NULL); if(!x->x_started) { *************** *** 565,568 **** --- 568,579 ---- HIDIO_MAJOR_VERSION, HIDIO_MINOR_VERSION); post("\tcompiled on "__DATE__" at "__TIME__ " "); + + /* pre-generate often used symbols */ + ps_open = gensym("open"); + ps_device = gensym("device"); + ps_poll = gensym("poll"); + ps_total = gensym("total"); + ps_range = gensym("range"); + } #else /* Max */ *************** *** 648,651 **** --- 659,669 ---- finder_addclass("Devices", "hidio"); post("hidio: © 2006 by Olaf Matthes"); + + /* pre-generate often used symbols */ + ps_open = gensym("open"); + ps_device = gensym("device"); + ps_poll = gensym("poll"); + ps_total = gensym("total"); + ps_range = gensym("range");
return 0;