Subversion Repositories SvarDOS

Rev

Rev 1412 | Rev 1415 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1412 Rev 1414
Line 901... Line 901...
901
void main(void) {
901
void main(void) {
902
  static struct file dbarr[10];
902
  static struct file dbarr[10];
903
  unsigned short curfile;
903
  unsigned short curfile;
904
  struct file *db = dbarr; /* visible file is the first slot by default */
904
  struct file *db = dbarr; /* visible file is the first slot by default */
905
  struct line far *clipboard = NULL;
905
  struct line far *clipboard = NULL;
-
 
906
  unsigned char original_breakflag;
906
 
907
 
907
  {
908
  {
908
    unsigned short i = 0;
909
    unsigned short i = 0;
909
    const char far *selfptr;
910
    const char far *selfptr;
910
    char self[128], lang[8];
911
    char self[128], lang[8];
Line 938... Line 939...
938
    SCHEME_SCROLL = 0x70;
939
    SCHEME_SCROLL = 0x70;
939
    SCHEME_MSG = 0x6f;
940
    SCHEME_MSG = 0x6f;
940
    SCHEME_ERR = 0x4f;
941
    SCHEME_ERR = 0x4f;
941
  }
942
  }
942
 
943
 
-
 
944
  /* instruct DOS to stop detecting CTRL+C because user needs it for
-
 
945
   * copy/paste operations. also remember the original status of the BREAK
943
  /* disable CTRL+C handling, user needs it for copy/paste operations */
946
   * flag so I can restore it as it was before quitting. */
944
  mdr_dos_ctrlc_disable();
947
  original_breakflag = mdr_dos_ctrlc_disable();
945
 
948
 
946
  for (;;) {
949
  for (;;) {
947
    int k;
950
    int k;
948
 
951
 
949
    /* add an extra empty line if cursor is on last line and this line is not empty */
952
    /* add an extra empty line if cursor is on last line and this line is not empty */
Line 1272... Line 1275...
1272
    }
1275
    }
1273
  }
1276
  }
1274
 
1277
 
1275
  mdr_cout_close();
1278
  mdr_cout_close();
1276
 
1279
 
-
 
1280
  /* restore the DOS BREAK flag if it was originally set */
-
 
1281
  if (original_breakflag != 0) mdr_dos_ctrlc_enable();
-
 
1282
 
1277
  /* no need to free memory, DOS will do it for me */
1283
  /* no need to free memory, DOS will do it for me */
1278
 
1284
 
1279
  return;
1285
  return;
1280
}
1286
}