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.

NAME: mb_getptr - Get a pointer to offscreen item in memory bufferSYNOPSIS:ptr = mb_getptr (as_ptr);char *ptr;altsc_t *as_ptr;DESCRIPTION: Searches forward or backward from current scrollbuffer to find buffer that contains specified occurrence. If theoccurrence previously existed, returns pointer to data.RETURNS: ptr = pointer to offscreen data; 0 if occurrence could notbe found.*/static char * SMLOCALmb_getptr(as_ptr)altsc_t *as_ptr;{}scr_data_t *scroll;unsigned int occur;sc_buf_t *sc_buf;if (!(scroll = (scr_data_t *)as_ptr->scrolldata) ||!(sc_buf = mb_getscbuf(scroll, (int)(occur =as_ptr->item))))return 0;return sc_buf->item + ((unsigned)occur -sc_buf->first_item) * (as_ptr->len + SC_BYTES);/*NAME: mb_addscbuf - Add another sc_buf_s to the list specified.SYNOPSIS:new_scroll_buffer = mb_addscbuf (as_ptr, scroll_buffer);sc_buf_t *new_scroll_buffer;altsc_t *as_ptr;sc_buf_t *scroll_buffer;DESCRIPTION: Mallocs and initializes new scroll buffer. If scrollbuffer passed is null, the first_buff and cur_buff entries of scrollheader are set to the new buffer.RETURNS: new_scroll_buffer = pointer to new buffer; 0 if mallocfailed.<strong>Upgrade</strong> <strong>Guide</strong> A-17

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

Saved successfully!

Ooh no, something went wrong!