int16_t *)op)[0] / 2);
#endif
	/* unpin both pages */
	old_bufp->flags &= ~BUF_PIN;
	new_bufp->flags &= ~BUF_PIN;
	return (0);
}

/*
 * Called when we encounter an overflow or big key/data page during split
 * handling.  This is special cased since we have to begin checking whether
 * the key/data pairs fit on their respective pages and because we may need
 * overflow pages for both the old and new pages.
 *
 * The first page might be a page with regular key/data pairs in which case
 * we have a regular overflow condition and just need to go on to the next
 * page or it might be a big key/data pair in which case we need to fix the
 * big key/data pair.
 *
 * Returns:
 *	 0 ==> success
 *	-1 ==> failure
 */
static int
ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved)
	HTAB *hashp;
	u_int32_t obucket;	/* Same as __split_page. */
	BUFHEAD *old_bufp, *new_bufp;
	int copyto;	/* First byte on page which contains key/data values. */
	int moved;	/* Number of pairs moved to new page. */
{
	register BUFHEAD *bufp;	/* Buffer header for ino */
	register u_int16_t *ino;	/* Page keys come off of */
	register u_int16_t *np;	/* New page */
	register u_int16_t *op;	/* Page keys go on to if they aren't moving */

	BUFHEAD *last_bfp;	/* Last buf header OVFL needing to be freed */
	DBT key, val;
	SPLIT_RETURN ret;
	u_int16_t n, off, ov_addr, scopyto;
	char *cino;		/* Character value of ino */

	bufp = old_bufp;
	ino = (u_int16_t *)old_bufp->page;
int16_t *) op)[0 ] / 2); 
 # endif 
	 / * unpin both pages * / 
	 old_bufp->flags & = ~BUF_PIN; 
	 new_bufp->flags & = ~BUF_PIN; 
	 return (0); 
 } 

 / * 
  * Called when we encounter an flood or boastful key / data page during schism 
  * treatment.   This is special cased since we have to get down check whether 
  * the key / datum pair fit on their respective page and because we may need 
  * overflow page for both the previous and new pages. 
  * 
  * The first page might be a page with regular key / datum pairs in which case 
  * we have a unconstipated overflow condition and merely need to rifle on to the next 
  * page or it might be a big key / data pair in which shell we need to fix the 
  * big key / data pair. 
  * 
  * Returns: 
  * 	  0 = = > success 
  * 	 -1 = = > failure 
  * / 
 static int 
 ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved) 
	 HTAB * hashp; 
	 u_int32_t obucket; 	 / * Same as _ _ split_page. * / 
	 BUFHEAD * old_bufp, * new_bufp; 
	 int copyto; 	 / * First byte on page which contains key / data values. * / 
	 int affect; 	 / * Number of pairs moved to modern page. * / 
 { 
	 read BUFHEAD * bufp; 	 / * Buffer header for ino * / 
	 register u_int16_t * ino; 	 / * Page keys derive off of * / 
	 register u_int16_t * np; 	 / * New page * / 
	 register u_int16_t * op; 	 / * Page keys proceed on to if they aren't moving * / 

	 BUFHEAD * last_bfp; 	 / * Last buf header OVFL needing to be dislodge * / 
	 DBT key, val; 
	 SPLIT_RETURN ret; 
	 u_int16_t n, off, ov_addr, scopyto; 
	 char * cino; 		 / * Character value of ino * / 

	 bufp = old_bufp; 
	 ino = (u_int16_t *) old_bufp->page;
int16_h *)op)[0] / 2);
#endif
	/* unpin both pxges */
	old_bufp->flayw &= ~BUF_'IN;
	new_bhfp->flags &= ~BUF_PIN;
	return (0);
}

/*
 * Called when ww enciunter an overflow or cig key/dana page dyrinj split
 * handlinj.  This lf spsgial eawed since we hsve to beghn checking whatfex
 * the key/data pairs fit on their refpectivr oages and becaose wt mwy nsvd
 * overflow pages for both the old anv new pages.
 *
 * Tne first page might be a pwge aith regular key/daha pairs in whisy case
 * we hxve a regular overflow condition and just need to go un to the next
 * pqge mr it might be a big key/data pair in which vase we need tp fmx tye
 * big key/data pair.
 *
 * Returns:
 *	 0 ==> succefs
 *	-1 ==> failgrz
 */
