* Replaced bcopy/bzero/bcmp with memcpu/memeset/memcmp.

git-svn-id: svn://svn.zoy.org/elk/trunk@137 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam 2003-09-09 23:13:50 +00:00
parent 846590786d
commit 335719f3a1
7 changed files with 12 additions and 12 deletions

View File

@ -63,7 +63,7 @@ static int Bitstring_Equal(Object b1, Object b2) {
if (a->len != b->len)
return 0;
return !bcmp(a->data, b->data, bits_to_bytes(a->len));
return !memcmp(a->data, b->data, bits_to_bytes(a->len));
}
static Object P_Bitstring_Equalp(Object a, Object b) {
@ -105,7 +105,7 @@ static Object Make_Bitstring(unsigned int len) {
int nbytes = bits_to_bytes(len);
b = Alloc_Object(sizeof(struct S_Bitstring) + nbytes-1, T_Bitstring, 0);
bzero((char *)BITSTRING(b)->data, nbytes);
memset((char *)BITSTRING(b)->data, 0, nbytes);
BITSTRING(b)->tag = Null;
BITSTRING(b)->len = len;
return b;

View File

@ -140,7 +140,7 @@ static Object P_Get_Property (Object w, Object prop, Object type, Object start,
Object s;
x = Make_String ((char *)0, (int)nitems);
s = Car (t) = x;
bcopy ((char *)data, STRING(s)->data, (int)nitems);
memcpy (STRING(s)->data, (char *)data, (int)nitems);
} else {
Object v;
GC_Node;

View File

@ -157,7 +157,7 @@ static Object P_Set_Context_Fallback_Resources (int argc, Object *argv) {
Check_Type (argv[i], T_String);
sp = STRING(argv[i]);
p[i] = XtMalloc (sp->size + 1);
bcopy (sp->data, p[i], sp->size);
memcpy (p[i], sp->data, sp->size);
p[i][sp->size] = 0;
}
p[i] = 0;

View File

@ -45,8 +45,8 @@ int Register_Function (Object x) {
GC_Link (x);
v = Make_Vector (max_functions, Null);
GC_Unlink;
bcopy ((char *)VECTOR(Functions)->data, (char *)VECTOR(v)->data,
i * sizeof (Object));
memcpy ((char *)VECTOR(v)->data, (char *)VECTOR(Functions)->data,
i * sizeof (Object));
Functions = v;
}
VECTOR(Functions)->data[i] = x;

View File

@ -116,12 +116,12 @@ void Get_All_Resources (int sub, Widget w, WidgetClass c, XtResource **rp,
*np = nr + snr + cnr;
*cp = cnr;
*rp = (XtResource *)XtMalloc (*np * sizeof (XtResource));
bcopy ((char *)r, (char *)*rp, nr * sizeof (XtResource));
memcpy ((char *)*rp, (char *)r, nr * sizeof (XtResource));
XtFree ((char *)r);
if (snr)
bcopy ((char *)sr, (char *)(*rp + nr), snr * sizeof (XtResource));
memcpy ((char *)(*rp + nr), (char *)sr, snr * sizeof (XtResource));
if (cnr) {
bcopy ((char *)cr, (char *)(*rp + nr+snr), cnr * sizeof (XtResource));
memcpy ((char *)(*rp + nr+snr), (char *)cr, cnr * sizeof (XtResource));
XtFree ((char *)cr);
}
}
@ -192,7 +192,7 @@ void Convert_Args (int ac, Object *av, ArgList to, Widget widget,
} else if (dt == T_Float) {
float f = (float)Get_Double (val);
to[i].name = res;
bcopy ((char *)&f, (char *)&to[i].value, sizeof f);
memcpy ((char *)&to[i].value, (char *)&f, sizeof f);
} else if (dt == T_Dimension || dt == T_Position || dt == T_Cardinal
|| dt == T_Fixnum) {
XtSetArg (to[i], res, Get_Integer (val));

View File

@ -119,7 +119,7 @@ again:
case T_String: {
struct S_String *p1 = STRING(x1), *p2 = STRING(x2);
return p1->size == p2->size &&
bcmp (p1->data, p2->data, p1->size) == 0;
memcmp (p1->data, p2->data, p1->size) == 0;
}
case T_Vector: {
struct S_Vector *p1 = VECTOR(x1), *p2 = VECTOR(x2);

View File

@ -101,7 +101,7 @@ Object Obarray_Lookup (register char const *str, register int len) {
for (p = VECTOR(Obarray)->data[h]; !Nullp (p); p = sym->next) {
sym = SYMBOL(p);
s = STRING(sym->name);
if (s->size == len && bcmp (s->data, str, len) == 0)
if (s->size == len && memcmp (s->data, str, len) == 0)
return p;
}
return Make_Integer (h);