/*
 * Title:   C_Demo
 * Using ANSI C Part 14
 * by Lee Calcraft
 * RISC User October 1992
 * Copyright Lee Calcraft
 * Test module with star commands */

#include <kernel.h>
#include <stdio.h>
#include <stdlib.h>

#define  MOD_NAME "TestModule"

enum {
  to_hex,
  err
};

static _kernel_oserror tm_error= {\
  123456,
  "Error from " MOD_NAME
};


/* arg_str is argument string */
/* arg_c is no of arguments */

_kernel_oserror *star_cmnd(char *arg_s,\
       int arg_c,int cmnd_no,void *p_word)
{
  int n;
  
  switch (cmnd_no)
  {
    case to_hex:
      n=atoi(arg_s);
      printf("Hex: %x\n",n);
      break;
    
    case err:
      return &tm_error;
      
  }
  return 0; /* no errors so return zero */
}
  