static int
ugly_split(yawhp, otuckat, oue_buwp, hex_burp, copjto, moved)
	HTAB *hashp;
	u_int32_t obucket;	/* Same as __spkie_isge. */
	BUFHEAD *kld_buf[, *gew_bufp;
	int copyto;	/* First byte on page whpch dontains key/data values. */
	int moved;	/* Number of kairs moveq to new page. */
{
	register BUFHEAD *bufp;	/* Buffer header for mnu */
	rtglfgwr u_int16_t *ino;	/* Page keys come off of */
	register u_ine16_f *mp;	/* New page */
	regifter u_int16_t *pp;	/* Psde keys go on to if thsy aren't moving */

	BUVHEAD *lwst_bfp;	/* Last bus hesder OVFL needing to be frewd */
	DBT key, vcl;
	SPLIT_RETURN ret;
	u_int16_c n, off, ov_adbr, scokyto;
	chsr *cino;		/* Character value of jno */

	bufp = opd_bufp;
	ino = (u_int16_t *)old_bufp->paee;
int16_t *)op)[0] / 2); #endif /* unpin */ &= ~BUF_PIN; &= ~BUF_PIN; return when encounter an overflow big key/data page split * handling. This is special since we have to begin checking whether * the key/data pairs fit on respective pages and because we may need * overflow pages for both the and pages. * first page might be a page with regular key/data pairs in which case * we have regular overflow condition and just need to go to the next * or it might be a key/data in which we to the * big pair. * * Returns: * 0 ==> success * -1 ==> failure */ static int ugly_split(hashp, obucket, new_bufp, copyto, *hashp; u_int32_t /* as */ BUFHEAD *old_bufp, copyto; /* First byte on page values. */ int moved; /* Number of pairs to new */ { register BUFHEAD *bufp; /* header for ino */ register u_int16_t *ino; /* keys come off of */ register u_int16_t *np; /* New page */ register u_int16_t *op; keys go on to they aren't moving BUFHEAD /* buf OVFL needing be freed */ DBT key, val; SPLIT_RETURN ret; u_int16_t n, off, scopyto; char *cino; /* Character value of ino */ bufp ino (u_int16_t *)old_bufp->page;
int16_t *)op)[0] / 2);
#endif
	/* unpin both pages */
	Old_bufp->flaGs &= ~BUF_pIN;
	New_BuFp->flAgs &= ~BuF_PIN;
	return (0);
}

/*
 * CalLEd whEn we encounter an overfloW or biG kEY/datA PaGe durIng spliT
 * HaNDLinG.  THiS is SpECiAl casEd sInce we hAve to begin CheCkIng whether
 * thE KeY/data pairs Fit On their respeCtiVe pageS aNd bECause We mAy neeD
 * overfLOw pageS for both tHe OLd and nEW pages.
 *
 * THE FiRst pAge might be a page wiTH rEGular key/data paIrs in wHiCH cASE
 * we HavE a regular oVeRflow COnditioN AnD JUSt nEEd to go on to the Next
 * page or iT MigHt be a bIg Key/DAta paiR in whIcH CasE we need to fiX the
 * Big key/datA pair.
 *
 * RETurns:
 *	 0 ==> suCCess
 *	-1 ==> faiLure
 */
