static char *sccsid
= "@(#)misc.c 4.4 (Berkeley) %G%";
return (c
>= 'a' && c
<= 'z' || c
>= 'A' && c
<= 'Z' || c
== '_');
return (c
>= '0' && c
<= '9');
return (letter(c
) || digit(c
));
if (cp
>= end
&& cp
< (char *) &cp
)
n
= p
= xalloc((unsigned) (p
- s
));
static char *av
[2] = {0, 0};
printf("i=%d: Out of memory\n", i
);
chdir("/usr/bill/cshcore");
return 0; /* fool lint */
register char **av
= oav
;
(void) blkcpy(blkend(up
), vp
);
register char **av
= av0
;
(char **) calloc((unsigned) (blklen(v
) + 1), sizeof (char **));
ep
= xalloc((unsigned) ((p
- cp
) + (q
- dp
) - 1));
for (p
= ep
, q
= cp
; *p
++ = *q
++;)
for (p
--, q
= dp
; *p
++ = *q
++;)
register char **up
, **vp
;
(char **) calloc((unsigned) (blklen(up
) + blklen(vp
) + 1),
* This routine is called after an error to close up
* any units which may have been left open accidentally.
for (f
= 0; f
< NOFILE
; f
++)
if (f
!= SHIN
&& f
!= SHOUT
&& f
!= SHDIAG
&& f
!= OLDSTD
&&
* Move descriptor i to j.
* If j is -1 then we just want to get i to a safe place,
* i.e. to a unit > 2. This also happens in dcopy.
if (i
== j
|| i
< 0 || j
< 0 && i
> 2)
register char *to
, *from
;
* Left shift a command argument list, discarding
* the first c arguments. Used in "shift" commands
* as well as by commands like "repeat".
while (*cp
&& digit(*cp
))
(char **) calloc((unsigned) (blklen(v
) + 1), sizeof (char **));
bferr("Undefined variable");
register char *sub
, *str
;