Subversion Repositories Kolibri OS

Rev

Rev 7880 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. // -------------------------------------------------------------
  2. // KWINE is a fork of program PELoad written by 0CodErr
  3. // author of fork - rgimad
  4. //-------------------------------------------------------------
  5. #include "stddef.h"
  6. #include <stdarg.h>
  7. #include "msvcrt.dll.h"
  8.  
  9. #include "string.c"
  10. //#include "dlfcn.c"
  11. #include "conio.c"
  12. #include "stdio.c"
  13. #include "stdlib.c"
  14.  
  15.  
  16. typedef struct
  17. {
  18.         char *name;
  19.         void *f;
  20. } export_t;
  21.  
  22. // conio
  23. const char sz__getch[] = "_getch";
  24. const char sz__kbhit[] = "_kbhit";
  25.  
  26. // stdio
  27. const char sz_printf[] = "printf";
  28. const char sz_puts[] = "puts";
  29. const char sz_gets[] = "gets";
  30.  
  31. //string
  32. const char sz_strlen[] = "strlen";
  33. const char sz_strcmp[] = "strcmp";
  34. const char sz_strcat[] = "strcat";
  35.  
  36. // stdlib
  37. const char sz_malloc[] = "malloc";
  38. const char sz_free[] = "free";
  39. const char sz_realloc[] = "realloc";
  40. //const char sz_[] = "";
  41.  
  42.  
  43. //uint32_t EXPORTS[] __asm__("EXPORTS") =
  44. export_t EXPORTS[] =
  45. {
  46.         {sz__getch, (void*)_getch},
  47.         {sz__kbhit, (void*)_kbhit},
  48.  
  49.         {sz_printf, (void*)printf},
  50.         {sz_puts, (void*)puts},
  51.         {sz_gets, (void*)gets},
  52.  
  53.         {sz_strlen, (void*)strlen},
  54.         {sz_strcmp, (void*)strcmp},
  55.         {sz_strcat, (void*)strcat},
  56.  
  57.         {sz_malloc, (void*)malloc},
  58.         {sz_free, (void*)free},
  59.         {sz_realloc, (void*)realloc},
  60.         {NULL, NULL},
  61. };
  62.  
  63.  
  64. int lib_init()
  65. {
  66.         con_init_console_dll();
  67. }
  68.