untermud/DOC/
untermud/DOC/U/
untermud/DOC/U/U-examples/
untermud/DOC/internals/
untermud/DOC/wizard/
untermud/MISC/
untermud/MISC/dbchk/
untermud/RWHO/
untermud/RWHO/rwhod/
#include    "config.h"
#include    "mud.h"
#include    "u.h"
#include    "y.tab.h"

/* convert a string (or something) to a NUM */
int ub_int (char *who, char *aswho, int ac, Nod * av[], Nod * retnode)
{
  switch (av[0]->rv.t) {
  case STR:
    retnode->rv.iv = atoi (av[0]->rv.cv);
    break;
  case NUM:
    retnode->rv.iv = av[0]->rv.iv;
    break;
  case OID:
  case VNULL:
    retnode->rv.iv = 0;
    break;
  default:
    return (UERR_FATAL);
  }

  retnode->rv.t = NUM;
  return (UERR_NONE);
}