11.07.2015 Views

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

specified item.SYNOPSIS:scroll_buffer = mb_getscbuf (sc_data, item);sc_buf_t *scroll_buffer;scr_data_t *sc_data;int item;DESCRIPTION: Searches scroll buffers for specified item. Uses thecur_buff pointer to save time. Updates cur_buff pointer (to savetime next time). If desired item is in first buffer, don't botherwith cur_buff.RETURNS: scroll_buffer = pointer to desired buffer; 0 if item isnot in any buffer.*/static sc_buf_t * SMLOCALmb_getscbuf(sc_data, item)scr_data_t *sc_data;int item;{sc_buf_t *sc_buf;sc_buf_t *ret_buf;if (!(sc_buf = sc_data->cur_buff))return 0;if (item last_item){sc_buf_t *f_buf;if (item >= (int)sc_buf->first_item)return sc_buf;f_buf = sc_data->first_buff;if (item last_item){if (item < (int)f_buf->first_item)return 0;return f_buf;}if (item >= (int)((sc_buf->first_item + \f_buf->last_item) / 2)){while ((ret_buf = sc_buf->back) &&item < (int)(sc_buf = ret_buf)->first_item){}sc_data->cur_buff = sc_buf;return ret_buf;<strong>Upgrade</strong> <strong>Guide</strong> A-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!