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.

static int SMLOCALmb_insitem (as_ptr)altsc_t *as_ptr;{unsigned char *ptr;unsigned char valids[AS_VAL];attrib_t attr;int item;int item_to;int item_from;item = (int)as_ptr->item;if ((unsigned int)as_ptr->number >(as_ptr->luid - as_ptr->shs)){as_ptr->number = (int)(as_ptr->luid - as_ptr->shs);}item_from = (int)as_ptr->shs;item_to = item_from + as_ptr->number;ptr = as_ptr->text;attr = as_ptr->attr;memcpy ((VOIDPTR)valids, (VOIDPTR)as_ptr->valids, AS_VAL);as_ptr->text = (unsigned char *)sm_fmalloc (as_ptr->len);if (!as_ptr->text){return -3;}for (; item_to >= item; item_to--){if (item_from >= item){as_ptr->item = item_from;if (mb_getitem (as_ptr)){if (ptr){sm_ffree (as_ptr->text);as_ptr->text = ptr;}return -1;}item_from--;}else if (ptr){sm_ffree (as_ptr->text);as_ptr->text = ptr;as_ptr->attr = attr;memcpy((VOIDPTR)as_ptr->valids,(VOIDPTR)valids,AS_VAL);<strong>Upgrade</strong> <strong>Guide</strong> A-13

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

Saved successfully!

Ooh no, something went wrong!