11.07.2015 Views

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

Upgrade Guide - Prolifics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

*/static sc_buf_t * SMLOCALmb_addscbuf (as_ptr, sc_buf)altsc_t *as_ptr;sc_buf_t *sc_buf;{}unsigned int f_item;unsigned int l_item;unsigned int buf_size;sc_buf_t *new_buf;scr_data_t *scroll;scroll = (scr_data_t *) as_ptr->scrolldata;l_item = 0;if (sc_buf)l_item = sc_buf->last_item;f_item = l_item + 1;l_item += scroll->i_per_buff;if (l_item > as_ptr->max_items)l_item = as_ptr->max_items;buf_size = (l_item - f_item + 1) * (as_ptr->len +SC_BYTES) + SC_OVERHEAD;new_buf = (sc_buf_t *)sm_fmalloc(buf_size);if (new_buf == 0){char buf[80];sprintf (buf, "There is no more memory for newoccurrence # %i", as_ptr->number);sm_qui_msg (buf);return 0;}memset((VOIDPTR)new_buf, 0, buf_size);new_buf->link = 0;new_buf->first_item = f_item;new_buf->last_item = l_item;new_buf->back = sc_buf;if (sc_buf)sc_buf->link = new_buf;else{scroll->first_buff = new_buf;scroll->cur_buff = new_buf;}return(new_buf);/*NAME: mb_getscbuf - Get pointer to scroll buf that contains theA-18 JAM Documentation: Alternative Scrolling

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

Saved successfully!

Ooh no, something went wrong!