home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / gle / gle / loadfile.c < prev    next >
C/C++ Source or Header  |  1992-11-29  |  2KB  |  89 lines

  1. #include "all.h"
  2. #include "conio.h"
  3. #include <math.h>
  4. #include "bios.h"
  5.  
  6. int gle_debug;
  7. int scr_init(void);
  8. int scr_end(void);
  9. #define true (!false)
  10. #define false 0
  11. #define dbg if (gle_debug>0)
  12. #ifdef __TURBOC__
  13.     extern unsigned _stklen=45000;
  14. #endif
  15.  
  16. typedef char (*TEXT)[];
  17. int int_edt(char *fname);
  18. int scrinsert(int y);
  19. int scrdeleteline(int y);
  20. int text_eol(void);
  21. int text_delete(void);
  22. int text_undelete(void);
  23. int text_deleteline(void);
  24. int text_left(void);
  25. int text_right(void);
  26. int text_up(void);
  27. int text_down(void);
  28. int text_return(void);
  29. int text_refresh();
  30. int text_putstr(char *s);
  31. int text_setwindow();
  32. int text_move(int x,int y);
  33. int scr_tab(char *s, int x);
  34. int scr_negtab(char *s, int x, int *fpos, int *scrx);
  35. int fner(char *s);
  36. int fner_clear(void);
  37. int text_setwindow(void);
  38. int text_refresh(void);
  39. int text_main(void);
  40. int text_inkey(void);
  41. int text_scroll(void);
  42. int text_scroll_up(void);
  43. int text_scroll_down(void);
  44. int text_select(void);
  45. int text_cut(void);
  46. int text_paste(void);
  47. int restofline(int y,int x);
  48. int normal_key(int c);
  49. int lineset(int i,char *ss);
  50. int lineinsert(int y, char *ss);
  51. int textinsert(int y);
  52. char *sline(int i);
  53. int text_load(char *f);
  54. char *line(int i);
  55. int ncpy(char *d, char *s, int n);
  56. /*------------ GLOBAL VARIABLES --------------*/
  57. char input_file[50];
  58. char *(*gtxt)[];   /* gtxt is a pointer to an array of poiter to char */
  59. int ngtxt=0;
  60. /*---------------------------------------------------------------------------*/
  61. main(int argc, char **argv)
  62. {
  63. char fname[30];
  64.     if (argc>1) strcpy(fname,*(++argv)); else strcpy(fname,"test.gle");
  65.     strcpy(input_file,fname);
  66.     gtxt = (void *) myallocn(1,1000*4);    /* allocate 1000 lines of gle source      4K */
  67.     text_load(fname);
  68.     scr_init();
  69.     int_edt(fname);
  70.     scr_end();
  71. }
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.