* Copyright (c) 1980 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
static char sccsid
[] = "@(#)utility.c 5.2 (Berkeley) %G%";
** ASSORTED UTILITY ROUTINES
** Moves a block of storage of length `l' bytes from the data
** area pointed to by `a' to the area pointed to by `b'.
** Returns the address of the byte following the `b' field.
** Overflow of `b' is not tested.
** null-terminated strings `a' and `b' are tested for
** returns one if equal, zero otherwise.
** The strings `s1' and `s2' are concatenated and stored into
** `s3'. It is ok for `s1' to equal `s3', but terrible things
** will happen if `s2' equals `s3'. The return value is is a
** pointer to the end of `s3' field.
** The length of string `s' (excluding the null byte which
** terminates the string) is returned.
syserr(p0
, p1
, p2
, p3
, p4
, p5
)
printf("\n\07TREK SYSERR: ");
printf(p0
, p1
, p2
, p3
, p4
, p5
);
printf("\tsystem error %d\n", errno
);