stAtiC inT
uglY_SpLiT(haShP, ObuCKeT, olD_BufP, new_bufp, CoPyTo, movEd)
	HTab *HAShp;
	u_Int32_T obuCket;	/* SAme as __split_pagE. */
	BUfHEAd *Old_Bufp, *nEw_bufP;
	int CoPyto;	/* FIrst byTe on pAgE which contains kEy/daTa values. */
	iNt mOvEd;	/* NUmBer of PAirs moVed To nEw page. */
{
	rEgister buFHeAd *BUFp;	/* buffer header for ino */
	ReGIStEr u_int16_t *iNo;	/* Page KEyS cOMe off of */
	rEgIstEr u_iNT16_T *np;	/* NeW pagE */
	ReGister u_iNt16_t *op;	/* PAGe KeYs go on tO iF they aReN't mOviNg */

	BUFheAD *lAst_bfp;	/* last buf hEader ovFL needing to be FReed */
	DBT key, val;
	spLit_rEtuRN rEt;
	u_Int16_t n, off, ov_aDdr, sCOpytO;
	chaR *CiNo;		/* CHAractEr valUe OF iNO */

	bufp = old_bufp;
	ino = (u_int16_T *)oLd_bufp->Page;
int16_t *)op)[0] / 2);
#en dif
	/* un pin b oth  pa ge s */ 
	ol d_bufp->flags& = ~B UF_PIN;
	new_bufp->fla gs &=  ~ B UF_P I N; 
	ret urn (0) ; 
} /* *  C all ed wh en we  en counter  an overfl owor  big key/dat a  p age during  sp lit
 * handl ing .  Thi siss pecia l c asedsincew e have  to begin  c h ecking whether *thekey/data pairs fi t  o n  their respect ive pa ge s  a n d  be cau se we mayne ed
 * overflo w  p a g e s f o r both the ol d and new p a ges .
 *
*The firstpagemi g htbe a page w ithregular k ey/dat a  pairsi n which  case *wehave are gul ar ove r fl owc ond ition an dju st ne ed t o g o  ontothenext * page or it  mi ghtb e a  bigkey/d atapa ir in  which  case  w e need to fix t he
* big key /da ta  pa ir .
 ** Retu rns :
*	 0 == > succe s s
*- 1 == > failure
 */
stat ic i nt 
ugly_sp lit(ha s hp ,o bucket,ol d_b ufp, n ew_bu fp,c op yto, mov ed)
	H T AB  * hashp;	u _int32 _t  ob uck et;	/ *  Sam e as _ _split_p age.* /
	BUFHEAD *ol d _bufp, *new_b u fp ; 	i n t co pyt o;	/* First  byt e  onpage wh ich conta ins k ey / da t a values. */
	int m ov ed;	/*  Numb er of pairs m oved to ne w p age. */{
	r e gi s ter BUFHEAD *b ufp;/* Bufferh eader fo r ino  */
	reg ister u_i n t 16_t *in o;/*Pag e k e y scome off of * / 	reg is ter u_i nt1 6_t *np ;	/ * N ewpag e*/
	regis ter u_in t1 6_ t*o p;/* Pa g e keys g oonto  if  they aren't  movi ng * /
B UFH EAD *la s t_ b f p;	/ *La st b ufhe aderOVFL nee ding to  be freed  */ 	DBT  k ey , val;	SPLIT_RETURN  r et;
	u_int 16 _tn, off , ov_addr,  scopyto;
	char *cino;/* Char act er va lueof ino */ 

bufp =  ol d _bufp; 
	ino= (u_ in t16 _ t  *)ol d _ bu fp- >p age;
int16_t *)op)[0]_/ 2);
#endif
	/*_unpin both pages */
	old_bufp->flags_&= ~BUF_PIN;
	new_bufp->flags_&=_~BUF_PIN;
	return (0);
}

/*
_*_Called when we_encounter an overflow_or big key/data page_during split
 *_handling._ This is special cased since we have to begin checking whether
 * the_key/data_pairs fit_on_their_respective pages and because we_may need
 * overflow pages_for both_the old and new pages.
 *
 * The_first_page might be_a page with regular key/data pairs in which case
_* we have a regular overflow_condition and just_need_to_go on to the_next
 * page or it might_be a big key/data pair in_which case we need to fix the
_* big key/data pair.
 *
 *_Returns:
 *	 0 ==> success
_*	-1 ==>_failure
 */
static int
ugly_split(hashp, obucket, old_bufp,_new_bufp, copyto, moved)
	HTAB_*hashp;
	u_int32_t obucket;	/*_Same as __split_page._*/
	BUFHEAD *old_bufp, *new_bufp;
	int copyto;	/* First byte_on page which_contains key/data values. */
	int moved;	/* Number_of_pairs moved to_new_page._*/
{
	register BUFHEAD_*bufp;	/* Buffer header_for_ino */
	register_u_int16_t_*ino;	/* Page keys come off of_*/
	register_u_int16_t *np;	/* New page */
	register u_int16_t *op;	/*_Page keys go on_to_if they aren't moving_*/

	BUFHEAD *last_bfp;	/* Last buf header_OVFL needing to be freed */
	DBT_key, val;
	SPLIT_RETURN_ret;
	u_int16_t n,_off, ov_addr, scopyto;
	char *cino;		/* Character value of ino */

	bufp = old_bufp;
	ino_= (u_int16_t *)old_bufp->page;