# HG changeset patch # User Jim Blandy # Date 714205162 0 # Node ID 65f15f1961d8e897d3e783d48c158ac92727ead0 # Parent c1ebe69206dfb49c3c8c9a40d4e3deacd2d74770 * data.c [USG] (Frem): Call fmod, rather than drem. Rah. * data.c (store_symval_forwarding): When storing through a Lisp_Buffer_Objfwd, check if the slot requires a particular type, and report an error if the types clash. diff -r c1ebe69206df -r 65f15f1961d8 src/data.c --- a/src/data.c Wed Aug 19 06:18:37 1992 +0000 +++ b/src/data.c Wed Aug 19 06:19:22 1992 +0000 @@ -604,8 +604,19 @@ break; case Lisp_Buffer_Objfwd: - *(Lisp_Object *)(XUINT (valcontents) + (char *)current_buffer) = newval; - break; + { + unsigned int offset = XUINT (valcontents); + Lisp_Object type = + *(Lisp_Object *)(offset + (char *)&buffer_local_types); + + if (! NILP (type) && ! NILP (newval) + && XTYPE (newval) != XINT (type)) + buffer_slot_type_mismatch (valcontents, newval); + + *(Lisp_Object *)(XUINT (valcontents) + (char *)current_buffer) + = newval; + break; + } default: valcontents = XSYMBOL (sym)->value; @@ -1638,7 +1649,11 @@ f1 = XTYPE (num1) == Lisp_Float ? XFLOAT (num1)->data : XINT (num1); f2 = XTYPE (num2) == Lisp_Float ? XFLOAT (num2)->data : XINT (num2); +#ifdef USG + f1 = fmod (f1, f2); +#else f1 = drem (f1, f2); +#endif if (f1 < 0) f1 += f2; return (make_float (f1));