Exemple #1
0
int
ShellCmdArgChar::operator()(const char * & arg, CmdLine & cmd)
{
   CmdArgChar  char_arg(*this);
   const char * save_arg = arg;
   int  badval = char_arg(arg, cmd);
   if (save_arg && !badval)  set(save_arg);
   return  badval;
}
NODE *lrawascii(NODE *args) {
    FIXNUM i;
    NODE *val = UNBOUND, *arg;

    arg = char_arg(args);
    if (NOT_THROWING) {
	i = (FIXNUM)((unsigned char)*getstrptr(arg));
	val = make_intnode(i);
    }
    return(val);
}
NODE *lvbarredp(NODE *args) {
    char i;
    NODE *arg;

    arg = char_arg(args);
    if (NOT_THROWING) {
	i = *getstrptr(arg);
	return torf(getparity(i));
    }
    return(UNBOUND);
}
NODE *lascii(NODE *args) {
    FIXNUM i;
    NODE *val = UNBOUND, *arg;

    arg = char_arg(args);
    if (NOT_THROWING) {
	if (nodetype(arg) == BACKSLASH_STRING)
	    i = (FIXNUM)(*getstrptr(arg)) & 0377;
	else
	    i = (FIXNUM)clearparity(*getstrptr(arg)) & 0377;
	val = make_intnode(i);
    }
    return(val);
}