Subversion Repositories shark

Rev

Blame | Last modification | View Log | RSS feed

/*
 *
 *
 *
 */


#include <ll/i386/cons.h>
#include <drivers/keyb.h>

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

int main(int argc,char *argv[])
{
  char buffer[256];
  char *s;
  //  int res;
  int c;

  /*
  temp_device=bdev_scan_devices(choose_temp_callback);
  if (temp_device<0) {
    cprintf("can't find a filesystem to mount on /TEMP!!!\n");
    return -1;
  }
 
  res=mount(temp_device,FS_MSDOS,"/TEMP",NULL);
  if (res!=0) {
    cprintf("can't mount XXX on /TEMP (errno: %i)\n",errno);
    sys_end();
    return -1;
  }
  */

 
  /*
   *
   */


  printf("try using printf() to write on console!\n");
  printf("second line of the test\n");
  fprintf(stdout,"using fprintf() to write on stdout\n");
  fprintf(stderr,"try using fprintf() to write on stderr!\n");
  fprintf(stderr,"all this %i message are using ?printf() functions\n",4);

  printf("now try to write a phrase and press [Enter] to finish\n");
  s=fgets(buffer,sizeof(buffer),stdin);
  if (s!=NULL) printf("you have typed: '%s'\n",s);
 
  cprintf("[press 'x' to exit]\n");
 
  while ((c = keyb_getchar()) != 'x') ;

  return 0;
}